Skip to content

Fix /ship review counting, cleared reviewer notes and security findings in the posted PR description (GST-3343) - #4595

Merged
capy-ai[bot] merged 6 commits into
mainfrom
review-reader-bullets-round-count-relayed-grants
Nov 21, 2026
Merged

capy-ai[bot] merged 6 commits into
mainfrom
review-reader-bullets-round-count-relayed-grants

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

/ship no longer stalls on summary notes a reviewer already cleared, counts only full review passes as rounds, records a round approval relayed during a stopped run, and keeps security findings out of the ship record it posts in the PR description.
These four bugs each stopped a real /ship run until someone edited a record by hand; the goal is unattended shipping that finishes on its own.
Nothing to do as a reader.

What changed

Four things made unattended /ship runs stop and wait for someone to edit a record by hand. Each now works on its own:

  • When a reviewer reports no blocking findings, bullets such as "noted P2 findings", "deferred P1" or "P0 or P1" are read as notes the lead lowers with a reason, instead of findings nobody can clear. A bullet that names a real open finding still blocks until judged.
  • The scoped re-read after the one fix round no longer counts as a review round in the review loop, the PR history, the pre-push check or the ship record. docs/review-policy.md says the same.
  • gstack-approvals round-grant accepts --owner-ref <thread>:<message id or time> with the owner's words while a /ship run is stopped, and records the grant as relayed from that message.
  • The ship record's list of round grants shows a security finding as its ruled public form ("README.md:515 (red-team, ruled not security class)") or as an opaque id. When a security finding stays hidden, the grant's free-text reason is hidden too, so posting the PR body no longer stops on the finding and no longer publishes a description of it.
Tests
  • bun run test (CI run 44879900936, the full free suite): 1722 files passed
  • bun run typecheck: passed locally and on a trial merge with current main
  • Focused files (test/review-ledger-scope-bullets, test/round-cap-granted-stop, test/security-finding-redaction, test/review-scope-ledger-count, test/pr-review-history, test/pr-round-cli, test/factory-scorecard, test/review-packets-removed): passed
Why

gstack's goal is that an agent can ship a pull request end to end without a person stepping in. Each of these bugs stopped a real run (a reviewer note that could not be lowered, a round count that read a re-check as a second round, a grant that could not be recorded while a stopped run still held its checkout, and a ship record the PR-description scanner refused), and each needed a hand edit to get past.

Blast radius

The changes touch the reviewer reply parser, the round counters, gstack-approvals round-grant and the ship record's grant list. Round counts are display-only, because the per-PR cap still counts full passes (prCapped in lib/review-depth.ts) and the in-run cap still reads its own re-check count directly, which two reviewers traced by reading the callers. The wider bullet match applies only inside a reply that already declares no blocking findings, and still needs the lead to lower each bullet with a reason.

Test Coverage

Coverage: 80% value-weighted (8 of 10 changed paths covered). Test value: 0 tests written by the audit (audit only), 0 rejected, 0 existing tests extended, 0 paths weakly covered.
Two gaps were noted: an old ship record with no stored round count falls back to its pass count (display only), and a relayed grant with no open run is not tested on its own.
Tests ran: bun run test 1722 files (CI run 44879900936).

Pre-Landing Review

Two full review passes ran on this PR (the second after one fix round), plus a second-model review, a native adversarial read and the targeted read for the money path.

  • Fixed: security finding, details recorded privately (raised by the second-model review and the adversarial read; fixed in 684d3b2 with a regression test).
  • Not fixed, below the blocking floor: security finding, details recorded privately (raised by three readers; recorded as a note for the owner).
  • Not fixed, below the blocking floor: two display-only notes from the adversarial read (an older ship record's stored round count can print differently in two places; status words in the bullet match are lowercase only, which fails safe).
Review notes

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

  • INFORMATIONAL lib/review-depth.ts:401 The priorRounds doc comment still says the scoped re-reads after a fix round are included; the file is no-loss pinned (GST-3238), so it was restored to its pinned bytes and the comment stays until a repin.
  • INFORMATIONAL lib/review-round-grant.ts:51 The new test does not cover a non-red-team security finding ruled not security class, which must still redact the reason.
Exploratory QA

Smoke checks ran as focused test files on the final tree, not a browser: the nine changed or related test files passed locally (121 tests before the fix round, 10 of 10 in the redaction file after it) and in CI. No browser surface changed. No plan checks were required (bug fix, no plan).

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

No plan file: bug fixes skip plan review; each fix carries a test that failed on main first.

Verification Results

No Step 8.1 obligations: no plan file.

TODOS

No TODO items completed in this PR.

Documentation

Status: current — the documentation already matches this branch; no edits made.

Scope: committed diff 0adfab9..684d3b2 (6 commits, 18 files: bin/gstack-approvals, bin/gstack-review-plan, bin/gstack-ship-receipt, five lib/ review and ship-record modules, tests, one changelog fragment and docs/review-policy.md). The working tree was clean. Docs and authored templates were searched for round-count, re-read, round-grant and --owner-ref wording.

Documentation health:

  • docs/review-policy.md: Current (updated in this branch: scoped re-reads after a fix round no longer count as rounds in review_loop.rounds, PR_REVIEW_HISTORY or pr_rounds=; documents the --owner-ref relay for round grants)
  • changelog.d/review-reader-bullets-round-count-relayed-grants.md: Current (matches the diff)
  • docs/troubleshooting.md: Current (round-grant steps still accurate)
  • docs/ship-policy.md: Current
  • crew/docs/captain.md: Current
  • ship/SKILL.md.tmpl: Current (its note that re-reads are included refers to the in-run cap table, which still counts them)

Coverage debt: gstack-approvals round-grant --owner-ref has reference coverage in review-policy.md and the CLI help, but no how-to or troubleshooting entry for the refusal while a /ship run is open (a common gap). Reviewer summary-bullet lowering (noted P2, P0 or P1) is documented only in code comments and the changelog (a common gap).

Diagram drift: none; the changed modules appear in no diagram.

Agent notes

Small-fix batch A (GST-3343), items 1, 2, 12 and 14. Item 14 is the gbrain-evals#567 receipt refusal. Item 1's HIGH-finding shape was already fixed by #4527. lib/review-depth.ts was restored to its no-loss pinned bytes (pin GST-3238) after CI's review-packets-removed check failed on the doc-comment edit.

Refs s11/adversarial-native#2
Refs s11/outside-voice#1

REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=8 fixed=2 scope=frozen dispatches=8
Gate edits: 13 listed, 10 read, 0 findings — 0 kept, 0 restored, 0 open

Approvals

No approvals recorded for branch review-reader-bullets-round-count-relayed-grants.
Plan: exempt: bug fix batch (R65); each fix carries a test that failed on main first
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4595,
  "head": "684d3b2d760b498fe7706eeacfcc9a01e15c26de",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "bun run test": {
      "pass": 1722,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "bun_run_test",
      "run": 44879900936,
      "attempt": 1,
      "tree": "f748f64cec303b03d72dbcbf8eccb3e790a39c8b"
    }
  ],
  "calls": 28,
  "session_kind": "unattended",
  "run": "ship-4595",
  "head_tree": "f748f64cec303b03d72dbcbf8eccb3e790a39c8b",
  "product_patch_id": "175b3317faf3302e84798dcb9f47bed4c8b3191c",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 67,
    "rules": "85b3923b1a978e41",
    "base": "ffdd5354b89ce42e1688c78fedfaa366f4e46fe8",
    "registry": "ffdd5354b89ce42e1688c78fedfaa366f4e46fe8",
    "gate_scan": {
      "tagged": 0,
      "head": "684d3b2d760b498fe7706eeacfcc9a01e15c26de"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "runtime=67"
    ],
    "risk": [
      "money"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @f748f64cec30 (8 checks, current for 684d3b2d760b)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44879900936/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44879900960/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=f748f64cec30 tests=38624 skipped=88 runs=44879900936/1 profiles=ci-reuse/free-tests heads=684d3b2d760b verified=2026-11-21T07:35:04.732Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md against 0adfab9..684d3b2"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 8,
    "fixed": 2,
    "scope": "frozen",
    "rounds": 2,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "b3f6f8b4843c0c30",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "175b3317faf3302e84798dcb9f47bed4c8b3191c",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  }
}

Open in Capy

garrytan and others added 3 commits November 21, 2026 06:36
…unds, and grants record during a stopped run

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

trunk-io Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 21, 2026 06:56
…matches

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

Review-Finding: s11/outside-voice#1 reader=outside-voice
Review-Finding: s11/adversarial-native#2 reader=adversarial-native
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit b281eff into main Nov 21, 2026
53 checks passed
@garrytan garrytan mentioned this pull request Nov 21, 2026
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

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