Repository navigation
Conversation
… drift, docs-audit packet, ship preflight/release bins, small-run rule Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…rent summary-only block Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This was referenced Oct 30, 2026
…rge; DIFF counts the branch from its fork point docs/ship-policy.md#ship-before-ready: under stamp-at-merge /ship never merges main into the branch (the slot stamp does). The new preflight merged origin/<base> unconditionally, so a dogfood /ship on #3633 would have merged main (crew rule 19). Failing-first test in test/ship-preflight.test.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…not a local origin/HEAD A Capy checkout points refs/remotes/origin/HEAD at the PR branch, so the preflight refused every lane as 'on the base branch'. ls-remote --symref is authoritative; the local ref stays the offline fallback. Failing-first test in test/ship-preflight.test.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ror prints unknown, never false A Capy checkout has no local main, so gstack-diff-scope main returned SCOPE_ERROR=no_base and the preflight printed frontend=false. Failing-first test in test/ship-preflight.test.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s every scope-gated specialist Without a local base branch gstack-diff-scope <base> returned SCOPE_ERROR=no_base and the plan silently dropped security and performance (the depth already failed closed to full). The plan now resolves the base like collectLive, and an unreadable scope keeps every scope-gated specialist. Failing-first tests in test/review-depth.test.ts and test/review-plan-cli.test.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…th origin skips gh; RUNTIME_LINES leaves data files out /ship review of #3633 (security CRITICAL x2): gh pr list --head "$branch" ran through sh(), so a branch named x$(cmd) executed. Replay 3 of gstack-evals #34: a local bare origin under GH_HOST failed the carry check, and RUNTIME_LINES counted JSON. The fixture's origin is now a GitHub URL mapped to the bare repo by insteadOf. Failing-first tests. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…AML frontmatter /ship red team on #3633 (CRITICAL): every generated SKILL.md has its marker after frontmatter, so apply would edit a generated file and fail Skill Docs Freshness. Failing-first test. 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>
…ild reads its own and reconcile charges its return thread_id "this" is the root thread, so a lane subagent's budget counted every sibling tree (#3633: root +37.3M while the lane's own counter moved +22.9M). A jam's own counter includes its own subagents (measured 2026-10-30 on jam_01M658JBRMTMQ1WQWYT6WFD22W: +10.92M across a six-reader dispatch). The capy contract now reads the agent's own jam id (scope thread, descendants), the handoff child baselines at its own verify-handoff reading, and reconcile charges the child's returned own-counter used=. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…very capped review-log start names its reservation gstack-evals #34 round 3: close printed budget_check_skipped dispatches=3 for the Step 9 and 11 rows, which ran in handoff child 1: the root's audit matched review-log rows against its own ledger's reservations only. review-log --start already refuses without --reservation under an active capped run. verify-handoff now records each child ledger on the parent's handoff and close walks that tree. Step 9 item 2 builds and checks its batch before REVIEW_START, the fix-check and both Step 11 voices start on --reservation, and the pass program starts once per logged row. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…--finish settles it gstack-evals #34 round 3: the pass program's start-once-per-role rule gave the Red Team batch an extra --start review token that no row ever finished. A later batch of the same Step 9 pass (the Red Team or an ADMIT remainder) now takes no start, and --finish REVIEW_START settles the open later batches of the step reserved after the started one, so none stays reserved at close. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…spatch program's reading pair gstack-evals #34 round 3: the docs-audit settle ran from a later program, so the reader was unmeasured. Under a cap its dispatch is now one program: check on build's BUDGET_NEXT, BEFORE right before the reader starts, the poll, AFTER, and settle --dispatched-at <BEFORE> --reading <AFTER> --readers 1 in that program. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…N_ID: <id>; the review prose reads that line gstack-evals #36 round 3: a child misparsed a reservation id out of the RESERVATION: line, which gave UNMEASURED and then BUDGET_CHECK_SKIPPED at close. check keeps RESERVATION: and adds RESERVATION_ID: <id>; the pass program, Steps 9, 11 and 14.5 and the Capy skill pass that line's value to --reservation. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…harge; step priors carry no dispatch gstack-evals #36 round 3 projected Step 8 at 16.43M (12 calls x the calibrated 750k + one 7.43M dispatch) and measured 0.34M (ledger ship-20261030T020847-c940ef); that inflation blocks capped runs. check now records each Capy per-call charge (--reading minus a fresh --prior-reading) and, once three are measured, prices a step at step_calls x their median over the last five, unscaled; the calibrated per_call applies until then. The audit dispatches of Steps 7, 8 and 14.5 are reserved by their own check, so they move from step_dispatches to segment_dispatches. step_calls are refit from the round-3 replay ledgers' step samples at 330k per call (replay3-34.md): Step 8 13, Step 14 5; two per_call observations join the fit (constant unchanged). Records the ship size ledger for this branch. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…program settled the first; Step 14.5 check passes --reading Pass-2 review of #3633 (GSTA-167): the outside voice found the started match required the first batch to stay consumed, so the documented Red Team fallback never ran; the adversarial pass found the docs-audit check had no --reading, which exits 2 on the Capy meter. Adds tests for the finish filter cells the batched specialist named. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… batched is an explicit opt-in GSTA-167 no-loss replay round 2: parallel found 11 of 30 recorded blockers, batched 8, so under the preregistered rule batched does not become the default. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…--continue child (GSTA-167) 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>
… a refused child stops the run until reconcile or resume 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>
…nly meter=estimate adds it to the parent's used Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s captured value (own-jam meter contract and RESERVATION_ID prose, GSTA-167) CI at 3e819f1: eagerPerInvocation.capy/skill/gstack 4742 tok > limit 4588. Only this ceiling moves; capture-context-budget's value for it is 5217. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Oct 31, 2026
…er the restored reviewers (GSTA-167) (#3648) * feat(ship): GSTA-167 turn levers on the restored reviewers: ship preflight/release bins, own-jam meter, dispatch-pair metering, ship/DRIVER.md Ports the non-reviewer parts of #3633 (gsta-167-pr34) and #3637 (gsta-167-pr5 @2914400) onto main ae3d58c (v1.91.331.0). Reviewer briefs, checklists, the fix-check prompt and the depth rules are byte-identical to main and now pinned in test/review-packets-removed.test.ts. Left out: gstack-review-packet and its libs, parallel/batched fanout, --like, collect, the audit prompt split, the docs-audit packet, review-army/adversarial/outside-voice edits, the gate-scan summary-only block and the review-depth scope-error change. Packet-bytes reader pricing is dropped from gstack-ship-budget; handoff READ ranges send each section whole; the driver runs the audit, review, adversarial and documentation sections as written. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(context-budget): raise the capy/skill/gstack eager ceiling to its captured value after the main merge (own-jam meter, driver and reviewer-batch prose, GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(ship-driver): name ship/DRIVER.md.tmpl so the pregate maps the template to its test lane (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-driver): keep the skill generator off lib/ship-budget so a minimal setup checkout still renders (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(windows): keep test/ship-release.test.ts off the Windows subset; it launches the shebang bin and sh stubs directly (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ship): variant E orchestration: one program per review pass and Step 14.5 audit, the review child starts at Step 9, a metered dispatch:docs role, and the driver's record headings (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ship): variant G orchestration: one call per driver phase (9 for a clean pass, at most 12), gstack-ship-preflight --audit for single reads and deterministic audits, an observe-mode ledger with note and credits, 240 s wait pings, and small-model audit readers (GSTA-167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-budget): a Capy handoff child needs no jam id: verify-handoff with no reading makes it parent-metered (METER: parent), it never delegates on an unknown charge, and reconcile charges the parent's counter delta (GSTA-167 replay 7e) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship): a poll settles a reader only at done, failed or a final summary, never a fresh idle; return settles the child's open step reservation (GSTA-167 replay 7e) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-budget): return releases an open step reservation under the estimate meter instead of booking its projection; measured meters still settle it (GSTA-167 replay 7e) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): a clean fix-check after below-floor fixes is done; Step 11 and fix-check below-floor findings are notes at pass 1 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ship): verbatim reviewer briefs and loss-free collection (gstack-review-dispatch render/sent/collect/judge/verify) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes - verify requires each output's brief rendered and sent verbatim, reruns judge against the recorded judged.jsonl hash, and flags outputs collected after judge - judge drops self-folds, fold cycles and chains - prose findings parse a leading label or a label heading, not any severity word - releasePaths: manifests count as release metadata only for version-only edits, lockfiles never; TODOS.md stays out of lane-evidence exemptions - push stops when the sealed-output guard did not run - ship-audit reads the test tree once instead of one git grep per file - drop the uncalled --delegate measured mode; doc/help step-number fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes (pass 2) - collect keeps a finding wherever its label stands (headings, table rows, mid-line, Informational and upper-case labels); only top-level list items inherit a label heading, and any heading or bold-only line ends it - judge treats a merged file missing any collected id as a drop; verify flags merged_ids_missing and a sent reader never collected (NOT_COLLECTED) - finish computes release paths after --build, so a build that rewrites package.json is a build-input change Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-dispatch): verify per render, voided superseded mismatches - verify treats each render as one dispatch of its reader, so a two-pass ledger compares pass-1 sends with pass-1 briefs (later renders print as <reader>@2); outputs bind to the latest send of their own render - a mismatched send re-sent byte-exact before anything was collected is void and counted (voided=N on the verdict line); one that produced an output stays MISMATCH - an indented bold sub-line no longer ends a label section (fix-check) - docs: a failed reader is collected from its failure text Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-dispatch): only the newest render of a path checks its file; absolute ledger paths - a later render into the same briefs directory overwrites the earlier brief by design, so verify checks a brief file only for the newest render of that path - collect and judge record absolute output, merged and judged paths, so verify reads them from any directory - docs: a failed reader's failure text is parsed like any output Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: changelog and TODOS Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-release): the changelog_fragments fragment is release metadata Fix-check 4 (CRITICAL) after the main merge: releasePaths omitted <changelog_fragments.dir>/<branch-slug>.md, so finish stopped on the fragment Step 13 writes under gstack's policy, or routed it to re-review. version now names the fragment in its Step 13 NEXT line instead of [Unreleased], DRIVER.md Step 13 writes and lints where NEXT says, and the preflight POLICY line says Steps 12-16. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: changelog and TODOS 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>
3 tasks done
Contributor
|
Closing as superseded. Its core landed through the GSTA-167 sequence: the batched specialist packet in #3660 (v1.91.350.0), the variant G orchestration with the preflight and release bins and ship/DRIVER.md in #3648 (2127729), and the call-count cuts in #3662 and #3665, with #3670 still pending. The remaining pieces ( |
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.
Part of GSTA-167 / GST-134 (P-1: cut /ship token cost). Follows #3620 and #3621 (on main). Supersedes drafts #3625 and #3627 and adds the call-count cuts.
What changed
Review
specialist batchedpacket per shard carries every selected checklist; the reviewer ends withCOVERED: …and a missing checklist isREVIEW_COVERAGE_INCOMPLETE.--fanout parallelkeeps one packet per specialist. Red Team, adversarial, outside voice, fix-check and audits stay separate; selection and depth are unchanged.build --like <dir>reuses the earlier build's flags.audit-*.mdfiles onlybuildreads; the coverage and docs audits are read-only packets (build --audit docsfor Step 14.5).Budget
UNMEASURED:. Dispatch projections are packet-based. A--prior-readingolder than the last reading isCALL_UNKNOWN:. A stopped run refuses every check untilresume. Small runs (by--runtime-lines) continue instead of delegating.READ:line ranges for the segment only, and a 12–22 child's--to 22reconciles complete.Fewer agent calls
gstack-ship-preflight(Steps 1–3, and--tests-onlyfor Step 5) andgstack-ship-release version|finish|push(Steps 12, 15–16, 17) chain the existing bins and print ≤ 30 lines withSTOP:/NEXT:wherever the agent must decide. The checks the old shell blocks ran are now tested intest/ship-preflight.test.tsandtest/ship-release.test.ts.Why
Replays of /ship on gstack-evals #36 and #34 with #3620 + #3621 installed still cost ~27M each. Two false budget STOPs came from dispatch intervals that included the parent's own work, and ~110 agent calls at 0.2–0.3M each now dominate over the readers (handoffs/GSTA-167/call-anatomy.md in the crew drive).
Gate edits
test/ship-release.test.tsadded to the test-of-test BASELINE.origin/<base>throughresolveBaseRef, and aSCOPE_ERRORnow selects every scope-gated specialist instead of none (0d86763).--finishalso settles a later open batch after the pass program already settled the first one (b071dcc).capy/skill/gstackeager context-budget ceiling goes from 4588 to 5217 tokens, the valuecapture-context-budgetcomputes, because this PR's own-jam meter andRESERVATION_IDprose grewcapy/skill/gstack/SKILL.mdto 4742 tokens. No other ceiling moved (d9ce8b9).Specialist packing
gstack-review-packetnow defaults to one packet per specialist (SPECIALIST_PACKING = parallel);--fanout batchedis an explicit opt-in. This replaces the batched default described under Review above. The reason: in the GSTA-167 no-loss replay, round 2, parallel packets found 11 of the 30 recorded blockers and batched packets found 8.Calibration source
step_callscome from the round-3 replay ledgers mirrored in the project-user Driveship-budget/folder: each step window's measured actual divided by 330k, the per-call charge replay3-34.md reports (#36 reports none, so it uses the same 330k). Steps 7 and 9 have no step measurement and keep 12. The lane's first root-meter ledger is left out.Defects found by dogfooding this run
Each was fixed with a failing test first.
reconcile --recordresolved to the child run instead of the parent after a--continuechild (6e6700e).Accepted documentation risk
Documentation: blocked. The Step 14.5 audit stayed blocked on
docs/ship-budget.md:147after its last allowed re-audit; the line was repaired by hand (3e819f1). Recorded exception, from.gstack/tmp/docs-audit.json:Follow-up
A Capy handoff child can't learn its own jam id, because no tool exposes it, so the brief's "read your own jam" step can't be carried out as written. This run's children read the idle parent's counter instead (
lib/ship-handoff.ts:107).Review notes (informational, not looped)
lib/review-packet.ts:309:insideOutdrops every path under a.gstack/<subdir>/, tracked or not, so a committed file there would silently leave every packet and the content key.lib/ship-bin-common.ts:30:binAsynchas noerrorlistener, so a failed spawn throws out of preflight instead of reporting the lane as FAIL.lib/docs-audit-apply.ts:38: a docs reader that adds a code fence, a heading or a NO FINDINGS line turns a clean audit intostatus=blocked, and no test covers that.ship/sections/audit-test-coverage.md:11: the read-only coverage packet still tells the reader to generate and run tests and keeps an unfilledGeneration:placeholder.test/helpers/ship-bin-fixture.ts:66:advanceBasenames its clone withDate.now(), so two calls in the same millisecond collide and fail the fixture.test/review-plan-cli.test.ts:49: the no-local-base test ignores its setup commands' exit status, so it can pass without exercising theorigin/<base>fallback.lib/docs-audit-apply.ts:50: the protected-file check uses the reader's path rather than the resolved file, so an in-repo symlink to CHANGELOG.md can be edited, and two entries for one file drop each other's edits.lib/ship-budget-cli.ts:74: a stale--prior-readingstill counts as "wants" at the Step 7/12 boundary, so it can still delegate or print CONTEXT_HIGH.lib/review-packet-collect.ts:62: anyCOVERED:line, even an empty one or on a non-batched packet, marks a packet clean and drops its malformed findings.lib/ship-bin-common.ts:63:releasePaths()treats any package.json or lockfile change as release metadata, so a post-review dependency or script edit skips the behavior route and keeps lane evidence fresh.lib/ship-preflight.ts:46: the carry route ends with exit 0 instead of a STOP, so a preflight with--laneon a carry-eligible branch runs no tests and still exits 0.lib/ship-release.ts:119:commitRelease()misparses rename entries fromgit status --porcelain -z, which causes a STOP naming a path that doesn't exist.lib/ship-bin-common.ts:25:hostedOrigintreats a user-less scp remote (github.com:owner/repo) or an alias likegh:owner/repoas a local path, so preflight skips the PR lookup andpush --gate-openrefuses even with approval.lib/ship-budget.ts:228: after three measured calls a step is priced at step calls times the median per-call charge with no headroom, so a step that runs over its call count is admitted under-projected.lib/ship-budget-cli.ts:77: every reading minus the prior one is recorded as a per-call charge, so a reconcile after a handoff child records millions as one call and pushes later projections far too high.ship/sections/documentation.md:45: the Step 14.5 budget check line omits--reading, which exits 2 on the Capy meter and blocks the audit if copied literally.lib/ship-budget.ts:553:--finishsettles every later open reservation in Step 9, including design-review-lite and fix-check batches that still need their own start.lib/ship-handoff.ts:107: nothing gives a Capy child its own jam id, so a child may fall back to the root counter and jump or reject its ledger readings.lib/ship-budget.ts:51: the capy meter contract changed meaning but kept version 1, so a ledger started before the upgrade rejects every lower own-jam reading.lib/ship-handoff.ts:261: reconcile prefers the child's self-reportedusedover the parent's own meter delta, so a truncated return under-reports the child's cost.lib/ship-budget-calibration.json:111: Steps 7 and 8 dropped their audit dispatch fromstep_dispatcheseven though only Step 14.5 got its own dispatch check.lib/ship-budget.ts:556: once the dispatch program settled the first batch,--finishcould not settle a later open Red Team or remainder batch (fixed in b071dcc).lib/ship-budget-cli.ts:78: a zero delta between two commands sharing one reading is recorded as a measured call, and enough zeros price every step at 0.lib/ship-budget.ts:550: a repeated--finishof an already-finished pass can now settle the next Step 9 pass's open reservations while it still runs.lib/ship-budget-cli.ts:367:resume --recordstill goes straight to the record's ledger, so it can re-attach a child's closed ledger before reconcile rewrites the record.docs/troubleshooting.md:1911: the HANDOFF_PIN_MOVED fix paragraph repeats one sentence twice in a row.lib/docs-audit-apply.ts:58: the already-applied skip lets a stale edit whose new text already appears elsewhere pass silently as current instead of being refused.Tests
At d9ce8b9: the Step 5 lane ran 449 tests across 24 files with 0 failures,
test/context-budget-ratchet.test.tshas 7 passing and 0 failing, and the remote pregate on tree 683cdaf8 ran 2,987 tests with 0 failures ($0.05). At 3e819f1, the remote pregate ran 23,959 tests with 0 failures ($0.07).