Repository navigation
fix(source-control): count an earlier review's summary finding only when it was critical or unreadable - #10850
kyle-sexton wants to merge 3 commits into
Conversation
…hen it was critical or unreadable The security lane edits one reviewed-head marker in place per head, so the gate read only the covering review's critical-findings line and counted every earlier link's summary findings as blocking. A clean incremental review then never cleared an IMPORTANT summary finding of the whole review behind it. The gate now reads each earlier chain link's critical-findings line from the marker's edit history (userContentEdits, fetched by the existing edits query), taking only revisions by the marker's author that name that link's head and were written inside its job. A missing, truncated, deleted or foreign-edited history, or no single line, still counts every finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ary count fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed Code review: PR #10850Result: no findings. I read the whole diff and the surrounding code in What I checked
Residual notes (not findings)
|
|
claude-security-review reviewed No security findings. critical-findings: 0 Scope read: the whole diff, plus Trust control: weakened merge hold. The change lets an earlier review's summary findings count as
Residual risk, not a finding:
Spend: the change adds no new API call or charge, and the GraphQL query is larger only through |
|
Unattended merge: risk HIGH at head |
|
Unattended merge: risk HIGH at head This refusal has stood unchanged at this head, so a person is needed: the pr-merge lane added the human-gated label. |
No related issue: stale security count holding #10817
Summary
The merge gate's security count held #10817 on one IMPORTANT summary finding that only the PR's first whole review reported. That review's own summary said
critical-findings: 0, and two later incremental reviews found nothing.babysit_review_evidence._open_findingsread only the covering review'scritical-findings:line, so any summary finding in an earlier chain link counted as blocking, and only a clean whole review could ever clear it. This contradictsbabysit_risk.py, where only CRITICAL security findings hold.There was a second cause. The lane edits one reviewed-head marker comment in place per head (ci-workflows
publish.cjswriteMarker), so an earlier review's summary survives only in that comment's edit history.babysit_review_evidence.pyandbabysit_merge.pyare trust paths, so a person merges this PR.Fix
babysit_merge._attach_editsaddsuserContentEditsto the GraphQL edits query it already sends. No new API call. Each edit node'sdiffholds the full body after that edit.babysit_review_evidence._marker_revisions, lists every body the lane's marker held and when it was written. An unedited marker gives one body, at its creation time.totalCountdiffers from the node count);diff;_edited_by_anotheruses)._open_findings, an earlier chain tree's summary findings count asmin(line, reported)only when exactly one review of that tree reported summary findings, and exactly onecritical-findings:line appears across two sources:_carried_blockingpasses the same input, so carried counts follow the same rule.Option chosen: recover each count from the marker's edit history. It needs no change in ci-workflows and no extra API call. The completion record and the job output carry no critical count, so the edit history is the only place the earlier count exists today. A durable per-review record written by the lane would also work, but it would mean changing the producer.
Verification
SeverityTests. A whole review with one summary finding is followed by a clean incremental review:critical-findings: 0gives 0 blocking;critical-findings: 1gives 1;critical-findings: 0case fails on origin/main and passes with the fix.python3 -m unittest discoverinplugins/source-control/skills/babysit-prs/scripts: 3425 tests OK (5 skipped).python3 -I scripts/sync-hold-floor.py --check: exit 0.scripts/run-ruff.sh checkpasses on the changed files.github-actions(Bot);critical-findings: 0line;Related
.github/actions/publish-review/publish.cjs(writeMarker,countedSummary)🤖 Generated with Claude Code