Files
gstack/crew
Garry Tanandcapy-ai[bot] e9f38d6fe1 Review a pull request's final head in full and count review rounds per PR (GST-2673) (#4360)
* Count review rounds per pull request across /ship runs (GST-2673)

/ship's two-round review cap was counted inside each run, so a pull request
shipped many times was reviewed again at every head. Step 1 now reads the
rounds the PR body's receipt history records, passes them to the review plan,
and sends later heads to the scoped re-check, with a lane or Captain round
grant for an extra round. Adds the no-loss replay preregistration.

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

* Cap full review rounds per pull request and keep fix-checks to each run

The plan counts a PR's earlier full rounds (--prior-full) against the cap of
two, as the approved plan says, and prints every earlier round as pr_rounds=.
Renames the troubleshooting anchor to pr-round-cap, lists <SESSION_ID> as a
reviewed placeholder, and leaves ship/DRIVER.md at its size cap.

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

* Point the ship driver's review pass at Step 9's plan flags, which carry the PR round count

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

* Give a pull request's final head a full review and make the diff-only re-check advice only (GST-2673)

A scoped re-check that reads only what changed since the last reviewed head
caught 22 of 24 planted faults but none of 8 real faults that full rounds had
caught, so it no longer carries a /ship receipt. A later head whose own lines
changed now gets a fresh full review, the PR's last before merge; a PR already
at two full rounds gets one read-only full review with no fix round, whose
blocker goes to the lane's Captain. carry prints RECHECK: advisory and refuses
--recheck. The drift threshold, the re-check blocker count and the
design-change grant kind are removed with the route they fed.

Repins lib/review-depth.ts and ship/sections/review-army.md under replay
GST-2673 (docs/evals/pr-round-count-results.md; deterministic grid against
main: 196,608 of 196,608 plans identical with no prior rounds).

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

* Keep a review round grant usable through its fix round and after a read-only review

A grant now holds after the fix round's commits move HEAD past it, counts only the rounds earlier heads spent, and a receipt written without a run keeps other runs' stubs.

Review-Finding: p1/specialist-batched#1 reader=state-machines
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Count every review round at a granted head again, so a grant can't reset the count

Reverts the history change that skipped rounds recorded at a round grant's head: the run that hit the cap is recorded at that same head, so skipping it wiped the count. A grant recorded after a read-only review still doesn't buy a fix round (fails closed).

Review-Finding: p2/adversarial-native#1 reader=adversarial-native
Review-Finding: p2/outside-voice#1 reader=outside-voice
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>
2026-11-17 08:39:43 +00:00
..

gstack on Capy

This folder holds the parts of gstack that only Capy crews use: the tools that run a crew of coding agents under a Captain. It stays in the public repo, but ./setup loads it only on a Capy machine. Anywhere else, setup skips it and gstack works exactly as it does without it.

What Capy users get on top of gstack

  • Captains. /captain runs many agent threads from one controller: lanes send a READY block and never merge, the controller keeps the digest, relays approvals in a fixed shape and runs a daily flaky-test pass (docs/captain.md).
  • A merge queue. gstack-ship-queue lands verified pull requests alone or in trains, checks the exact head before it merges, and stamps the version only at release time.
  • Receipts. /ship leaves a receipt for the head it checked, so the controller can tell that a pull request was reviewed and tested at the commit it merges.
  • Budgets. /ship and /autoplan meter their own spend against the cap a brief sets, and stop or hand off before they cross it (docs/ship-budget.md).

How the whole factory fits together: capy/README.md.

How it is loaded

A Capy machine is one where CAPY_MACHINE_CONFIG is set (cloud machines) or ~/.capy exists (cloud machines and paired devices, such as a Mac running Capy). Any ~/.capy counts, so when it is unclear the crew skills install rather than a Capy user losing /captain. gstack_on_capy in bin/gstack-install-registry.sh is that test, and GSTACK_CREW_SKILLS there lists the crew skills. On a Capy machine setup and gstack-relink register them like any other skill; elsewhere they get no entry on any host, and an entry an earlier install made is removed.

On Capy the session launch file (bin/gstack-capy-install) also puts crew/bin/ on PATH, so the crew commands keep their bare names there. Public CI runs crew/test/ with the rest of the free suite.

What is here

Path What it holds
bin/ gstack-release-gate (the paid gate on main every 8 hours) and gstack-coauthor-trailers (credit for contributor lines a rewrite carries over)
lib/ merge trains and waves (ship-queue-train*, ship-queue-wave, the land lock, screens, rechecks), the release gate, version-gate trains and lane ownership
scripts/ the release cut and its daily check (release-cut, release-cadence), and the paid-eval CI steps only our crews run (train gate and backstop, gate cost, gate reuse, receipt recovery, census arms, judge calibration configs)
test/ their tests
docs/ the manuals: running a Captain crew and the recommended harness

The crew tooling moves here in stages. Code that no public skill calls comes first; the steps /ship, /review and /autoplan take only for crews move after they call it through one switch. Some crew tools stay outside crew/ for now because public code still calls them: /captain's own folder (the skill generator reads top-level folders), gstack-ship-queue, receipts, the pre-gate, spend caps and approvals.