Repository navigation
Keep crew threads on their PR to the end and cap finished PRs at 10 before new fix threads (GST-2192) - #4240
Merged
Merged
Conversation
…efore new fix threads (GST-2192) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
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.
Agent threads that work on a pull request now keep it until it merges or closes, and no new fix thread starts in a repo while more than 10 finished pull requests wait there to merge. This is a wording change to gstack's own rules pages; no tool changes.
What changed
test/capy-skill-wrapper.test.tsrises from 3,650 to 4,200 for these two rules, with the reason recorded beside it as for earlier rule additions.Why
Per-thread token stops forced handoffs in the middle of a PR. One PR went through four threads in eight hours and is still a draft. Every handoff wakes the Captain, whose tokens cost about 1.7 times a crew thread's, and handoffs are where orphaned PRs came from. The cap on finished PRs keeps them from piling up behind new fix threads.
Blast radius
Prose only.
gstack-runaway scan(lib/runaway.ts) still flags every non-Captain thread past 500M as ROTATE and warns at 400M. The skill now tells the reader how to act on that for a crew thread, and the tool is untouched under the tooling freeze.Test Coverage
Coverage: deterministic. Each of the 3 changed runtime files (crew/docs/captain.md, runaway-stopper/SKILL.md and its template) has a changed test naming it. The free suite ran in CI at this exact tree and was carried:
LANE: free carried run=42690432152/1 tests_ran=1655 (files).Pre-Landing Review
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen ledgers_read=1 dispatches=2
Pre-Landing Review: 2 issues — 0 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 1 noted
Gate edits: none detected (GATE_SCAN tagged=0 at 1a111aa)
Plan: full panel on one pass (the "money" line in crew/docs/captain.md raised the depth): batched specialist (testing, security, state machines), red team, native adversarial, outside voice (openai/gpt-6.1-sol, certified configuration) and the targeted money reader. Nothing is at or above the blocking floor. Open notes, all informational:
runaway-stopper/SKILL.md.tmpl:75(red team, adversarial): a crew thread whose PR has merged or closed, or a lane that never had one, matches neither ROTATE case, and Step 3 now rotates only standing threads. Not fixed in this run.lib/runaway.ts:146(red team, adversarial): the scan still flags PR-holding crew threads as ROTATE, counts them in SWEEP rotate= and has no 1B check-in detector. A tooling change, frozen through 2026-11-21.runaway-stopper/SKILL.md.tmpl:75(adversarial): a merge lane that carries PRs matches both ROTATE readings.crew/docs/captain.md:193(adversarial): the 1B-token check-in sits next to "spend is the credit meter, never a token count"; the $330 figure is approximate.crew/docs/captain.md:226(adversarial): PRs that wait on an outside approver (yc-software/qm, R62) count toward the cap of 10.Exploratory QA
Functional smoke (report-only, 4 captures): the generator is FRESH for all 198 Claude-host files including runaway-stopper/SKILL.md;
test/capy-skill-wrapper.test.tspasses 62/62 with factory.md at 4,178 bytes; the Codex-host render of the edited template succeeds in an owned worktree. The Codex dry-run in the main checkout was setup-blocked because.agents/is gitignored and was never generated there, so the tool's overall verdict isblockedon that one optional probe.Eval Results
evals: none owed at the PR tier.
bun run eval:select --base origin/mainpicked the pr profile (full fallback, from crew/docs/captain.md) with no quality judges and no quick live coverage; its behaviors stay scheduled and release coverage. CI's route skipped eval-slices.Scope Drift
Scope Check: CLEAN. One commit (1a111aa); the 9 files match its stated intent.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch).
Issues
ISSUE_LINKS: none
Verification Results
CI_CARRY: accepted ci-carry tree=a17d486dd70d tests=36878 runs=42690432152/1 profiles=ci-reuse/free-tests heads=1a111aa60269 verified=2026-11-09T20:17:32.814Z
PREGATE_VERIFY: ok pregate requires-remote cleared is current for tree a17d486dd70d (macos-named-regressions from run 42690432152/1, windows-smoke from run 42690431946/1, remote gate from the CI carry)
TODOS
No TODOS.md changes.
Documentation
Status: current. Every doc the diff touches states the same rule, so no edits were needed.
Scope: the 9 committed files from f75ce6f to 1a111aa (none staged, unstaged or untracked), plus a search of docs/unattended.md, docs/ship-budget.md, docs/captain.md, capy/skill/gstack/captain.md, SKILL.md and the runaway-stopper templates for older token-handoff wording.
Documentation health:
Coverage debt: none new. The rule change has reference coverage in the Captain manual, factory.md and the skill, and that is enough for a policy change. One gap is known and disclosed: the gstack-runaway scan can't tell a crew thread from a standing thread, so the docs tell the reader to ignore its ROTATE flag for a crew thread holding a PR.
Diagram drift: none.
Test plan
bun run gen:skill-docs --dry-run: FRESHbun test test/capy-skill-wrapper.test.ts: 62 pass, 0 failAgent notes
GST-2192 (GSTA-463). Rules R70 as amended and R89, approved by Garry 2026-11-09 ("do it"), relayed by FOUN-32. /ship ran unattended at 1a111aa (run ship-4240). The plan line is missing (PLAN warn): no autoplan ran for this rules change and none of the listed exemptions fits. gstack: ok 1.98.0.0 for=ship.
Agent notes