Repository navigation
Run each driven /ship phase as one command, count its calls, and stop it at 100 minutes (GST-2984) - #4451
Merged
Conversation
…t, and print the 100-minute stop Adds gstack-ship-phase (a resumable phase runner plus the Capy phase program), calls= per budget note and in the ship receipt, a printed STOP: past 100 minutes with stop.json, and the length-priced wait rule in ship/DRIVER.md (GST-2984). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…lower phase tests room Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…redits Capy thread.get now returns cost.dollars without cost.credits, so the phase and review pass programs passed --credits undefined and every budget note refused it. Both programs fall back to dollars x 1,000. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…me log A changed command list left the old process running, and its exit status could settle the new command (a failing replacement journaled as passed). The runner now stops the replaced process group first and stops the phase if it will not exit. Review-Finding: p1/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>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot
added a commit
that referenced
this pull request
Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466) - An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481) - A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481) - `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470) - `revise --plan` with a different file now says the run follows that file. (#4470) - A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471) - The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460) - A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456) - A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451) - /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458) - A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458) - A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458) - A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473) - /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461) - /ship on Codex no longer stops at the test coverage audit. (#4489) - A cold first-use check before an app build reaches its owner (GST-3025). (#4465) - `skill_prefix=true` now survives updates when gbrain is installed. (#4454) - The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454) - `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454) - /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464) - /office-hours explains why it recommends a mode. (#4450) - /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463) - Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490) - A Captain can check an ask against the owner's earlier answers before sending it. (#4467) - `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488) - GitHub release notes now list every change in plain words, with a link to its pull request. (#4390) - gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442) - /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469) - /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472) - A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479) - The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457) - A security finding's location and reason no longer go into a PR body. (#4486) - The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487) - A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485) - A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452) - /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474) - A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440) - One queued record with a malformed path no longer stops artifacts sync for every project. (#4455) - A failed artifacts push stays reported until a push succeeds. (#4455) - The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455) - ### Tests (#4495) - A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495) - CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453) - Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447) - The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447) - Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484) - Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459) - Two /autoplan runs started in the same second no longer share a run id. (#4459) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A driven /ship now runs each ship/DRIVER.md phase as one command, shows how many calls the run made, and stops itself with a printed line at 100 minutes.
Why: measured /ship runs made 121 to 308 calls where the driver plans 9 to 12, and 10 of 12 ran past the 100-minute stop while those limits were only prose.
Nothing to do: older ship records without
calls=still validate and print.What changed
Driven /ship runs kept making hundreds of tool calls and running long, because the one-call-per-phase rule and the 100-minute stop were only written down. They are now code.
gstack-ship-phase run --dir <run dir> --phase <n> [--record <rec>] -- '<cmd>'...runs a phase's commands in order, each in the background with its log under<run dir>/phases/<n>/, and prints only result lines. A command still running after 200 s keeps running and the call returnsNEXT: rerun; the same command picks the wait back up. A failed command printsSTOP:(exit 3), and after the fix the same command starts at the failed step. If you change the command list while an old command is still running, the runner now stops that old process first, so its exit status can never be counted for the new command.gstack-ship-phase programserveslib/capy-ship-phase.js, loaded like the review pass program. It reads the thread's cost counter for the commands, runs the phase, then the review pass or the closing budget note, then the next phase's section parts. When Capy reportscost.dollarsbut nocost.credits(as it does today), this program and the review pass program now use dollars × 1,000 instead of passing an empty reading that every budget note refused.gstack-ship-budget noterecordscalls=since the previous note, andBUDGET_TIMELINE:shows them per phase.gstack-ship-receipt write --budget-record <rec>(or--calls <n>) puts the run's total in the record, andSHIP_RECEIPT:printscalls=<n>. The field is optional.STOP: past 100 minutes ..., writes the head, review passes, next step and calls tostop.json, and keeps the run stopped untilgstack-ship-budget resumerestarts the clock. Admission mode has no clock.Blast radius
Only driven /ship runs (ship/DRIVER.md, observe mode) use the phase runner and the stop. Review requirements, the round cap and every check's verdict are unchanged, and the
callsfield is optional, so older records still validate (test/ship-phase.test.ts runs both shapes through write and placement; script ran). The credits fallback only fills a reading that was otherwise missing.Calls in this PR's own /ship run
This PR's own /ship run (on its final head 5f04632) printed
calls=44(CALLS: source=log calls=37 ... keepalive_est=7 total_est=44). The handoff's baseline was 121 to 308 parent turns across 12 measured conductor runs. That's one data point, not a measured saving: it ran on the branch that adds the runner, the call log counts only calls that ran a gstack command plus estimated keep-alives (the baseline counted every turn), and the run took two review passes and one CI wait.Agent notes
Tests:
test/ship-phase.test.ts(12 cases, all free): runner resume after a failure, the 200 s return and reattach, result-line filtering, usage errors; the Capy program driving a real Phase 2 (gstack-ship-budget startplusgstack-ship-preflight --audit) on a fixture repo on a fake host whose shell is real, and handing a pass to the review pass program; the time stop by note and by phase run, resume restarting the clock, admit mode untouched; calls per note and in the timeline; receipt write with--budget-recordand--calls; the schema field; carry of receipts with and withoutcalls.test/exercised-map.test.tsgains a reviewed-superset row forlib/ship-clock.ts.Handoffs: org drive handoffs/fold-subagents-2026-11-17 (G2) and handoffs/ship-conductor-cost-2026-11-16.
Test Coverage
Coverage: 22 of 30 changed paths have a test at two stars or better (73%); the other 8 are new-code edge paths with no test yet (an edited command list's journal cut, a killed command's
exit=lost, the 60-line output cap, a bad--callsvalue, bad program input, a closing note without a thread id, the 32 KB return cap, next-phase parts). No regression test was needed: every changed behavior is new except the credits fallback, which has its own tests.Tests ran: phase 58
Tests ran: guards 8
Pre-Landing Review
The full review panel ran on this change (two specialists, a red-team reader, a native adversarial reader, a second-model review on GPT-6.1 Sol, and a targeted money reader), then a second pass on the fix. One blocking finding, from the second-model review and confirmed by the adversarial reader, was fixed: a replaced command that was still running could write its exit status into the file its replacement is judged by, so a failing replacement could be recorded as passed. Nothing else met the blocking bar; the items below are recorded and not fixed here.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/ship-phase.ts:87the journal keys finished commands by their text only, so a same-text rerun after a fix shows the earlier results as done (test evidence is still rechecked at finish)lib/ship-phase.ts:34liveness is judged by pid alone; a pid reused after a machine sleep keeps a killed command waiting until the 100-minute stoplib/ship-phase.ts:75no lock around the journal's read, start and write; two runners could start the same command twicelib/ship-phase.ts:85after SIGTERM only the group leader is checked, so a group member that handles SIGTERM can still write the shared loglib/ship-phase.ts:80a running entry whose command already wrote its exit file can be signalled if its pid was reusedlib/ship-phase.ts:83on Windows the process-group kill throws, so a changed list with a running entry stops after 5 s instead of continuinglib/capy-ship-phase.js:31the credits fallback reads 0 when both cost.credits and cost.dollars are missing (same expression inlib/capy-review-pass.js:91)lib/capy-ship-phase.js:45a phase call with only a review pass dispatches readers without the run's stop check thatgstack-ship-phase run --recordmakesbin/gstack-ship-receipt:243write fails hard when the budget record is missing, over a calls count that is only informationallib/ship-clock.ts:32the call count filters the shared call log by time only, so two runs on one state root count each other's callslib/ship-clock.ts:43the next-step reader treats a bullet starting with a heading word as the next headingdocs/ship-budget.md:112the long-wait advice names a long local preflight, but phase commands are detached processes with no Capy operation id, so a turn-ending wait lets the machine sleep and stop themtest/ship-phase.test.ts:107the new replacement test gives the old command about 1 s of slack, so a heavily loaded runner could make it flake (the scope tool classed it a note)Documentation
Status: updated. One factual correction, no blockers.
Scope: the base b49ed6a..193c1a9 on capy/run-each-driven-ship (5 commits, 19 files), with no staged, unstaged or new files. The changes add the
gstack-ship-phaserunner and its Capy program, the 100-minute clock stop (lib/ship-clock.ts),calls=in budget notes and receipts, and a fallback fromcost.dollarsto credits.Documentation health:
cost.dollarsx 1,000 fallback. The new sections on the 100-minute stop, the phase runner andcalls=match the code.--budget-recordand the 100-minute stop.cost.creditsas the credits source. Agents load this file, so it was left for the parent.STOP: past 100 minutes.Coverage debt:
gstack-ship-phase runandgstack-ship-phase programhave reference docs in docs/ship-budget.md only. There is no how-to and no troubleshooting entry.STOP: past 100 minutesandstop.jsonhave reference docs only. There is no troubleshooting anchor.gstack-ship-receipt write --callsand--budget-recordhave reference docs only.Diagram drift: none found.
Tests
bun test test/ship-phase.test.ts test/ship-driver.test.ts test/exercised-map.test.ts: 58 pass, 0 failbun test test/script-invocation-tripwire.test.ts test/parity-suite.test.ts: 8 pass, 0 failbun test test/review-pass.test.ts -t 'only cost.dollars': 1 pass (fails without the fix)bun run typecheck: cleanAgent notes
Agent notes
🤖 Generated with Claude Code
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=6 fixed=1 scope=frozen ledgers_read=2 dispatches=8
Gate edits: none detected (3 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Second-model review: openai/gpt-6.1-sol, completed, 1 blocking finding (fixed in bf0bedd).
Evals: not run on this PR; the selector picks 111 behavioral probes, which the 8-hourly gate on main runs.
Handoffs: org drive handoffs/fold-subagents-2026-11-17 (G2) and handoffs/ship-conductor-cost-2026-11-16.