Repository navigation
v1.91.316.0 ship: token cap with real meters and fresh-context delegation (GSTA-152 PR A) - #3593
Conversation
…52 PR A) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…locks uncapped review starts; short child return reconciles incomplete) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…cs match their evidence Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… maps it to a lane Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…152 PR A) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…so Windows can launch them Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ELOG via mergeChangelogs) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $32.80 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. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…k/always-run.json (GST-167 PR 1, GST-98) (#3626) * pregate: always run the whole-tree tests listed in .gstack/always-run.json A diff-selected run never maps a touched file to a scanner that reads the whole tree, so tripwires, ratchets and conformance tests passed the selected gate and failed CI after review (#3592, #3593). The lanes selection now adds every tracked test the list's globs name whenever the branch selects a test, owes a lane or edits the list. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(pregate): restore the truncated pregate.md tail; cite seeded durations for the always-run list Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): [Unreleased] entry for the pregate always-run list 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 can now take a token cap (
--token-cap, orGSTACK_SHIP_TOKEN_CAP) and enforce it against a real meter, and it hands heavy segments to fresh-context children.bin/gstack-ship-budget(lib/ship-budget.ts,lib/ship-budget-cli.ts) keeps a run-owned ledger under the state root and drivesstart,check,handoff,verify-handoff,resumeandclose. It is an admission cap: no step or dispatch batch starts unless used, plus open reservations, plus its projection fits under the cap. A stop printsSTOP: reason=budget_exhausted, aRECOVER:line andstatus=incomplete.cost.tokenswith--reading. On Claude Code,lib/claude-usage.tsreads the bound session's journal and its child journals. The estimate meter runs only when asked for with--meter estimateand is labelled as an estimate.gstack-review-log --startrefuses without an unspent reservation id, and--finishsettles it. With no cap, nothing changes.lib/ship-handoff.tswrites the handoff brief (pins computed from git, the invocation record, start tokens, decision trail, approvals, sub-cap), verifies it in the child, and reconciles the child's return. Delegation goes at most one level deep.budget-handoffsection holds the recipes for each host. Also new:docs/ship-budget.md, six result codes with troubleshooting anchors, and a paragraph in the Capy skill.Why
On gstack-evals#31, /ship spent 54M tokens against a 25M cap (2.16x), because /ship had no cap input and the agent tracked its own estimate. On #26, which read the platform counter after every step, the run stopped at 39.40M of 40M. Late in long runs, each parent call re-read 0.24–0.5M tokens of context. Plan: GSTA-152, approved by Garry ("Do it").
Blast radius
Nothing changes without a cap. The only behaviour change on the uncapped path is the review-army and adversarial prose that names
--reservation, and it applies only when a cap is set.Review
Full depth (gate-class, 1,394 runtime lines). Pass 1 ran the testing, maintainability, simplification and state-machines specialists plus the Red Team. Pass 2 ran the native adversarial pass, which also served as the fix-check, and the GPT outside voice, which also covered the docs audit and trail review. Blocking findings, all fixed with regression tests:
gstack-review-log --startexit 1 (ba42df7).Later fixes, each checked by a fix-check:
The two raised caps (ship skeleton 61,420 measured; Capy skill context 4,588, measured +10%) and
BUDGET_READING_REJECTEDwere judged justified.Notes below the blocking floor, not fixed:
Validation
At 586f7d4:
PREGATE_VERIFY: ok.Token cost of this /ship
About 68M against a 40M cap, read from the Capy root counter, which also includes PR B's build:
Approvals