Skip to content

Review and ship tools: read Codex numbered severities, check Remote Control sessions, see every worktree - #4681

Merged
capy-ai[bot] merged 8 commits into
mainfrom
fix/outside-review-ship-tooling
Nov 22, 2026
Merged

capy-ai[bot] merged 8 commits into
mainfrom
fix/outside-review-ship-tooling

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Five fixes from outside reports. The too-large-diff fix line now suggests only folders the policy can exclude, Codex findings written as ### 1. High keep their severity, /autoplan's report check runs in Remote Control sessions, /ship's version picker sees all worktrees, and PR before/after images use the real base.
Why: each reproduced on main with a failing test and gave a wrong answer.
Nothing to do after merge.

What changed, per report
Report Repro on main (c2b4f0d) Fix
PR #4231, part 2 (@larsonthune) ### 1. High — title and ## 2. Critical — … give no severity: 3 of 4 new cases fail. lib/outside-review-result.ts: a label may start with a heading and then a bullet or number. A "high-level" prose control stays unlabelled.
#4298 (@exGeni) A journal whose root is a system/bridge_status record gets unrecognized_shape:preamble:system:bridge_status and enforcement is skipped. lib/claude-journal-records.ts accepts that one record (null parent, no message) above the first turn, like a SessionStart attachment. A second null-parent prompt next to it still denies as competing_root.
PR #4196 (@vilano93) A worktree at ../elsewhere/wt1 holding a higher VERSION: siblings: []. bin/gstack-next-version adds git worktree list --porcelain to the workspace_root scan, compares real paths, and skips its own top level. workspace_root: null still disables it.
#4369 (@exGeni) A 2.38 MB reader diff (2.03 MB of code in src/, 0.35 MB of docs) prints "land src/**"; after that policy lands, it excludes 0 files and the line asks for src/** again. suggest() in lib/review-exclude.ts ranks folders by the bytes of files a policy could exclude, judged by path (data, logs, docs, binary assets; never code or tests), and suggests nothing when those cannot reach the ceiling, so the line says split the PR. Patterns already in the base policy are never suggested again.
PR #4141 / #3733 (@szsunyuan) With origin/HEAD → feature, the default base is the feature head, so before and after match. lib/pr-shots.ts uses the shared default-base resolver, then falls back to main, then master.

Not taken from PR #4231: part 1, which lets a quoted declaration inside the publication no-op stand in for the phase report. It loosens a check that exists to prove the report was written, so it needs its own decision.

Security read
  • Process spawning: gstack-next-version now runs git worktree list --porcelain and git rev-parse --show-toplevel through its existing runCommand (argument array, no shell, 15 s timeout). Paths are only read with stat and git -C, as the existing scan already did.
  • gstack-pr-shots now calls the shared default-base resolver, which may run gh pr view (5 s timeout) and git ls-remote against the configured remote, as the /ship gates already do.
  • The /autoplan guard change is stricter: a session that was "not verified" is now verified. No shape main denies becomes allowed.
  • No CI, install, dependency or auth change. Outside PRs were read as text only and rebuilt on main.
Review notes (14, none blocking; 5 shipped as notes by ruling)

Second-model review findings marked as blocking, each ruled a note by the reviewer's owner:

Ruled note: lib/pr-shots.ts:75:outside-voice at e91936b ruled by GSTA-36 (relayed from GSTA-36:2026-11-22T10:57Z) at 2026-11-22T10:57:51.191Z: Screenshot-only and it fails loudly: the tool refuses with a message asking for --base instead of rendering; no data loss, noted for a follow-up. (approval a-6e4f721d3c2a)
Ruled note: bin/gstack-next-version:433:outside-voice at e91936b ruled by GSTA-36 (relayed from GSTA-36:2026-11-22T10:58Z) at 2026-11-22T10:58:13.095Z: Not a regression against main: main reads sibling VERSION files with the same unbounded read; this PR only adds git-linked worktrees to that set. (approval a-9c8b9e5dad6b)
Ruled note: lib/claude-journal-records.ts:385:outside-voice at e91936b ruled by GSTA-36 (relayed from GSTA-36:2026-11-22T11:22Z) at 2026-11-22T11:22:10.741Z: Not a regression against main: main let every bridge_status session through unchecked (an advisory), so a competing bridge root was never checked before either. (approval a-112a19f9ebbc)
Ruled note: bin/gstack-next-version:415:outside-voice at e91936b ruled by GSTA-36 (relayed from GSTA-36:2026-11-22T11:22Z) at 2026-11-22T11:22:11.133Z: Not a regression against main: main never scanned linked worktrees outside the Conductor layout, so quoted paths there were missed before too. (approval a-5c08ffab4dba)
Ruled note: lib/pr-shots.ts:77:outside-voice at e91936b ruled by GSTA-36 (relayed from GSTA-36:2026-11-22T11:22Z) at 2026-11-22T11:22:11.550Z: Screenshot-only regression C excepted: a default branch named with + falls back to main or master, or refuses; noted for the #4402 follow-up. (approval a-390d85e69f31)

Below the blocking floor, recorded and not fixed in this PR:

  • lib/review-exclude.ts:667 (raised three times) The folder suggestion still counts files the policy keeps, such as config JSON under a data folder and files under .github/ or .gstack/, so it can suggest a folder that excludes nothing. Advice only; the ceiling itself is still enforced.
  • lib/review-exclude.ts:686 When patterns are already active, the "this gets under the limit" estimate still counts their bytes.
  • lib/pr-shots.ts:73 The default-base lookup can now run gh pr view and git ls-remote (5 s timeout each), so an offline run can take up to about 10 s longer.
  • bin/gstack-next-version:410 Every linked worktree is scanned with two git calls each; a hung path can slow version picking, and recent scratch worktrees can hold version slots (no collision, possibly skipped slots).
  • lib/outside-review-result.ts:169 A section heading like ### 2. High (overview) can now read as a High finding; the bullet form already had this risk.
  • lib/claude-journal-records.ts:291 The bridge-record fix assumes the record carries a cwd; if real records lack it, the session is refused as before (fails safe).

Gate edits: none detected (8 listed, 3 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Documentation

Status: current. No documentation edits were needed for this branch.

Scope: commits 094263d..e636f03 (13 files: bin/gstack-config, bin/gstack-next-version, bin/gstack-pr-shots, lib/review-exclude.ts, lib/pr-shots.ts, lib/outside-review-result.ts, lib/claude-journal-records.ts, the tests, and one changelog.d fragment). There were no staged, unstaged or untracked changes. The audit searched the repository's Markdown and templates for every changed public surface.

Documentation health:

  • docs/troubleshooting.md: current (REVIEW_DIFF_TOO_LARGE and PR_SHOTS_INPUT_NOT_FOUND match the new behavior)
  • docs/ship-policy.md: current (the review ceiling section)
  • docs/review-policy.md: current
  • landing-report/SKILL.md.tmpl: current, with one minor label left as debt
  • bin/gstack-config (inline workspace_root docs): already updated on the branch

Coverage debt: the widened worktree scan in gstack-next-version has reference coverage only, in the gstack-config comment and the changelog fragment. The landing-report label 'Sibling Conductor worktrees' undersells it. The Codex numbered-heading severity fix and the autoplan bridge_status fix are internal and need no docs.

Diagram drift: none.

Issues

Fixes #4298
Fixes #4369
Fixes #3733
Refs #4141
Refs #4196
Refs #4231
Refs #4402
Refs #4681

Agent notes

Outside-report lane GSTA-802 (GST-3484).

Plan: exempt: bug fixes from outside reports, each with a failing-first test on main.

/ship (run ship4681b) on e91936b (tree be51090): one read-only final review, because the PR already had two review rounds on earlier heads. Panel: batched specialist, red team, native adversarial and a second-model review (openai/gpt-6.2-sol). Pre-Landing Review: 14 issues — 0 auto-fixed, 2 asked (0 fixed, 2 skipped), 0 deferred, 12 noted (5 by ruling). Head e636f03 only merges main into e91936b; this PR's own lines are byte-identical (same patch id), and CI is green there.

The #4402 run-id change was split out of this PR (it made the privacy scanner refuse imports on numbered branches) and returns in its own PR. The pr-shots default-branch cases (lib/pr-shots.ts:75 and :77) go on that follow-up's list.

A cross-family trail read (openai/gpt-6.2-sol) checked the decision trail, review rows and rulings. It found no new defect and corrected three ruling reasons, which were re-recorded with the reviewer's owner's approval.

test/pr-shots.test.ts appears to trigger Playwright's lazy browser install: its CLI capture test renders through the installed browse helper, which runs gstack-browser-ensure and downloads Chromium on first use (tracked as GST-3520). That test times out at 5 s locally, on main too, so CI is the evidence for it.

{
  "schema_version": 1,
  "pr": 4681,
  "head": "e636f038371bef51b43f965e2d8ed264c7487d5a",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 158,
      "fail": 0,
      "skip": 0
    }
  },
  "calls": 42,
  "session_kind": "unattended",
  "run": "ship4681b",
  "head_tree": "90d06a71724d356f0f4394703bdea9fb9263a3dd",
  "product_patch_id": "2da091de738b954770a26971d1a4e540e2915d04",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 114,
    "rules": "630fd3101899e28e",
    "base": "5b88fa8a00e3a76d6458f9c361b56f39be7cc7b0",
    "registry": "5b88fa8a00e3a76d6458f9c361b56f39be7cc7b0",
    "gate_scan": {
      "tagged": 0,
      "head": "e636f038371bef51b43f965e2d8ed264c7487d5a"
    },
    "reasons": [
      "gate-class",
      "runtime=114"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @90d06a71724d (8 checks, current for e636f038371b)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/45015106946/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45015106946/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/45015106918/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=90d06a71724d tests=38931 skipped=92 runs=45015106946/1 profiles=ci-reuse/free-tests heads=e636f038371b verified=2026-11-22T11:12:05.765Z"
  ],
  "issues": {
    "fixes": [
      3733,
      4298,
      4369
    ],
    "refs": [
      4141,
      4196,
      4231,
      4402,
      4681
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md and the changed bin/ help text"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 5,
    "deferred": 0,
    "noted": 7,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 1,
      "red-team": 1
    }
  },
  "ruled_notes": [
    {
      "finding": "lib/pr-shots.ts:75:outside-voice",
      "head": "e91936bfa4de39b1252d5870b722272eec9996bb",
      "by": "GSTA-36",
      "reason": "Screenshot-only and it fails loudly: the tool refuses with a message asking for --base instead of rendering; no data loss, noted for a follow-up.",
      "at": "2026-11-22T10:57:51.191Z",
      "approval": "a-6e4f721d3c2a",
      "relayed": "GSTA-36:2026-11-22T10:57Z"
    },
    {
      "finding": "bin/gstack-next-version:433:outside-voice",
      "head": "e91936bfa4de39b1252d5870b722272eec9996bb",
      "by": "GSTA-36",
      "reason": "Not a regression against main: main reads sibling VERSION files with the same unbounded read; this PR only adds git-linked worktrees to that set.",
      "at": "2026-11-22T10:58:13.095Z",
      "approval": "a-9c8b9e5dad6b",
      "relayed": "GSTA-36:2026-11-22T10:58Z"
    },
    {
      "finding": "lib/claude-journal-records.ts:385:outside-voice",
      "head": "e91936bfa4de39b1252d5870b722272eec9996bb",
      "by": "GSTA-36",
      "reason": "Not a regression against main: main let every bridge_status session through unchecked (an advisory), so a competing bridge root was never checked before either.",
      "at": "2026-11-22T11:22:10.741Z",
      "approval": "a-112a19f9ebbc",
      "relayed": "GSTA-36:2026-11-22T11:22Z"
    },
    {
      "finding": "bin/gstack-next-version:415:outside-voice",
      "head": "e91936bfa4de39b1252d5870b722272eec9996bb",
      "by": "GSTA-36",
      "reason": "Not a regression against main: main never scanned linked worktrees outside the Conductor layout, so quoted paths there were missed before too.",
      "at": "2026-11-22T11:22:11.133Z",
      "approval": "a-5c08ffab4dba",
      "relayed": "GSTA-36:2026-11-22T11:22Z"
    },
    {
      "finding": "lib/pr-shots.ts:77:outside-voice",
      "head": "e91936bfa4de39b1252d5870b722272eec9996bb",
      "by": "GSTA-36",
      "reason": "Screenshot-only regression C excepted: a default branch named with + falls back to main or master, or refuses; noted for the #4402 follow-up.",
      "at": "2026-11-22T11:22:11.550Z",
      "approval": "a-390d85e69f31",
      "relayed": "GSTA-36:2026-11-22T11:22Z"
    }
  ],
  "gate_dispositions": []
}
{"head":"25ecf51130a82d8dc7fd43888aac616681b8194c","run":"ship-4681","status":"started","review_loop":{"passes":2,"blocking_found":5,"deferred":1,"noted":7,"fixed":2,"scope":"frozen","rounds":2,"dispatches":{"specialist":6}}}
{"head":"e636f038371bef51b43f965e2d8ed264c7487d5a","version":"1.102.2.0","gstack_version":"1.102.2.0","run":"ship4681b","review_loop":{"passes":1,"blocking_found":5,"deferred":0,"noted":7,"fixed":0,"scope":"frozen","rounds":1,"ledgers_read":2,"dispatches":{"specialist":1,"red-team":1}},"depth":"full"}

Open in Capy

Numbered-heading severities from Codex reviews are read (#4231). The /autoplan
publication check accepts Remote Control's bridge_status root (#4298).
Interactive /autoplan approvals import under their own run id (#4402). /ship's
version picker sees every git worktree (#4196). gstack-pr-shots uses the real
base branch when origin/HEAD names the feature branch (#4141, #3733).

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

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 22, 2026 05:59
… split when it cannot help (#4369)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 4 commits November 22, 2026 06:58
Keep a clean second-model review with numbered section headings clean, and import an interactive /autoplan run under its newest run id with only that run's answers.

Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
An abandoned older interactive run in the same directory no longer marks a newer approved run as unanswered. Review exception granted by GSTA-36 for #4681.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Recording an interactive run under its own run id makes the privacy scanner refuse imports on branches whose name holds digits. That change returns in its own PR, designed around the scanner. lib/approval-record.ts, lib/plan-record.ts and their tests match main again.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot changed the title Review and ship tools: read Codex numbered severities, check Remote Control sessions, keep interactive /autoplan run ids, see every worktree Review and ship tools: read Codex numbered severities, check Remote Control sessions, see every worktree Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment