Skip to content

A second review round reviews a gate-class fix instead of reporting done (GST-3187) - #4520

Merged
capy-ai[bot] merged 5 commits into
mainfrom
round-2-review-runs-after-a-gate-fix
Nov 19, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
round-2-review-runs-after-a-gate-fix

Conversation

@garrytan

@garrytan garrytan commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

/ship's second review round now reviews a fix that touched a gate-class path, instead of reporting done with nothing read.
A plan told "nothing was fixed" while the branch has new commits since the reviewed head now refuses with review_required_no_readers rather than printing done.
Nothing to do: the next /ship picks it up.

What changed
  • Gate-class fix counts as a fix. After a full pass, gstack-review-plan --last full --touched-gate with no other fix flag planned done ("the step applied no edits"). The full-pass loop now counts --touched-gate as a fix, as the light review loop and the step after a follow-up check already did, so it plans a full pass on the range (or the owner stop at the round cap).
  • Fail closed on unreviewed commits. With --last full, no fix flag, and a readable --range-base range holding the PR's own new commits, the plan exits 3 with the review_required_no_readers outcome (new row in lib/gate-outcomes.ts, section in docs/troubleshooting.md). gstack-review-dispatch pass stops on it before creating any reader. Exempt: --post-review and the --targeted-ran read, which plan their own post-loop edits.
  • Dispatch reads only its own flags. gstack-review-dispatch read its flags across the whole argument list, including the review-plan flags after --. A pass with no --pass of its own took the plan's --pass 1 as its pass id, and a plan flag such as --audit-only switched dispatch's mode. Its flags now come only from before --, for every subcommand (pass and render are the two that take a -- tail).
Why

A round-2 /ship on garrytan/gbrain#9799 (gstack 1.101.0.0) passed --pass 1 --last full --touched-gate and got PASS: none next=done. It was first reported as dispatch eating the plan's --pass. That run's own debug call shows the planner did receive --pass 1; the pass=0 lines came from calling the planner directly with --pass=1, which it doesn't parse. The collision is real but did not cause that run, so both are fixed here.

Tests
  • test/review-round2-plan.test.ts (new): the exact round-2 shape the Capy pass program builds, with and without --range-base over a committed gate fix; dispatch never taking its flags from after --; the review_required_no_readers refusal from the plan and from dispatch; negative controls (no commit since the reviewed head is still done; a flagged fix still plans its review). 5 of 6 fail on main f13dbb0, and the negative control passes on both.
  • Review-depth no-loss replay GST-3187: the GST-967 1,440-case grid and the GST-972 grid keep main's hashes with the 30 changed cells read back as main's plan. Every changed cell is last=full with --touched-gate as the only fix flag, and each moves from done to a review step or the owner stop (20 full passes, 9 owner stops, and 1 run of the adversarial and second-model reviewers before its stop). lib/review-depth.ts is repinned under that replay.
Agent notes

GST-3187. Lane GSTA-645 for GStack Minder. Decision trail: captain drive reports/GSTA-645-decisions.tsv.

REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=4 fixed=1 scope=frozen open=1 dispatches=8
Ruled note: lib/review-targeted-delta.ts:35:outside-voice at 59626ee ruled by Captain GStack Minder (GSTA-36) at 2026-11-19T12:29:41.901Z: pre-existing path-quoting mismatch in targetedPatchId(); fails safe with exit 3 and a refusal; only non-ASCII paths; fix goes to the Captain's small-fix batch (approval a-1310d17175d8)
Gate edits: none detected (gate scan tagged=0 at 5cba456)
Plan: exempt: bug fix (R65)

Review: full panel, 2 of 2 rounds. Round 1's red-team finding (any --targeted-ran value skipped the refusal) was fixed in 59626ee. Open notes, all below the blocking floor:

  • p2/specialist-batched#1: the plain-docs carry exemption has no positive test of its own (the round-2 red-team probe showed it works).
  • p2/adversarial-native#1: a matching --targeted-ran still exempts runtime commits only the targeted reader read; this predates the PR and is a policy question.
  • p2/adversarial-native#2: the refusal also fires at runtime_lines=0 (docs-only commits with no fix flag); a carry masks it; suggested change is > 0.
  • p2/adversarial-native#3: same gap as docs: add README and CLAUDE.md #1 from the adversarial reader.
    After review: one docs row in docs/review-policy.md#transitions under grant a-425e3ed277c8, read clean by one scoped reader (anthropic/claude-opus-5-5).

SHIP_RECEIPT: pr=4520 head=5cba4569a999 version=1.101.0.0 base=main session_kind=unattended depth=full passes=2 blocking_found=1 deferred=0 rounds=2 dispatches=8

{
  "schema_version": 1,
  "pr": 4520,
  "head": "5cba4569a999ba554c1d592eb0bbd395f0b8ef2a",
  "version": "1.101.0.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 754,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "run": "ship-4520",
  "head_tree": "e44740101267b0902d2f498b76d6ac2995023c0b",
  "product_patch_id": "ab825267c156d7e6a20188b613596fb0c390cbba",
  "gstack_version": "1.101.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 34,
    "rules": "1afa38a4be3b5eef",
    "base": "55aaa6c4a5dff86e02d9bf9bfc7557c491f98a37",
    "registry": "55aaa6c4a5dff86e02d9bf9bfc7557c491f98a37",
    "gate_scan": {
      "tagged": 0,
      "head": "5cba4569a999ba554c1d592eb0bbd395f0b8ef2a"
    },
    "reasons": [
      "gate-class",
      "runtime=34"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @e44740101267 (8 checks, current for 5cba4569a999)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44528021267/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44528021313/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=e44740101267 tests=37921 skipped=89 runs=44530170131/2 profiles=ci-reuse/free-tests heads=5cba4569a999 verified=2026-11-19T13:24:39.934Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/review-policy.md #transitions row (owner grant a-425e3ed277c8); docs/troubleshooting.md anchor checked"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 4,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "ruled_notes": [
    {
      "finding": "lib/review-targeted-delta.ts:35:outside-voice",
      "head": "59626ee87078c6a72804c60409d8dd438259d89e",
      "by": "Captain GStack Minder (GSTA-36)",
      "reason": "pre-existing path-quoting mismatch in targetedPatchId(); fails safe with exit 3 and a refusal; only non-ASCII paths; fix goes to the Captain's small-fix batch",
      "at": "2026-11-19T12:29:41.901Z",
      "approval": "a-1310d17175d8"
    }
  ],
  "gate_dispositions": []
}
{"head":"59626ee87078c6a72804c60409d8dd438259d89e","run":"ship-4520","status":"started","review_loop":{"passes":2,"blocking_found":1,"deferred":0,"noted":4,"fixed":1,"scope":"frozen","rounds":2,"dispatches":{"specialist":6,"red-team":2}}}
{"head":"59626ee87078c6a72804c60409d8dd438259d89e","run":"ship-4520","mark":"stop","tree":"f0d65e3e9fbbf971e831850305d7891a2810eb1d"}

garrytan and others added 2 commits November 19, 2026 10:27
… reporting done (GST-3187)

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

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

trunk-io Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 19, 2026 10:49
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… unreviewed commits (GST-3187)

The review_required_no_readers refusal was skipped whenever --targeted-ran was present. It now skips only when the targeted read covers HEAD or the change since it is plain docs or release stamps the targeted record carries.

Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…sal (GST-3187)

Docs-only follow-up from the /ship documentation audit, under owner grant a-425e3ed277c8.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 45e6d54 into main Nov 19, 2026
103 of 105 checks passed
@garrytan garrytan mentioned this pull request Nov 19, 2026
capy-ai Bot added a commit that referenced this pull request Nov 19, 2026
- `gstack-artifact validate` no longer passes a run.json that gstack-autoplan never wrote. (#4494)
- /ship's changed-number check no longer stops on tests that only share a word with the change (#4478). (#4496)
- On Capy, /ship no longer edits or comments on pull requests as you. (#4518)
- The destructive-command check stops asking about scratch deletes and catches the real damage it used to miss. (#4513)
- The destructive-command check reads commands more carefully, closing gaps found after the last release. (#4525)
- The Codex readiness check and the second-model review now pick the same model for a custom Codex provider (GST-3089). (#4491)
- gstack's Codex hooks work when your Codex folder's path has a `(`, `&` or other shell character in it. (#4528)
- Uninstalling gstack keeps your own Codex hooks trusted. (#4528)
- Codex hook setup matches Codex more closely. (#4528)
- On Windows, setup copies the Claude Code hook code that gstack's Codex hooks import (#4528)
- /review's checklist on Codex reads shell commands more carefully. (#4528)
- On Codex, gstack now suggests the right skill for a prompt and stops destructive commands before they run. (#4512)
- On Codex, /review is now held once when it tries to finish without its adversarial pass or its report, as it already is on Claude Code. (#4522)
- On Codex, gstack's skill suggestion now names the skill the way Codex lists it. (#4523)
- On Codex, gstack's suggested prompts and docs now name skills the way Codex lists them. (#4524)
- /review on Codex with gpt-6.1-sol is no longer held back for a second-model pass it already ran. (#4526)
- On Codex, office-hours, plan-design-review and gstack-upgrade work again when you name them. (#4510)
- gstack knows when Codex is running unattended. (#4510)
- Codex reviewers start with a clean context. (#4510)
- Docs no longer say Codex has no hook support. (#4510)
- A command whose output was cut off no longer counts as a finished read. (#4492)
- A folder marked as published data can no longer hide source code or agent files from /ship's review. (#4516)
- Correction to the on-by-default helper hooks entry: the hook still routes only to /review, /qa and /verify, so skills you've installed yourself aren't suggested yet. With gstack's skills it routes 14 of 60 real bug reports (was 17), and long prompts are no longer skipped. (#4505)
- /sync-gbrain's read check now works when the first page in your code source is over 64 KB. (#4497)
- Free-suite CI no longer fails before any test runs when Ubuntu's package mirror is slow. (#4530)
- Syncing a second repo no longer makes the first one ask for /sync-gbrain again. (#4532)
- gstack's helper hooks are now on by default in Claude Code, OpenClaw and Hermes, and the prompt-routing hook fires on real bug reports. (#4503)
- `gstack-pregate clear --receipt` accepts a remote gate run from before a merged release when the release only regenerated a declared release output. (#4483)
- The second-model review now keeps the reviewer's own result, and reports a used-up budget as a budget stop. (#4515)
- When the reviewer wrote its review to the result file it was asked for, Codex then replaced that file with its short closing message ("Done, I wrote the review"), so the review was thrown away and reported as missing its markers. (#4515)
- When the provider refuses the call with HTTP 402 Payment Required (usually a metering proxy that hit its allowance, or an account out of credits or quota), gstack used to record only "exit 1". (#4515)
- The pre-commit /verify check now fails a check that times out, and its checks share one time budget (GST-3201). (#4527)
- /ship's review collector no longer reads a reviewer's own scope list or list of passed checks as findings (GST-3201). (#4527)
- Merge-queue stack tests fail when git cannot list a PR's added test files (GST-3201). (#4527)
- /ship can now review results PRs that publish raw session data. (#4511)
- /ship's review pass works when the checkout you ship isn't the project's default checkout. (#4507)
- A second review round no longer reports done when nothing was reviewed. (#4520)
- The prompt-routing hook now suggests skills you install yourself, and no longer sends ordinary bug reports to /qa (GST-3123). (#4506)
- gstack's script runner and merge-queue checks now also refuse cut-off output. (#4502)
- A failed second-model review reports the cause that actually stopped it, and the runner never deletes its own prompt. (#4519)
- `gstack-ship-queue ready` now fills in the trial merges and the second-model trail read instead of printing lines to fill. (#4529)
- Five small ship-tool fixes. (#4529)
- A ruling the owner gives while a `/ship` run is open can be relayed. (#4529)
- /ship no longer kills a working test run as stalled when the test command starts its workers in their own session. (#4533)
- /ship no longer stops a review because the state-machine reader started its reply the way its instructions say. (#4504)
- When Claude Code runs /verify right before a commit, it now gets a quick check instead of the full fix loop (GST-3150). (#4508)

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