fix(claude-review): count only reviews that ran (A2: repoint + gate flip) - #389
Conversation
…lip) Second half of ci-workflows#363's remediation, the A2 of the A1/A2 composite delivery shape: the A1 change landed the outcome composite's `review-ran` output and `class=skipped-validation` emission unreferenced; this commit repoints the review lane's outcome-composite pin at that change's merge SHA and flips the two consuming gates in the same commit — the pairing that cannot be split, because a gate reading `review-ran` against a pin that predates it evaluates false on every run and silently skips the step it guards. - The review-count upsert and the stale-failure-comment clear now gate on review-ran == 'true' instead of review-failed == 'false' (finding 2): a validation skip is "not failed" but reviewed nothing, so it must not increment the "Claude has reviewed this PR N times" comment, charge the max-reviews-per-pr budget, or clear a failure warning it did nothing to resolve. - New wiring test pins both ends of the seam: the two gate conditions, and the rule that every consumed steps.review-outcome output is declared by the composite — against the working tree always, and against the pinned revision when the object is reachable in the clone (a shallow CI checkout skips that half; locally it is the guard that fails when a pin lags the gates). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HCJfVqDNYt92YRyvKUMgYW
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 2m 26s —— View job Review: PR #389 — count only reviews that ran (A2: repoint + gate flip)No inline findings — the change is narrowly scoped and I confirmed the two things that actually matter for correctness: 1. Pin repoint is sound. 2. Gate flip logic is correct by the composite's own contract. Per 3. New wiring test ( What I could not independently verify: I don't have CLAUDE.md alignment: no security-lane-relevant surface touched (no trigger/permissions/pin-layer/secret changes beyond the documented SHA repoint), consistent with this repo's review-lane split — left to the security lane, which has nothing to flag here anyway. Nothing to fix. This is a precise, well-justified two-line-logic change with matching test coverage. |
|
Claude finished @kyle-sexton's task in 1m 11s —— View job Security review complete
No security issues found. This PR is a scoped, low-risk change: it repoints one What I checked, beyond zizmor's lane (unpinned actions, dangerous triggers, permission grants, template injection in
Nothing to flag at CRITICAL, IMPORTANT, or SUGGESTION severity. |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…ion ledger (#390) Advances the Phase 4 tag `[DOING]` → `[DONE]` and appends a dated close-out amendment dispositioning every item in the 2026-08-06 REMAINING list — kept verbatim above it as the historical record. Dispositions recorded (each with its authority): - #364 shipped via #385 (`bcf48a0`) — routing label + idempotent escalation marker with repair path - #363 shipped via #387 (`7415d4e`, A1) + #389 (`9f9757e`, A2) — skipped-validation visibility, count/stale-clear gating, marker copy, wiring tripwire; security-lane variant tracked in #388 - Both #238 spec conflicts adjudicated (operator-delegated, 2026-08-07): supersede-not-reopen; three-clean-cycles close - Multi-repo shape waived; caller-side `class=runner` emission deferred with provisioning#215's trigger (operator-authorized recommendations) - #1327 comment-closed; #228/#238 closed with pointers — SC4 met - Canary deferral rehomed into the ledger (re-evaluate 2026-11-06 + three triggers), per its own the-moment-#228-closes rule - Secret-visibility hardening item retired: operator keeps `CLAUDE_CODE_OAUTH_TOKEN` at visibility "all"; matches the github-iac record (github-iac#269/github-iac#270 landed, github-iac#266 closed) - Fleet repin v0.9.1→v0.10.2 done (standards #337, claude-code-plugins #1990/#1992, sandbox #3) The deliberately-untouched verbatim run-30571900637 quote (no `coverage=` field) remains untouched; the byte-pinned regions are not in this diff. ## Related No linked issue. For reference: #238, #228, #363, #364, #385, #387, #389, #388. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HCJfVqDNYt92YRyvKUMgYW --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Second half of #363's remediation — the A2 of the A1/A2 composite delivery shape. The A1 change (PR #387, merged as 7415d4e) landed the outcome composite's
review-ranoutput andclass=skipped-validationemission unreferenced; this PR repoints the review lane's outcome-composite pin at that merge SHA and flips the two consuming gates in the same commit — the pairing that cannot be split, because a gate readingreview-ranagainst a pin that predates it evaluates false on every run and silently skips the step it guards (empirically demonstrated on PR #387's own self-review run before the A1 revert, job 93087360214).What changes
claude-lane-outcome@b5d54bf…→claude-lane-outcome@7415d4e8e33564b7997763805583e5ad1b062dbe(the fix(claude-review): make a workflow-validation skip visible, and stop crediting it #387 merge SHA) on the review lane's outcome step. Only this pin moves — the freshness and marker-comment composite pins are unchanged by fix(claude-review): make a workflow-validation skip visible, and stop crediting it #387 and stay put, and the security/e2e lanes' outcome pins are deliberately left for the security lane: validation self-skip turns the REQUIRED check green with nothing reviewed #388 fail-closed work, where their repoint composes with the gating decision tracked there.review-ran == 'true'instead ofreview-failed == 'false'. A validation skip is "not failed" but reviewed nothing, so it no longer increments the "Claude has reviewed this PR N times" comment, no longer charges themax-reviews-per-prbudget on runs that reviewed nothing, and no longer clears a failure warning it did nothing to resolve.claude-security-review-fail-closed.test.cjs): newclaude-review-outcome-wiring.test.cjspins the seam from both ends — the two literal gate conditions; every consumedsteps.review-outcomeoutput declared by the composite's working-tree source; and the same check against the composite at the pinned SHA viagit show(skips cleanly on shallow clones where the pinned object is unreachable, so the tree check is the always-on floor and the pin check the deep-clone guard). Validated by construction: before this PR's repoint, the two declaration checks fail on exactly the A1-window divergence; after it, all three pass.Verification
node --test .github/scripts/*.test.cjs— 519 pass, 0 fail (includes the three new wiring tests).node --test .github/actions/claude-lane-outcome/*.test.cjs— 14 pass, 0 fail.actionlintclean onclaude-review.yml.Related
No linked issue. For reference: #363 (finding 2 delivered here; findings 1 and 3 landed via #387), #387 (the A1 half this repoints to), #388 (tracks the security lane's fail-closed decision and its own pin repoint).
🤖 Generated with Claude Code
https://claude.ai/code/session_01HCJfVqDNYt92YRyvKUMgYW