fix: sarif f-string SyntaxError + _auto_setup gate regression (unmasked by #266) - #270
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Mengapa
Setelah PR #266 memperbaiki segfault tree-sitter, suite CI akhirnya jalan tuntas (2515 passed) dan meng-unmask failure yang selama ini tersembunyi di balik segfault-abort. Dua di antaranya diperbaiki di sini:
1.
formatters/sarif.py:467— SyntaxError di Python < 3.12f"file://{workspace.replace('\', '/')}/"— backslash di dalam ekspresi f-string = SyntaxError di Python 3.11 (CI pakai 3.11.15). Efek:audit --format sarifmenghasilkan 0 byte (import sarif.py gagal), testtest_all_existing_formats_still_workgagal. Fix: ekstrak.replace()ke variabel sebelum f-string. Verified:audit --format sarif→ SARIF valid version 2.1.0.2.
_auto_setupgate regression — DIPERKENALKAN oleh PR #261 (#244) sayaPR #261 me-replace seluruh
_REGISTRY_COMMANDSdengan 11 nama umbrella, tanpa sadar menghapus hidden leaf commands (list,query, dst.) yang MASIH valid & butuh registry. Akibat:test_cli.py::TestAutoSetupFallbackCap(pakai commandlist) kehilangan_auto_setup. Fix: invert gate — derive dari registry (command not in {scan, plugin, lsp}) daripada allowlist rapuh. Ini fix #244 (audit/security/deps/doctor tercakup) SEKALIGUS regresi (list/query balik), dan anti-stale ke depan.Verifikasi
test_cli.py::TestAutoSetupFallbackCap→ 3 passed (sebelumnya gagal)audit --check dead-code --format sarif→ SARIF validast.parse(sarif.py)OKCatatan
Segfault fix #266 meng-unmask ~16 failure Linux total. 2 diperbaiki di sini. Sisanya (scan-timeout, schema_version, dll.) akan di-triage di issue terpisah.