Repository navigation
claw: sarif_feed -- a spec that does not parse becomes a code-scanning alert on the pull request (Closes #10356) - #10358
Merged
Merged
Conversation
…g alert on the pull request (Closes #10356) specs/claw/sarif_feed.t27 maps what `t27c spec-status` and `t27c parse` print for a changed .t27 file onto the six-field findings sarif.t27 renders, and gen/c/claw/sarif_feed.c is its lowering. The new claw-sarif job of gate-topology.yml mints the TRI CLAW token with exactly the code-scanning-sarif row of github_surface.t27 (security_events write, contents read), runs the signed t27o-v0.1.0 t27c over the changed specs and uploads the document with github/codeql-action/upload-sarif. That row moves PLANNED -> LIVE. NOPARSE -> T27C001 error at the line:col t27c names; UNWRITTEN -> T27C004 warning; an unknown status or a short record marks the run partial (executionSuccessful false) instead of reading as clean. T27C002/T27C003 need the zig-backed test runner and are not fed yet. spec-guards regenerates and diffs the committed C. Shrink offset: spent scripts/ultra_engine_v70_ultimate.py and scripts/gen_w{660,669,670}.py, all ported under specs/port/scripts/ and called by nothing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 09:24
Contributor
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.
Closes #10356
Wires the merged SARIF law (
specs/claw/sarif.t27, #10288) to pull requests: a changed.t27spec that does not parse, or declares functions with no body, becomes a code-scanning alert from the TRI CLAW App.What changes
specs/claw/sarif_feed.t27(new, 12 tests) is the adapter. Input is one record per changed spec: path, the wordt27c spec-statusprints, and the first stderr line oft27c parse.NOPARSEbecomes T27C001 (error, at the line:col t27c names),UNWRITTENbecomes T27C004 (warning, line 1). An unknown status word or a short record is refused bysarif_render, so the run is emitted withexecutionSuccessful: falseand never reads as clean. It adds no JSON; the document issarif_render.gen/c/claw/sarif_feed.cis itsgen-clowering.spec-guards.ymlregenerates it and diffs it, next to the two claw files already there.claw-sarifjob ingate-topology.yml, onpull_request: mints the token withactions/create-github-app-tokenand exactly the scopes of thecode-scanning-sarifrow ofspecs/claw/github_surface.t27(permission-security-events: write,permission-contents: read,repositories: t27), runs the cosign-verifiedt27o-v0.1.0t27c over the changed specs, runs the generated C, and callsgithub/codeql-action/upload-sarifwith that token. It always uploads, so a fixed spec closes its alert. WithoutCLAW_APP_PRIVATE_KEY/CLAW_APP_ID(a fork) it uploads nothing and says so in the step summary.code-scanning-sarifgoes PLANNED to LIVE (census test 11/0 to 10/1).docs/claw/README.mdandAGENTS.mdsection 8.Verified on the Railway lab
sarif_feed.t27:spec-statusIMPLEMENTED,test-report12/12, 0 vacuous;github_surface.t2710/10;sarif.t2715/15.gen-cofgates.t27andt27f_gate.t27is byte-identical to the committed C with the lab binary, so the new file's lowering is comparable; the new C compiles.spec-status+parseloop and the built C; the output is valid JSON (jq), one result,ruleId T27C001,startLine 3,startColumn 1,executionSuccessful true.tools/dupe_scan.py: no new duplicate body. Own-language budget and shrink pass in the pre-commit hook.Own-language offset
The job adds 32 foreign (YAML) lines to
gate-topology.ymland one tospec-guards.yml. The same diff deletesscripts/ultra_engine_v70_ultimate.pyandscripts/gen_w{660,669,670}.py(609 lines): each is ported underspecs/port/scripts/and nothing in.github/,tools/orscripts/calls it.Not in this PR
security_events: write(and its acceptance on the installation), code scanning enabled on the repository, the secret and the variable ofdocs/claw/README.md.🤖 Generated with Claude Code