Repository navigation
v1.91.375.0 captain: stop a finished /ship subagent at READY once its parent subscribes to the PR - #3597
Merged
Conversation
…g to its PR 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>
…nt owns post-READY work, unconditional one-line wake, tight budget) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…agent-stop Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md # test/fixtures/context-budget.json
3 tasks done
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.
What changed
A finished /ship subagent now stops at READY after its parent subscribes to the PR, so CI and review callbacks stop waking it on a frozen head.
Before/after as text: A finished /ship subagent now stops at READY after its parent subscribes to the PR, so CI and review callbacks stop waking it on a frozen head
Why
The approved plan (GSTA-156, P2) put it this way: "Stop finished /ship subagents". After READY, a /ship subagent kept getting woken by every check and review on its PR, which cost tokens and sometimes acted on a head that was meant to be frozen. Now the parent subscribes to the PR when the subagent opens it, stops the subagent at READY, and owns the PR from then on.
Blast radius
This is prose only, in the Capy gstack skill, the lane's /ship sequence in docs/captain.md and the lane brief template, so no ship-queue, receipt or skill-section code changes. The one number that moves is the Capy skill's context-budget ceiling, from 5136 to 5312:
lib/context-billmeasures the skill at 5135.9 tokens on main and 5311.6 on this branch, and the ratchet test passed at the new ceiling.Approvals
Source: gstack-approvals record for capy/gsta156-ship-subagent-stop (display only; not an approval citation).
Summary
The rule lives in two places. The Capy mechanics are in capy/skill/gstack/SKILL.md: subscribe when the PR opens, keep one subscription until merge or close, stop the subagent only once that subscription is in place and READY has arrived, and treat any later automatic wake as a one-line report naming what woke it, its pin and the PR head. A message from the parent is still an instruction. The host-neutral sentence is in docs/captain.md, where the parent owns red checks, review, the slot stamp, re-READY and receipt carry after READY. The brief template carries a pointer. This head merges main at a305302 into the earlier pin, and the changelog entry is the fragment changelog.d/capy-gsta156-ship-subagent-stop.md.
Test Coverage
Prose and a budget fixture only, so there are no new code paths and the coverage gate does not apply. The guards that read these files ran: parity-suite, skill-md-size-guard, skill-size-budget, context-budget-ratchet, context-bill, catalog-budget, skill-budget-regression and claude-md-size, with 116 pass and 0 fail. No test pins the new clauses.
Tests ran: remote-free 3407
Tests ran: guards 116
Pre-Landing Review
No blocking findings. Pass 1 ran one batched specialist reader (testing, security, state machines and red team), which returned NO FINDINGS, and the native adversarial reviewer, which returned six informational notes, none at the blocking floor. The outside voice was skipped because this is a docs-only diff (crew rule 30(a)).
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=6 fixed=0 scope=frozen dispatches=4
Gate edits: none detected (1 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none). The one listed hunk is the context-budget ceiling, raised by the measured growth above.
Outside review: skipped (docs-only diff, crew rule 30(a)); not counted as coverage.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
capy/skill/gstack/SKILL.md:58a red check that settles after the subagent's last turn but before the parent subscribes reaches neither; the parent does not read current checks at the pin after subscribingcapy/skill/gstack/SKILL.md:58a stopped Capy subagent is parked, so notices queue and arrive with the parent's resume message; the bullet does not say to leave queued notices unactedcaptain/templates/brief.md:37the parent usually learns the PR number only from READY, so the subscription happens at READY and the subagent is idle, not stopped, until the stop call; brief.md and SKILL.md/captain.md word the timing differentlycapy/skill/gstack/SKILL.md:58watch expiry may be silent, so re-subscribing on expiry has no triggerdocs/captain.md:252the host-neutral paragraph names subscribe and stop, which other hosts may lacktest/fixtures/context-budget.json:12the ceiling sits at the measured value, so the next PR that grows the skill must raise it again (deliberate per the fragment)Exploratory QA
Smoke checks on the changed surface: the
#plan-approve-shipanchor in docs/captain.md resolves to the "Plan, approve, ship" heading in capy/skill/gstack/SKILL.md, and the context-budget ratchet passes with the skill at 5311.6 tokens under the 5312 ceiling. No product code changed, so no other probes apply.Design Review
No frontend files changed — design review skipped.
Eval Results
The project's eval selector (
scripts/eval-select.tsagainst origin/main) selected no behavioral probes and no quality judges for these five files, so no evals ran.Greptile Review
No Greptile comments.
Plan Completion
P2 items 1 and 2 are done. P3a is #3592; P3b and P1 follow.
Verification Results
No plan-specific verification items for this change. Step 16 found the reviewed tree unchanged (7e4d1427da02), the docs audit fresh, the guards lane fresh and
gstack-pregate verifyok.TODOS
No TODO items completed in this PR.
Documentation
Status: current. No doc edits were needed: the new rule (the parent subscribes to a /ship subagent's PR, stops the subagent at READY and owns the PR afterwards) agrees with every related doc I checked.
Scope: committed diff a305302..dcffa36 (5 files:
capy/skill/gstack/SKILL.md,docs/captain.md,captain/templates/brief.md,changelog.d/capy-gsta156-ship-subagent-stop.md,test/fixtures/context-budget.json). Nothing was staged, unstaged or untracked. I cross-checked the related docs on /ship subagents, READY and who owns the PR after READY:captain/templates/READY.md,capy/skill/gstack/factory.md,capy/skill/gstack/captain.md,captain/SKILL.md.tmplandcapy/README.md.Coverage debt: the stop-at-READY rule has reference coverage (
capy/skill/gstack/SKILL.md), explanation (docs/captain.md) and a template pointer (captain/templates/brief.md). The lane-side guide,capy/skill/gstack/captain.md, doesn't repeat it, which is a minor gap. There is no how-to or tutorial, which is fine for a workflow rule.Diagram drift: none.
Noted, not from this branch:
captain/templates/brief.mdstep 3 anddocs/captain.md(rule 15, the READY contract) still say the CHANGELOG entry goes under[Unreleased], while the repo uses changelog fragments.Test plan
gstack-pregate --allow-repo-commands --remote --spend-cap 2 --timeout 2700at dcffa36: remote gate 3407 tests, 0 failed on tree 7e4d1427da02 ($0.06). The macOS and Windows lanes are cleared from this PR's CI at the same head (Free Tests run 41202079075, Windows Free Tests run 41202079003).bun testover the eight size, budget and parity files above): 116 pass, 0 fail.gstack-prose-lint changelog.d/capy-gsta156-ship-subagent-stop.md --gate: ok.