Repository navigation
feat(ship): /ship and /autoplan size their review to the diff (GSTA-131) - #3527
Conversation
…, carry pregate, autoplan round policy 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>
…/gsta131-token-efficiency
…k after below-floor fixes; cap two full passes plus one fix-check Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…registered free; resumed max_rounds case off the old default Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…own skill, Step 11.5 accepts a fix-check or a planned adversarial skip, delta carry with a pregate, carry --pregate pinned to the checkout, quiet-after-cap revise regates, skill-dir markdown and rule docs classed code, gate signals from tests class up, plan fails closed on git errors, per-class compare ratios Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ull-pass plan, Important Rules restored, ship goldens regenerated, true per-class medians, review-policy transitions and once-per-invocation voices, docs/** assets stay docs-class, CLI and fix-check binding tests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…toplan rounds Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…unattended passes (docs audit) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ost pins lowered by 2); CHANGELOG max_rounds wording Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…y: ship size cap moves to the byte ledger (+1,877 entry); CHANGELOG released entries are main's Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…owered /review pins Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… only (pregate literals heuristic) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…its --pregate siblings Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…entence colon Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS (flaky: 1 case(s) passed on their one rerun)125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $32.56 rule/judge cost | reconcile exit: 0 Profile: pr / mode Full gate restored by:
Derived dependents (scripts/pr-dependencies.ts):
Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Flaky: failed once, passed on its one rerun (rule 16)Each failed and passed on its rerun in run 40634787316 at the attempts named above. Logged for the daily flaky-fix pass in this run's Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
…dversarial skip and Step 16's TODOS rerun (screen judge repair) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…he below-floor exit at the cap, name the plan run a repeat reuses, print the native skip on outside-only plans Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…/gsta131-token-efficiency Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…n-efficiency Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ew to the diff) (#3530) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ose; a cancelled judge names what it was waiting on (GSTA-139 S3) (#3544) * fix(flaky): give the judged review and Eng prose one rule each, and name what a cancelled judge received (GSTA-139 S3) - review: Step 5.8 records an unresolved non-gate defect as open, and a repeat pass's reruns are revalidation that run after smoke expiry in the same PROBE_DIR with materialize once on the final pass (every sample of #3527's red panel 40617200857 and its rerun named one of these). Nearby prose trimmed so union, skeleton and host pins do not grow. - plan-eng-review: drop the Eng-only em-dash Voice variant so the shared Voice hoists; the Scope gate's Format precedence names em dashes (5 of 6 samples of 40634787316 named the near-copy Voice). Host size pins lowered. - llm-judge: a cancelled judge request prints llm-judge-aborted with timing, 429 waits and stream event counts (no content), so the next workflow-judge deadline (train 35 gate 40660626349) names its cause. - benchmark: the Phase 6 example no longer lazy-loads the hero image. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): earlier passes link checkpoints; only the final pass materializes (all 3 samples of the focused judge run at 1bdc4ce) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): Unreleased entry for the GSTA-139 S3 judge prose repairs Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: record llm-judge abort diagnostic as non-behavioral; abort tests wait on events, not sleeps Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: name the llm-judge-aborted line in TESTING_INTERNALS 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>
What changed
/ship's review now sizes itself to the diff, so a docs-only change costs about a quarter of what it did and a code change about 85%, with every blocking reviewer still at full effort.
Text before/after
Measured with
scripts/review-dispatch-compare.tsand measured specialist output on two captured diffs across five loop scenarios: estimated review tokens are a median 0.26x of before on docs-only diffs and 0.85x on code diffs (0.52x over all ten runs, range 0.23–0.99). Replaying #3497's history through the new carry, 3 of its 6 base merges would have skipped a full /ship.Why
Garry, 2026-10-27: "Can we get 95% of the outcome but with 50% of the token use". A /ship review sent the same specialist army, Red Team, adversarial pass and outside voice at every diff, and repeated the whole army after any fix, up to three passes. A README edit paid what a gate change paid.
Blast radius
The change touches /ship's review-army and adversarial sections, Step 1 and Step 11.5, the /review specialist prompt (one line),
gstack-ship-receipt carry, the review log's fix-check skill and /autoplan's round and scope logic. It is safe because the plan only removes dispatches by diff class and never lowers a blocking reviewer's effort, and Step 11.5 binds a fix-check or a planned adversarial skip only through a verified, CURRENT review record (script ran:test/review-log-findings.test.ts,test/ship-control-flow.test.ts).Approvals
Source: gstack-approvals record for garrytan/gsta131-token-efficiency (display only; not an approval citation).
Summary
/ship now plans its review from the diff.
gstack-review-planclassifies the change as docs, tests, code or gate and steps the loop through one transition table. A docs-only diff gets the core checklist, a gate change still gets every reviewer plus the Red Team, and a fix below the blocking floor goes to one full-effort fix-check instead of another army. The cap is two full passes plus one fix-check. Every reviewer that can block a ship stays at full effort on the lane's model; only audits and watchers drop tolight(Garry's D1).After a base merge that leaves the product diff unchanged, Step 1 dry-runs the receipt carry, runs the pregate at HEAD and carries the receipt instead of rerunning the review loop. /autoplan runs one round by default, a second only for High findings, and docs-only plans run CEO then Eng.
Test Coverage
New and extended tests:
test/review-depth.test.ts(classes, transitions, plan, Red Team and scope arms),test/review-plan-cli.test.ts(CLI, untracked and stamp-only paths, scratch exclusion, subdirectory run,--adversarial-ran,review_effort_tiers off),test/review-dispatch-compare.test.ts,test/review-dispatch-counters.test.ts,test/ship-receipt-carry-pregate.test.ts(failing-first),test/autoplan-token-efficiency.test.ts(quiet-after-cap regate failing-first, rounds, ESCALATE, docs-only, dispatch counts),test/review-log-findings.test.ts(fix-check binding),test/ship-control-flow.test.ts(decision 2 flags, 3.5, Step 11.5, Step 1 carry order).Step 7 (pass 1): 67% value-weighted coverage; the named gaps (gate scan, untracked and stamp-only detection, effort tiers, Red Team and scope arms) were then covered.
Tests ran: focused batch 3,168 passed, 0 failed, 7 skipped at 989b439; see Test plan for the frozen head.
Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=7 deferred=0 noted=6 fixed=27 scope=frozen (three fix-checks; the installed 1.91.286.0 summary predates this PR's fix_checks and dispatches counters)
Gate edits: 40 listed, 28 read, 1 finding — 1 kept, 0 restored, 0 open
lib/autoplan-budget.ts— the newopenHighgate is the approved E1 rule (a second autoplan round only for open High or Critical findings); reviewed in both full passes and the Red Team, with failing-first tests intest/autoplan-token-efficiency.test.ts.Gate integrity (every gate edit in this diff):
test/size-ledger/ship/garrytan-gsta131-token-efficiency.json; SIZE_LEDGER: ok at 330,781 bytes); the ship skeleton cap intest/helpers/carve-guards.tsmoves 60,913 → 60,960, pinned at the measured size.test/fixtures/skill-md-size-allowlist.jsongo down by 2 bytes each (the skill shrank).test/autoplan-token-efficiency.test.tsgives its subprocess-driven cases a 30-second timeout; a resumed-run fixture persistsmax_rounds: 1instead of 3, inside the new cap of 2.scripts/lib/windows-curation.ts:test/ship-receipt-carry-pregate.test.tsjoinsKNOWN_WINDOWS_INCOMPATIBLElike its four--pregatesiblings. On a Windows host the fixture's Linux lane is a requires-remote obligation, sowriterefuses the pregate (run 40611810409). It still runs on Linux and macOS. Granted by GStack Minder under rule 23; follow-up: the five--pregatereceipt fixtures declare their lane for the host platform so they run on Windows too.test/skill-validation.test.tsandtest/outside-voice-preflight.test.tsexpect the ship heading without "always-on" and the native pass "onDISPATCH: adversarial-native" (/review keeps "always runs");test/ship-control-flow.test.tspins the one plan call that picks decisions 2–4;test/fixtures/workflow-required-steps.jsonpins the renamed Step 11 heading. Granted by GStack Minder under rule 23.Pass 1 (9 reviewers, gate class) found 4 CRITICAL, all fixed: a quiet autoplan revise after a capped one skipped the owner gate;
carry --pregatecould certify one head with another head's pregate; Step 11.5 could not bind a fix-check or a planned adversarial skip; a fix-check could run with a blocker open. Pass 2 on the range found 3, all fixed: Step 11 followed the latest plan and so dropped the adversarial pass on clean code diffs (it now follows the last full-pass plan); a file rewrite truncated four Important Rules bullets; the ship goldens were stale. The fix-check after pass 2 found nothing blocking. A size-guard failure after it (the 400-word cap grew five /review host renders by 38 characters) was repaired under GStack Minder's one-step rule-23 exception and covered, with the main merge's resolution, by a second fix-check: 0 CRITICAL. Two test-only commits follow it: ced7be1 removes a duplicated constant assertion that tripped the pregate literal scan, 7d9ad12 is the Windows curation entry above, and c5e13f9 rewords one CHANGELOG sentence for the prose lint. After the PR screen's judge went red, 243ca8e gave each loop exit, the planned adversarial skip and Step 16's TODOS rerun one decision; a full-effort fix-check found 1 CRITICAL (a stale heading pin) and 3 INFO wording regressions, all repaired in f659bd6.Outside review (openai/gpt-6-astra): pass 1 Hold (2 CRITICAL, both fixed); pass 2 numbers check clean.
Review notes
scripts/resolvers/review-army.ts:144: "per finding per line, 400 words at most" can read as a per-finding cap; the intent is the total.ship/SKILL.md.tmplStep 1: "stop" afterCARRY: carriedno longer names theGSTACK_RESULTline the carry prints.lib/autoplan-scope.ts: any non-markdown file under docs/ is docs-class (images, json).autoplan/DRIVER.md: the docs-only sentence lists docs/*-policy.md as code but not docs/captain.md, unattended.md or pregate.md, which the classifier also treats as code.lib/review-evidence.ts: areview-fix-checkrow reads CURRENT on the dashboard although the reviewer read only the touched hunks.lib/autoplan-revise.ts: a Low-severity quiet revise can apply a large plan edit without re-review when no capped revise is pending.test/autoplan-token-efficiency.test.ts: 30-second per-test timeouts on the subprocess-driven cases, unmeasured.lib/autoplan-budget.ts: a corrupt consensus file counts as no pairs.Exploratory QA
No browser surface. The CLI and receipt paths are exercised by the tests above;
gstack-review-plandrove this PR's own review (plan-p1..p3).Design Review
No frontend files changed — design review skipped.
Eval Results
Paid evals ran before the build decision (preregistered, $12.55 of a $40 cap): pilot plus two runs; a medium-effort fix-check found 0/3 of a seeded gate fail-open versus 2/3 at full effort, which set the D1 rule that blocking reviewers stay at full effort.
Scope Drift
Scope Check: CLEAN against the approved plan (Garry's A1 B1 C1 D1 E1).
Plan Completion
Step 8 (pass 1) reported 3 NOT DONE; all three are done now: the 400-word specialist findings cap, Step 1's delta carry with a pregate, and the #3497 carry replay. AUDIT_EFFORT now reaches Steps 7 and 8.
Verification Results
No Step 8.1 executable obligations beyond the test lanes.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. Three factual corrections to policy docs. Nothing blocks.
Scope: candidate
gsta131-docs-1793146992, base10b77de4to heada94b37c0(60 files, 8 commits; the staged, unstaged and untracked lists in the candidate were empty). I read the changed docs and authored templates (docs/review-policy.md,docs/model-policy.md,docs/ship-policy.md,docs/unattended.md,docs/troubleshooting.md,autoplan/DRIVER.md.tmpl,ship/SKILL.md.tmpl,review/sections/review-army.md), plus the /ship and /autoplan rows and sections inREADME.mdanddocs/skills.md,docs/captain.mdrule 23, and the CHANGELOG [Unreleased] entry (read only). Each claim was checked againstlib/review-depth.ts,bin/gstack-review-plan,bin/gstack-config,bin/gstack-ship-receipt,lib/result-codes-release.ts,lib/autoplan-budget.tsandreview/SKILL.md.tmpl. Banned-terms check: none (the repo keeps no list).Documentation health:
docs/ship-policy.md Updated (
review_scopeitem 3 said "Three passes is the cap ... instead of a fourth pass". It now says two full passes plus one fix-check, linked to the review-policy transition table. Thereview_loopcounters now listfix_checks,dispatchesandest_input_tokensas recorded-when-present.)docs/review-policy.md Updated (restored the sentence saying
/reviewon its own keeps the same floor,NO FINDINGSand its three-cycleCYCLEScap. The branch had dropped it, butreview/SKILL.md.tmplis unchanged.)docs/unattended.md Updated (
passesreads "1 or 2; up to 3 underreview_scope: all", matching review-policy's receipt table.)docs/model-policy.md Current (
#reasoning-effortanchor andreview_effort_tiersdefaultonverified.)docs/troubleshooting.md Current (
RECEIPT_CARRY_PREGATE_STALEanchor matcheslib/result-codes-release.ts.)README.md Current
docs/skills.md Current
CHANGELOG.md Not audited for voice (ship-owned, read only)
TODOS.md Skipped (ship-owned)
Documentation Debt
gstack-review-planhas reference docs (review-policy) but no how-to indocs/skills.md's /ship section.--docs-onlyandESCALATE:are documented only inautoplan/DRIVER.md. Thedocs/skills.md/autoplan section does not mention them.scripts/review-dispatch-compare.tsis named only in the CHANGELOG.Test plan
gstack-pregate --allow-repo-commandsat f659bd6: stage 1 (regen, secrets, strays, literals, timing, guards) pass; tests requires-remotegstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands(Ubicloud, tree d972a623f1b6): 23,892 tests, 0 failed, $0.10;test/plan-seed-submission.test.tsfailed once and passed on the runner's serial retry (this PR does not touch it)gstack-pregate clear --remotefor the three macOS and Windows lanes with those runs, thengstack-pregate verify: ok, current for tree d972a623f1b6EVALS=1 EVALS_TIER=gate, one selected judge each): ship/SKILL.md workflow PASS clarity 4, completeness 4, actionability 4; review/SKILL.md workflow PASS 4/4/4 ($0.12)test/ship-receipt-carry-pregate.test.ts(fixed by 7d9ad12). At 7d9ad12, the Quality gate's CHANGELOG prose lint failed (fixed by c5e13f9).🤖 Generated with Claude Code