Skip to content

Let a clean follow-up review count after an earlier one found a blocker (GST-1973) - #4188

Merged
capy-ai[bot] merged 9 commits into
mainfrom
count-clean-follow-up-reviews-after-a-blocker-gst-1973
Nov 9, 2026
Merged

capy-ai[bot] merged 9 commits into
mainfrom
count-clean-follow-up-reviews-after-a-blocker-gst-1973

Conversation

@garrytan

@garrytan garrytan commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

When a granted follow-up review on a /ship pull request found a blocker, the release check refused every later follow-up review too, so a clean review of the fix never counted and the only way out was a whole new /ship review. Now a clean follow-up review that read the fix counts, which keeps the two-round review cap honest and lets a fixed pull request finish /ship without another full review. A finding is closed only by a later clean review whose range touched that finding's file.

What changed

Before: a follow-up chain where the first follow-up review found a blocker and the second read the fix cleanly printed FIX_CHECK: not counted (missing start capture or incomplete/nonconverged pass; fix-check at <A>, link 1 of 2), and finish routed the fixed files as unreviewed behavior.

After: the same chain prints FIX_CHECK: reviewed src/x.ts,test/x.test.ts (fix-check chain of 2 from <T>: at <A> grant <g1> (found issues); at <C> grant <g2>) and finish routes those files as reviewed.

Also fixed (5d126e0): a blocking finding an earlier link logged on a file no later clean link's range touched (a file the branch never changed, a doubled ./ spelling, or a directory) used to drop out of routing, and the chain still counted. Now finish refuses that chain with FIX_CHECK: not counted (a finding on <path> that no later clean fix-check's range touched; fix-check at <A>, link 1 of 2).

Why

GBRA-386 hit this on gbrain #8881: a granted follow-up review found a blocker, the fix was read cleanly by the next one, and finish still refused, so the pull request needed a third full review past the two-round cap. A link that found issues is logged converged:false by design, and finish treated that as a broken chain. After the first /ship here, a cross-family read of the decision trail found that the new counting could close a blocker no later review had read, so this head adds that refusal.

Summary

A follow-up review that finds issues still has to be logged as not converged, and finish used to refuse any chain holding one. Now an earlier link that found issues joins the chain when it finished its read on its own commit, its findings account for its counts, and every open or blocking finding names a file at that commit. That link counts no file itself, a file its findings name counts only through a clean link after it, and every such file must sit in some later clean link's range or the chain is refused, so a blocker is closed only by a review that read the fix. Contiguity, one grant per link and a clean newest link are unchanged. Review fixes during /ship made finding paths written with a leading ./ match git's paths and added refusal tests for an over-claimed critical count and a finding on a missing file.

Blast radius

The change is inside fixChecked() in lib/ship-release.ts, which only finish calls, plus two helpers now exported from lib/review-scope.ts with no behavior change. Every new acceptance path is fenced by the existing contiguity, grant and newest-clean-link checks, and the new coverage refusal only removes acceptances. The 11 tests in test/ship-finish-fixed-links.test.ts drive the real release script through those refusals (script ran); the new one fails at 6c5a763 and passes at 5d126e0.

Test Coverage

Step 7 coverage audit from the first /ship (audit only, at 395108e): 9 of 13 changed paths covered (69%). Pass 1's fix closed three of the four gaps it named; the ruled-note positive case stays a gap. The 5d126e0 fix carries its own failing-first test (three inputs: a file the branch never changed, ././src/x.ts, and a directory). The Step 7 reader was not rerun at this head.
Tests: 10 → 11 in test/ship-finish-fixed-links.test.ts.
Tests ran: focused 212 (at 5d126e0, reused at b67185f: diff confined to the changelog fragment)
Tests ran: test (carried from CI at the pushed head; see the receipt)

Pre-Landing Review

Pass 1 (full panel: specialists, red team) found two informational items and fixed both. Pass 2 (full panel on the fix range) found nothing blocking. Step 11's native adversarial reader raised four low items, none blocking, and the outside voice (openai/gpt-6.1-sol) was clean.
Granted fix-check (review_loop_exception a-d47461e52d91, the one exception on this PR) over 395108e..5d126e0: one full-effort reader on the fix's hunks, callers and test results, plus the changelog-fragment commits on a follow-up. 4 informational, 0 blocking, nothing fixed. finish counts it: FIX_CHECK: reviewed lib/ship-release.ts,test/ship-finish-fixed-links.test.ts (fix-check at 5d126e03afe9, range from 395108eb01ff, grant a-d47461e52d91).
Pre-Landing Review: 4 issues — 0 auto-fixed, 0 asked, 0 deferred, 4 noted
Gate edits: none detected (GATE_SCAN tagged=0)
Outside review: clean (openai/gpt-6.1-sol, completed, first /ship).

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/ship-release.ts:319 (fix-check) when git cannot diff a later clean link's range, the chain now refuses as "a finding on that no later clean fix-check's range touched" instead of the old "git could not diff the fix-check range" stop. It still fails closed; only the diagnostic changes.
  • INFORMATIONAL lib/ship-release.ts:319 (fix-check) coverage is per file, so a blocker on a.ts fixed in b.ts now refuses where it used to count; the way through is a ruled note or a fresh review. Intended.
  • INFORMATIONAL test/ship-finish-fixed-links.test.ts:204 (fix-check) the new test matches any not-counted reason at link 1; pinning the reason text would tie it to the guard it is named for.
  • INFORMATIONAL changelog.d/…-gst-1973.md:4 (fix-check) the fragment was one rule short; fixed in Step 13 at b67185f.
  • INFORMATIONAL (adversarial, first /ship) a finding reported on an unchanged caller names the caller, not the cause file; a policy question.
  • INFORMATIONAL (adversarial, first /ship) backslash rewriting can spuriously refuse a POSIX path that really contains a backslash; fails closed.
  • The first /ship's two red-team notes (a repeated ./ prefix and a directory path) are now refusals, covered by the new test.

Exploratory QA

No UI or runtime surface changed; the exploratory charters do not apply. The release script was exercised end to end through the git fixture in the tests above.

Design Review

No frontend files changed — design review skipped.

Eval Results

No prompt-related files changed — evals skipped.

Review bot comments

No review bot comments.

Scope Drift

Scope Check: CLEAN

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches).

TODOS

No TODO items completed in this PR.

Documentation

Status: current. No documentation edits were needed in permitted files, and the remaining gaps are in protected policy docs, recorded as debt.

Scope: branch count-clean-follow-up-reviews-after-a-blocker-gst-1973 against base a229e2580642, head b67185fad394. The audit covered 6 committed files and no staged, unstaged or new files. The behavior change is in lib/ship-release.ts fixChecked: an earlier fix-check link that found issues can still join the chain, and a finding that no later clean link's range touched now refuses the chain. lib/review-scope.ts only adds exports. Fix-check references were checked across docs/, ship/sections/review-army.md.tmpl, docs/troubleshooting.md and docs/unattended.md.

Documentation health:

  • changelog.d/count-clean-follow-up-reviews-after-a-blocker-gst-1973.md: Current. It describes the new counting and the new refusal.
  • docs/ship-policy.md: Updated on the branch for links that found issues. The new refusal is missing (protected here, not edited).
  • docs/review-policy.md: Stale wording (protected, not edited).
  • docs/troubleshooting.md, docs/unattended.md, ship/sections/review-army.md.tmpl: Current. They don't describe chain-counting rules.

Coverage map: The new behavior has reference coverage in docs/ship-policy.md#fix-check-chain and the changelog. The (found issues) marker on the FIX_CHECK: line has reference coverage only. There is no how-to or troubleshooting entry for the new refusal reason (common gap).

Documentation debt (follow-up PR):

  • docs/ship-policy.md, fix-check-chain paragraph: name the new refusal a finding on <path> that no later clean fix-check's range touched.
  • docs/review-policy.md (~L729–736): change 'When every link is a completed clean read' so it says the newest link must be clean and earlier links may have logged findings that a later clean link covers.
  • Optional: a docs/troubleshooting.md entry for the new FIX_CHECK: not counted reason.

Diagram drift: none. No diagrams reference the changed code.

The first docs attempt (d2) added the refusal sentence to docs/ship-policy.md; it was not kept, because that file is code-class policy and an edit after the granted fix-check would have needed another review. It is listed above as debt.

Test plan

  • focused lane (12 ship-finish, ship-release, review-loop, review-scope and ratchet test files): 212 pass, 0 fail at tree 8bb8e1808677
  • bun run test: carried from CI free-tests run 42568980075 at b67185f (1650 files)
Agent notes

Refs GST-1973, GBRA-386, gbrain #8881

Approvals

Approved: yes (record r-a045393eb32a). The full approval record stays private: this repository is public or its visibility is unknown.
Plan: exempt: bug fix
Plan check: exempt bug fix

REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=6 fixed=2 scope=frozen unbound=3 ledgers_read=4 fix_checks=1 dispatches=8
Review loop exception: one granted fix-check (a-d47461e52d91) over 395108e..5d126e0; 0 blocking.
Gate edits: none detected (GATE_SCAN tagged=0)

{
  "schema_version": 1,
  "pr": 4188,
  "head": "b67185fad394d2b4c433e445650b0febada71c9d",
  "version": "1.98.0.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 212,
      "fail": 0,
      "skip": 0
    },
    "test": {
      "pass": 1650,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 42568980075,
      "attempt": 1,
      "tree": "8bb8e180867754be55e6b87038212f9685689b55"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "8bb8e180867754be55e6b87038212f9685689b55",
  "product_patch_id": "4dcf880a6227e58c5e21de1f365ef29f7836156d",
  "gstack_version": "1.98.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 61,
    "rules": "66e5174161eecc2c",
    "base": "10fc9b1eab44bc5bb5422bcb3f2f68d3dd381659",
    "registry": "10fc9b1eab44bc5bb5422bcb3f2f68d3dd381659",
    "gate_scan": {
      "tagged": 0,
      "head": "b67185fad394d2b4c433e445650b0febada71c9d"
    },
    "reasons": [
      "gate-class",
      "runtime=61"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @8bb8e1808677 (8 checks, current for b67185fad394)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42568980075/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=8bb8e1808677 tests=36657 skipped=89 runs=42568980075/1 profiles=ci-reuse/free-tests heads=b67185fad394 verified=2026-11-09T06:21:58.054Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "README.md, changelog.d/ and docs/ (174 files); debt: docs/ship-policy.md refusal sentence and docs/review-policy.md chain wording, both protected policy docs left for a follow-up"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 6,
    "fixed": 2,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "ledgers_read": 4,
    "unbound": 3,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  }
}

garrytan and others added 4 commits November 9, 2026 02:36
…es (GST-1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… link read (GST-1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s in the test-only ratchet (GST-1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 9, 2026 04:05
…refusal guards (GST-1973)

Review-Finding: p1b/specialist-batched#1 reader=testing
Review-Finding: p1b/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…GST-1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review November 9, 2026 04:45
garrytan and others added 2 commits November 9, 2026 04:54
…rlier finding's file (GST-1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…now refuses the chain (GST-1973)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant