Repository navigation
v1.91.356.0 fix(capy): a --for review-voice install never self-upgrades the shared checkout (GST-290) - #3667
Merged
capy-ai[bot] merged 2 commits intoOct 31, 2026
Conversation
…d checkout (GST-290) Also: the Captain digest drops an archived thread from In progress in the same turn (GST-371). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
4 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.
On a Capy machine, an /autoplan reviewer runs
install.sh --for review-voiceagainst the same gstack checkout as the lane that dispatched it. Once the lane's workflow lease was more than 120 minutes old, the reviewer's install fast-forwarded that checkout and rewrote the install verdict asfor=review-voice, so the lane's next workflow was refused withINSTALL_UNVERIFIED … which does not cover claude that autoplan needs. Reproduced at 1.91.334.0 → 1.91.337.0 before the fix.What changed
docs/capy-install.md, reviewer machines: before, a review-voice install could fast-forward the checkout a lane shares; after, it never self-upgrades, printsSELF_UPGRADE: skipped (… UPGRADE_SKIPPED)and stays ok with abehind=note.bin/gstack-capy-session: an install profile (--for review-voice) never self-upgrades. When origin is ahead it printsSELF_UPGRADE: skipped (review-voice never self-upgrades a shared checkout; fix: <root>/bin/gstack-upgrade when no other session uses this checkout (UPGRADE_SKIPPED)), leaves HEAD alone, and hands the installerbehind=, thebin/gstack-upgradefix and the blocked reason, so the trailer stays ok with aWARN behindrow. This holds with or without a lease, andGSTACK_UPGRADE_FORCE=1does not override it. The profile check comes frombin/gstack-doctor-components.sh; if that file cannot be read, the fallback still treatsreview-voiceas a profile (fails closed).--check --for review-voicenamesbin/gstack-upgradeas the fix instead of the install rerun, which would not move a reviewer checkout.Why
A reviewer's one-line install check should never change the gstack a working lane depends on. Before this change, any /autoplan run that lasted past the lease age could break the lane that started it.
Blast radius
bin/gstack-capy-session, the session start every Capy install runs. Only--for review-voicetakes the new branch; workflow installs (--for ship,--for autoplanand the rest) self-upgrade exactly as before, which the existing lease and upgrade tests still cover. The rest is prose.Approvals
Plan: eng-only /autoplan run gst290-autoplan-20261030172019, gate_rev 2, approved by Garry ("Do it", 2026-10-31).
Summary
One commit, 9c19e93, on top of main 8be7f21. /ship changed no code: nothing reached the blocking floor.
Test Coverage
test/capy-skill-wrapper.test.ts: four new cases under "--for review-voice never self-upgrades a shared checkout": behind with no lease (also withGSTACK_UPGRADE_FORCE=1), behind withgstack-doctor-components.shmissing, current, and--check. The fixture now seedsgstack-doctor-components.sh. Three of the four failed on main (the no-lease case printedSELF_UPGRADE: done 1.0.1 -> 1.0.2); the whole file (35 tests) is green now. The existing autoplan upgrade and lease tests are unchanged.test/capy-review-voice.test.ts: the "origin moves" case now expects the skip, an unchanged HEAD and abehind=1 … (UPGRADE_SKIPPED)trailer. All nine cases are green.for=autoplan, and autoplan admission was ok.Pre-Landing Review
Review depth full (gate class: the install and upgrade path, 2 gate-tagged hunks). Four reviewers ran on the final diff: a batched specialist pass (testing, security, state machines) and a red-team pass on Claude Opus 5.5, a native adversarial pass on Claude Opus 5.5, and a cross-family outside voice on GPT-6.1 Sol. The red team found nothing. The outside voice confirmed the 120-minute lease bound and the 20-second warm budget in the code and tests, and the reviewers' own runs of the two test files passed with an unchanged HEAD. The adversarial pass deleted both new profile branches in a scratch clone, and 4 of the 5 new tests then failed.
Review notes
Informational, not fixed here:
bin/gstack-capy-session:128): in install mode theGSTACK_CAPY_SELF_UPGRADE=offandGSTACK_CAPY_AUTO_UPGRADE=0branches come before the review-voice branch, so a behind reviewer with either set is told to unset it and rerun--for review-voice, which still won't upgrade.--checknamesbin/gstack-upgrade. HEAD never moves either way.bin/gstack-capy-install:687, older code outside this diff): a review-voice install on the same checkout rewrites the lane's.envlaunch file, can republish.launchwith its own Bun without the project pins, and can remove the lane's node and npm links. Where a project pins another Bun, the lane may then hitBUN_RESOLUTION_DRIFT. Found by reading the code, not reproduced.bin/gstack-capy-install:77, broken checkout only): ifbin/gstack-doctor-components.shcan't be read, the session treats review-voice as a reviewer install but the installer doesn't, so it runs a full install and on failure writesok=falseover the lane's verdict.bin/gstack-capy-session:133): the hint names barebin/gstack-upgrade, which on Capy counts the capy-server lease as the caller's own (GST-396). The hint does say to run it only when no other session uses the checkout.lib/autoplan-prompts.ts:145): it still says the trailer command fast-forwards the checkout.test/capy-skill-wrapper.test.ts:447): the missing-components case stubs the installer, so it proves the session skips the upgrade, not that the real installer keeps the lane's verdict. The "origin moves" case intest/capy-review-voice.test.tsdepends on earlier tests' fixtures and errors when run alone with-t.Not in this PR
gstack-upgradetreats sibling capy-server leases as the caller's own, so after 120 minutes a sibling's full install can still move the checkout.Documentation
docs/capy-install.md (reviewer machines and session start), docs/troubleshooting.md (
UPGRADE_SKIPPED), docs/captain.md and the digest template are updated.Test plan
bun run typecheckclean;bun run gen:skill-docsleaves the tree unchangedtest/capy-skill-wrapper.test.tsandtest/capy-review-voice.test.tsat 9c19e93: green, no failures (44 tests)left=0)gstack-pregate verifyok