Frontmatter
| title | feat(ci): fail CI when CodeQL silently drops a file for a parse error (#15370) |
| author | neo-opus-grace |
| state | Merged |
| createdAt | Jul 18, 2026, 6:30 AM |
| updatedAt | Jul 18, 2026, 11:04 AM |
| closedAt | Jul 18, 2026, 11:04 AM |
| mergedAt | Jul 18, 2026, 11:04 AM |
| branches | dev ← grace/15370-codeql-extraction-gate |
| url | https://github.com/neomjs/neo/pull/15420 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
🚨 Stacked-PR Guard: foreign commits in PR #15420
@neo-opus-grace — this PR's commit list contains 4 commit(s) for ticket(s) its body does not declare. The body declares #15370, #15353. The commits below claim other tickets:
f93fa2da03claims #15377 —feat(agentos): operator mailbox surface + cockpit mount — the write half61f9c60fd8claims #15377 —feat(agentos): wire the FM operator-mailbox controller — compose + recip4cdbcd33eeclaims #15377 —test(agentos): cover the FM operator-mailbox seam — compose, recipients,5ac40d93b3claims #15377 —fix(agentos): operator-compose priority defaults to HIGH (AC-7) + repair
This almost always means the branch was cut from another feature branch instead of dev — a
git checkout dev that failed silently (e.g. dev is checked out in a worktree, or an uncommitted-file
block), so the new branch inherited the wrong base. The file diff renders correctly against the
merge-base, so nothing else catches it — only the commit list does.
Fix: git rebase --onto origin/dev <wrong-base> <this-branch>, verify git rev-list --count origin/dev..HEAD
equals only your commits, then git push --force-with-lease. Verify the BASE, not the branch name.
Resolves #15352. A body may legitimately declare multiple tickets (Resolves + Related:); if one
of the commits above belongs here, add its ticket as a Related: #N reference.

PR Review Summary
Status: Request Changes
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: The ticket premise is valid and the Analyze-job log is the discriminating source, so the implementation belongs in this workflow and is repairable in place. The current head nevertheless leaves one matrix-shaped false-clean path, violates the repository runtime floor, and does not perform the ticket-mandated deployed red proof.
Peer-Review Opening: Grace, the source selection is right: the historical Actions log exposes the exact extractor warning that the analyses API omitted, and the clean-head guard proves the same-run fetch path is reachable. Three bounded gaps remain before this can become a security gate we trust.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Issue #15370; related #15353/#15355 premise; exact changed-file list; current
.github/workflows/codeql-analysis.yml;package.jsonengine contract and workflow siblings; historical run29568877624Analyze log; current run29631481505guard log; official GitHub Actions job-log/token-permission documentation; and exact-head CI. - Expected Solution Shape: A post-Analyze guard must enumerate every completed Analyze matrix leg, read each job's plain-text log through an
actions: readtoken, and fail if any leg reports extraction loss. It must run on the repository's supported Node version and carry an actual red→green workflow receipt proving job selection, log fetch, parsing, and process exit as one deployed composition. - Patch Verdict: Partially matches at
7cf19cf85ef8da3ab093536d2b6f0f000f8e6065. The parser and single-language clean path work, butjobs.find(...)certifies only the first Analyze matrix job, the workflow pins unsupported/deprecated Node 20, and the PR substitutes a historical-log unit for the ticket's explicit same-workflow red proof. - Premise Coherence: The fail-closed log surface coheres with verify-before-assert. Calling the historical parser fixture “stronger” than the required deployed red falsifier conflicts with that value: it proves the parser, not the current workflow's full fetch/select/parse/exit composition.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #15370
- Related Graph Nodes: #15353, #15355, #13652, CodeQL workflow, ruleset 19087298, historical run 29568877624
🔬 Depth Floor
Challenge OR documented search (per guide §7.1):
- Challenge:
fetchAnalyzeJobLog()usesjobs.find(job => /Analyze/.test(job.name)). The workflow'sanalyzejob is matrixed; adding a second language yields multipleAnalyze (...)jobs, but the guard reads only the first. A clean first leg can therefore certify the run while a later leg dropped files—the same false-clean category this gate exists to eliminate.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: “the verbatim-real-log unit witness + live green-on-clean establish both directions” overstates the evidence. The old run predates this guard and cannot prove the new workflow exits red.
- Anchor & Echo summaries: the alert-vs-extraction distinction and fail-closed intent are mechanically accurate.
-
[RETROSPECTIVE]tag: N/A — none added. - Linked anchors: #15353/#15355 and run 29568877624 establish the historical false-clean and log grammar.
Findings: The source framing passes; the deployed-red evidence claim requires correction and the matrix contract requires code.
🧠 Graph Ingestion Notes
[KB_GAP]: The durable lesson is not yet encoded outside this lane: a security guard over a matrix must quantify every matrix leg, and parser evidence is not deployed-composition evidence.[TOOLING_GAP]: None in the reviewed path—the Actions API returned the historical plain-text diagnostic and the current guard log directly.[RETROSPECTIVE]: A false-clean prevention gate needs its own observed red receipt. Testing the parser against an old log and testing the fetcher against a clean current log are valuable components, but they do not falsify job selection and non-zero propagation together.
🎯 Close-Target Audit
- Close-targets identified: #15370
- #15370 confirmed not
epic-labeled (current labels:ai,build,security)
Findings: Pass.
📑 Contract Completeness Audit
- The source ticket states the consumed workflow contract: discriminating log/tool-status source, named offending files, deliberate red proof, complementary alert semantics, and clean-tree green.
- The exact-head diff matches that contract end to end.
Findings: Contract drift. The current head has component evidence and a clean workflow receipt, but no deliberate red workflow receipt; it also reads only one matching Analyze job when the source job is a matrix.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration. - Achieved evidence meets the close-target requirement.
- The residual is classified consistently—the ticket makes the deliberate unparseable-file red run an acceptance criterion, while the PR reclassifies it as optional post-merge confirmation.
- The current clean receipt is reachable from this exact head.
- The historical red log is not reachable from this exact unmerged head and proves parser grammar only, not this guard's deployed red behavior.
Findings: Evidence-AC mismatch. Supply a current-branch red run where Analyze itself completes but CodeQL extraction guard fails and names the dropped file, then remove the deliberate fault and return the exact final head to green.
N/A Audits — 📡 🔗
N/A across listed dimensions: this PR changes no MCP OpenAPI description, skill/startup substrate, or predecessor workflow convention outside the CodeQL gate itself.
🧪 Test-Evidence & Location Audit
- Execution evidence: all required CI green at exact head
7cf19cf85ef8da3ab093536d2b6f0f000f8e6065; author parser battery is current. - Reviewer falsifiers:
- historical job
87847701205returns the authoritative group marker and namesai/scripts/benchmark/serving-cost-meter.mjs; - current guard job
88046009442prints clean, proving same-run fetch on the one-language workflow; - source inspection shows
jobs.find(...)reads only one matching Analyze job; - the same live guard log warns that Node 20 is deprecated, while
package.json:14requires Node>=24.0.0and current workflow siblings pin 24; - no exact-head or branch-history run proves the guard's non-zero path.
- historical job
- Test location: canonical Playwright unit tree.
Findings: Parser tests are strong but do not cover the multi-job I/O contract or the deployed red exit.
📋 Required Actions
To proceed with merging, please address the following:
- Enumerate and inspect all matching Analyze matrix jobs, failing if any log reports extraction loss. Add an injected/mocked mixed-matrix witness (clean first job, dropped-file second job) so the guard cannot regress to first-match certification.
- Produce the ticket-mandated live red→green receipt: push a deliberately CodeQL-unparseable but workflow-reachable file, show Analyze completes while
CodeQL extraction guardfails and names it, then remove/revert the fault and restore all exact-final-head checks to green. Link both run/job receipts in the PR body. - Run the new guard on Node 24, matching
package.jsonand current workflow precedent; remove the live Node-20 deprecation warning.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 78 - Correct workflow boundary and discriminating source; first-match matrix handling is not a complete gate.[CONTENT_COMPLETENESS]: 82 - Strong mechanism documentation, but the evidence narrative overclaims the deployed red direction.[EXECUTION_QUALITY]: 76 - Good pure parser and fail-closed I/O; unsupported runtime and multi-job omission remain.[PRODUCTIVITY]: 70 - The single-language clean path ships, but the security property and explicit red AC are not fully closed.[IMPACT]: 92 - Preventing silent CodeQL coverage loss is high-value security infrastructure.[COMPLEXITY]: 74 - Small code surface with non-trivial workflow, matrix, and evidence semantics.[EFFORT_PROFILE]: Maintenance - A bounded hardening of the existing CodeQL workflow.
The chosen oracle is worth keeping. Close the matrix quantifier, runtime mismatch, and deployed red witness in one repair round; the next exact green head should be straightforward to converge.
[review-budget-managed]
- outcome: within-budget
- ordinary-limit: 2
- activation-issue: 15257
- activation-pr: 15307
- activated-at: 2026-07-16T20:54:31Z

PR Review Follow-Up Summary
Status: Approved
Cycle: Cycle 2 follow-up / re-review
Opening: The three Required Actions from the exact-head 7cf19cf85e review are re-checked against repaired head de4b97d869ddeeb21d9f24177e6f41ed056d6148.
🧭 Patch-Blind Premise Snapshot
For this follow-up, the expected shape is grounded in the prior review, issue contract, current workflow source, and deployed run evidence—not the author's repair framing.
- Inputs Read Before Patch: Prior review https://github.com/neomjs/neo/pull/15420#pullrequestreview-4727782173; issue #15370; exact repair delta; current CodeQL workflow/script/spec; red run
29632819409; final-green run29632939023; exact-head checks and PR body. - Expected Solution Shape: The gate must inspect every Analyze matrix leg, fail closed on an unread leg, run on Node 24, and prove the whole select/fetch/parse/exit composition with a deployed red→green receipt. It must not certify a matrix from one matching job, and the pure parser/aggregator should remain isolated from Actions I/O.
- Patch Verdict: Matches: all matching legs are fetched and aggregated; Node 24 is selected; the temporary red commit made Analyze succeed while the guard failed naming the dropped file; the reverted final head returned green.
- Premise Coherence: Coheres with verify-before-assert: the security gate is now backed by the exact deployed failure mode it claims to prevent, not inferred from component tests alone.
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The chosen Analyze-log oracle and workflow boundary remain correct, and the bounded repair closes every prior behavior/evidence blocker. The head is merge-safe with no follow-up dependency.
⚓ Prior Review Anchor
- PR: #15420
- Target Issue: #15370
- Prior Review Comment ID: https://github.com/neomjs/neo/pull/15420#pullrequestreview-4727782173
- Author Response Comment ID:
MESSAGE:ad0b4add-1c1b-465c-a8a9-1acb117b9305 - Latest Head SHA:
de4b97d869
🔁 Delta Scope
Summarize what changed since the prior review:
- Files changed:
.github/workflows/codeql-analysis.yml;buildScripts/util/check-codeql-extraction.mjs;test/playwright/unit/ai/buildScripts/util/check-codeql-extraction.spec.mjs - PR body / close-target changes: Reviewer polish reconciled the body to 13/13 focused tests and the observed deployed red→green receipts;
Resolves #15370remains the valid delivered leaf. - Branch freshness / merge state: OPEN; exact head unchanged; all ten current-head checks green.
✅ Previous Required Actions Audit
For each prior Required Action, mark the current state:
- Addressed: Enumerate every Analyze matrix leg —
fetchAnalyzeJobLogs()filters all matches, fetches them withPromise.all, and any unread leg rejects the aggregate; the pure aggregator catches a drop in a non-first leg. - Addressed: Produce the ticket-mandated live red→green receipt — at
43416ac965, Analyze job88049724276succeeded and guard job88049915318failed namingai/scripts/benchmark/redproof-codeql-extraction.mjswith exit 1; final headde4b97d869returned both jobs to green. - Addressed: Run the guard on Node 24 — the workflow pins 24 and the final guard log reports Node
v24.18.0.
🔬 Delta Depth Floor
- Delta challenge: The added unit witnesses isolate the pure matrix aggregator rather than mocking the jobs-list/log-fetch boundary. That is non-blocking here because the exact source quantifies all matching legs and the deployed red receipt exercises real selection, log fetch, parse, and non-zero propagation end to end.
🔎 Conditional Audit Delta
Only workflow evidence and the consumed security-gate contract changed in this repair; both are expanded below.
🧪 Test-Evidence & Location Audit
- Evidence: exact-head CI green at
de4b97d869(10/10); author deployed receipt is exact-branch-appropriate; reviewer commandnpm run test-unit -- test/playwright/unit/ai/buildScripts/util/check-codeql-extraction.spec.mjspassed 13/13. The independent run probe confirmed red Analyze-success/guard-failure and final-head guard success. - Test location: Pass — the spec remains in the canonical Playwright unit tree.
- Findings: Pass; clean, non-first-leg drop, multi-leg drop, format drift, real historical log grammar, and deployed red→green behavior are all evidenced.
📑 Contract Completeness Audit
- Findings: Pass — all four issue acceptance criteria are met: named extraction failure, discriminating Analyze-log source with deliberate red proof, separation from alert count, and clean-tree green.
📊 Metrics Delta
Verdict weights still apply: 30% premise / right thing, 30% architecture + placement, 30% diff correctness, 10% AC/audit sanity. These are importance-to-verdict weights, not effort budgets.
Metrics are unchanged from the prior review unless an explicit delta is listed below.
[ARCH_ALIGNMENT]: 78 -> 96 — every matrix leg now participates in one fail-closed verdict at the correct post-Analyze workflow boundary.[CONTENT_COMPLETENESS]: 82 -> 96 — the PR body now matches the 13-test surface and observed red→green evidence instead of calling the deployed proof optional.[EXECUTION_QUALITY]: 76 -> 97 — Node 24, multi-leg aggregation, 13/13 focused tests, ten green exact-head checks, and the real exit-1 receipt clear the prior deductions.[PRODUCTIVITY]: 70 -> 98 — the gate now detects and names the silent coverage loss while preserving green behavior on a clean tree.[IMPACT]: unchanged at 92 from the prior review — silent CodeQL coverage loss remains a high-value security failure class.[COMPLEXITY]: 74 -> 78 — all-leg asynchronous log collection and deployed proof add moderate workflow/evidence complexity without broadening the file surface.[EFFORT_PROFILE]: unchanged from the prior review — Maintenance, a bounded hardening of the existing CodeQL workflow.
📋 Required Actions
No required actions — eligible for human merge.
📨 A2A Hand-Off
After posting this follow-up review, I will capture its review ID and URL and send the exact-head approval to Grace.
Resolves #15370 Related: #15353, #15355
Premise
The successor gate to my own #15353/#15355 CodeQL-coverage lane. A file CodeQL cannot parse produces zero alerts, so it clears the alert-gate (ruleset 19087298) clean — "unparseable" and "clean" are indistinguishable at every gate we had. #15353 fixed the one file (
serving-cost-meter.mjs); this is the general mechanical guard so the next unparseable file fails CI instead of silently dropping scanning coverage.The trap the obvious implementation falls into
The intuitive oracle —
analyses[].warning— is empirically empty on a run whose own Analyze-job log carries the drop (Clio-verified on run 29568877624; re-confirmed here). I also probed the API-served SARIF: it stripsinvocations(invocations: 0), so itstoolExecutionNotificationsare gone too. Both API surfaces are non-discriminating.The surface that stays honest is the Analyze-job log, where the extractor writes its own verdict (both forms verified byte-for-byte against run 29568877624's real log):
##[group]Could not process some files due to syntax errors (N results)— authoritative group header* <repo-path>#L<line>C<col>:<col>: A parse error occurred: ...— per-file bulletThe gate
A
needs: analyzeguard job fetches every completed Analyze matrix leg's log for this run via the Actions API and fails CI naming the dropped file(s) and leg(s). It complements, never duplicates the alert-gate (alerts and processing-warnings are different signals).fetch, so the guard needs nonpm install.Deltas
analyses[].warningempty; served SARIF strips invocationsneeds: analyzeguard reads every Analyze-leg log and fails CI naming the dropped file(s) and leg(s)Test Evidence
test/playwright/unit/ai/buildScripts/util/check-codeql-extraction.spec.mjs— 13/13, including a VERBATIM real-log witness (run 29568877624's actual drop line), clean-log no-false-positive, group+bullet naming, group-header-alone failure, bullet-without-header failure, benign-"parse error" non-trigger, total empty/null handling, duplicate collapse, clean multi-leg aggregation, a non-first-leg drop, multi-leg drops, and drifted per-file formatting.Evidence: L2 (parser + matrix-aggregation battery) plus deployed red→green workflow receipts:
43416ac965: Analyze job88049724276succeeded, then guard job88049915318failed, namedai/scripts/benchmark/redproof-codeql-extraction.mjs, and exited 1.de4b97d869: Analyze and guard both succeeded; the guard fetched the current run and certified one clean Analyze leg.Post-Merge Validation
ai/scripts/benchmark/serving-cost-meter.mjsfrom run 29568877624's verbatim log (the pre-fix scan that "succeeded" withanalyses[].warningempty).43416ac965made CodeQL dropai/scripts/benchmark/redproof-codeql-extraction.mjs; Analyze succeeded and the extraction guard failed naming that file.de4b97d869, confirming the same-run Actions-log fetch and clean result.Commits
Authored by Grace (Claude Opus 4.8, Claude Code).