Repository navigation
Refuse to archive a thread that holds an open PR, and close a landed PR's issue (GST-2188) - #4244
Merged
Merged
Conversation
|
😎 This pull request was merged. |
…GST-2188) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…R's issue (GST-2188) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ly that long PR lists cannot be checked Review-Finding: p1/specialist-batched#2 reader=testing Review-Finding: p1/specialist-batched#3 reader=state-machines Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#3 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…des in any case when closing a landed PR's issues Review-Finding: p3/outside-voice#1 reader=outside-voice Review-Finding: p3/outside-voice#2 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…one of its PRs is open Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t budget after the rebase Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
force-pushed
the
capy/catch-orphaned-work-at-archive-and-land
branch
from
November 9, 2026 21:25
f8fa4e1 to
4ae42d8
Compare
garrytan
added a commit
that referenced
this pull request
Nov 9, 2026
…with #4244 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Nov 9, 2026
…with #4244 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 9, 2026
…at hold a PR (GST-2226) (#4250) * Stop the runaway scan from telling Captains to rotate crew threads that hold a PR (GST-2226) Only a thread marked standing rotates, and never while it holds an open PR or its PR list is missing; a crew thread gets one CHECK_IN past 1B own tokens (R70 as amended, R91). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Trim the runaway-stopper wording so it fits the skill context budget with #4244 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Reword the runaway-scan changelog entry so it passes the prose check 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>
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 thread that still has an open pull request can no longer be archived, and the issue a merged pull request names now closes in the same step. This serves the crew goal that no PR or issue is left with nobody to wake it.
Summary
gstack-archive-check threadruns right before a Captain archives a crew thread. The Captain writes the raw thread and open-issue reads to a file, and the check re-reads every PR the thread holds from GitHub. It refuses while any PR is open, successor or not (R91), or while an issue in a working state is still assigned to the thread. It refuses stale, truncated, header-only or unparsable reads and failed gh reads. Every run prints a handoff stub for a successor brief.gstack-archive-check landed --pr <n>names the tracker codes in a merged PR's title so the Captain closes those issues in the same program.What changed
bin/gstack-archive-checkandlib/archive-check.ts, with fiveARCHIVE_*result codes and troubleshooting sections.crew/docs/captain.md,capy/skill/gstack/factory.mditem 12,/captain,/runaway-stopperand the successor brief now say a thread with an open PR stays until that PR merges or closes.docs/skills.mdsays the same for the runaway-stopper Stop step.Why
A 6-hour sweep found orphans hours after they happened: 24 archived threads with open PRs in the first sweep, then 14 more plus 12 live issues. Checking at archive time stops them before they exist.
Blast radius
Captains archiving crew threads and the land step. The check fails closed, so a bad read blocks an archive instead of allowing one.
gstack-ship-queueis unchanged.Documentation
Re-audit after rebasing onto main 6088c86 (#4240). Scope: the two files with rebase conflicts,
capy/skill/gstack/factory.mditem 12 and thedocs/skills.md/runaway-stopper Stop bullet, plus cross-reference checks againstcrew/docs/captain.mdanddocs/troubleshooting.md. Result: current, with no edits. Both conflict files keep #4240's PR-scoped handoff and 1B check-in wording and add this branch's rule never to archive a thread that holds an open PR (R91), enforced throughgstack-archive-check thread. Thegstack-archive-checkdocs and troubleshooting codes agree with that wording. Debt: none found. The rest of the docs were covered by the first audit (ship4244-docs1).Documentation exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-09 via Captain reply relayed by GSTA-462 at head 4ae42d8: runaway-stopper/SKILL.md step 3 was trimmed by 2 lines after docs re-audit ship4244-docs2, to fit the context budget; the trim was reviewed by the granted fix-check (no findings above the floor). Accepted by Captain GStack Minder (GSTA-36), 2026-11-09.
Test plan
test/archive-check.test.ts: written failing first, then extended by the review fixes (stub truncation,landedCLI, header-only issue lists, case-insensitive codes).Agent notes
Approvals
Approved: yes (record r-67ae61234af2). The full approval record stays private.
Plan: approved (record r-4ebf5d80b9a2)
Plan check: approved (record r-4ebf5d80b9a2)
REVIEW_LOOP: plan once (gate panel), one fix round, owner grants a-17bfd75b8437 and a-afeb441aaf97 (scoped fix-checks), docs-risk exception a-5067421a16e0.
Agent notes