Skip to content

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 into
mainfrom
garrytan/gst-290-review-voice-no-self-upgrade
Oct 31, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
garrytan/gst-290-review-voice-no-self-upgrade

Conversation

@garrytan

@garrytan garrytan commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3667,
  "head": "9c19e9369064c7a4ba3dea21f0ace735813c1590",
  "version": "1.91.351.0",
  "base": "main",
  "gate": {
    "remote-pregate": {
      "pass": 18162,
      "fail": 0,
      "skip": 0
    },
    "focused": {
      "pass": 24,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "queue_mode": "stamp-at-merge",
  "head_tree": "c01e4a1dcd660365667f9a8e9476ca50c94e3ed8",
  "product_patch_id": "02578e50862be638aa4317646daa37dcfa241576",
  "gstack_version": "1.91.351.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 23,
    "rules": "1ef4ba88e39e688c",
    "base": "8be7f213859ccbb5618d50f618c999936f7eb339",
    "registry": "8be7f213859ccbb5618d50f618c999936f7eb339",
    "gate_scan": {
      "tagged": 0,
      "head": "9c19e9369064c7a4ba3dea21f0ace735813c1590"
    },
    "reasons": [
      "gate-class",
      "runtime=23<=50"
    ]
  },
  "pregate": "requires-remote cleared @c01e4a1dcd66 (1 checks, current for 9c19e9369064)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41172635620",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41172635661",
    "pregate.json/remote_gate: remote-gate tree=c01e4a1dcd66 tests=18162"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/capy-install.md, docs/troubleshooting.md, docs/captain.md, captain/templates/DIGEST.md and captain/SKILL.md(.tmpl) updated in the PR; lib/autoplan-prompts.ts:145 still says the trailer command fast-forwards the checkout (noted in Review notes)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 6,
    "fixed": 0,
    "scope": "frozen",
    "est_input_tokens": 16275,
    "dispatches": {
      "specialist": 1,
      "red-team": 1,
      "adversarial": 1,
      "outside-voice": 1
    }
  }
}

On a Capy machine, an /autoplan reviewer runs install.sh --for review-voice against 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 as for=review-voice, so the lane's next workflow was refused with INSTALL_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 and after: a review-voice install never self-upgrades a shared checkout

docs/capy-install.md, reviewer machines: before, a review-voice install could fast-forward the checkout a lane shares; after, it never self-upgrades, prints SELF_UPGRADE: skipped (… UPGRADE_SKIPPED) and stays ok with a behind= note.

  • bin/gstack-capy-session: an install profile (--for review-voice) never self-upgrades. When origin is ahead it prints SELF_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 installer behind=, the bin/gstack-upgrade fix and the blocked reason, so the trailer stays ok with a WARN behind row. This holds with or without a lease, and GSTACK_UPGRADE_FORCE=1 does not override it. The profile check comes from bin/gstack-doctor-components.sh; if that file cannot be read, the fallback still treats review-voice as a profile (fails closed).
  • --check --for review-voice names bin/gstack-upgrade as the fix instead of the install rerun, which would not move a reviewer checkout.
  • The bootstrapper's fast-forward below the supported minimum is unchanged (the bootstrapper is frozen; filed as GST-395).
  • Captain digest (GST-371): docs/captain.md, captain/templates/DIGEST.md and /captain now say that when the controller archives a thread, it drops that thread from In progress in the same turn.
  • changelog.d/gst-290-review-voice-no-self-upgrade.md carries the CHANGELOG entry; the merge step assigns the version.

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-voice takes the new branch; workflow installs (--for ship, --for autoplan and 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 with GSTACK_UPGRADE_FORCE=1), behind with gstack-doctor-components.sh missing, current, and --check. The fixture now seeds gstack-doctor-components.sh. Three of the four failed on main (the no-lease case printed SELF_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 a behind=1 … (UPGRADE_SKIPPED) trailer. All nine cases are green.
  • The GST-290 repro, rerun with the patched session in the sandbox: with the lease removed, the reviewer install printed the skip, HEAD stayed at 1.91.348.0, the verdict stayed 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:

  • Wrong fix hint when upgrades are disabled (bin/gstack-capy-session:128): in install mode the GSTACK_CAPY_SELF_UPGRADE=off and GSTACK_CAPY_AUTO_UPGRADE=0 branches 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. --check names bin/gstack-upgrade. HEAD never moves either way.
  • The reviewer still rewrites the lane's launch file (bin/gstack-capy-install:687, older code outside this diff): a review-voice install on the same checkout rewrites the lane's .env launch file, can republish .launch with 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 hit BUN_RESOLUTION_DRIFT. Found by reading the code, not reproduced.
  • The installer's fallback stub disagrees with the session's (bin/gstack-capy-install:77, broken checkout only): if bin/gstack-doctor-components.sh can'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 writes ok=false over the lane's verdict.
  • Following the fix hint can still move HEAD (bin/gstack-capy-session:133): the hint names bare bin/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.
  • Stale reviewer prompt (lib/autoplan-prompts.ts:145): it still says the trailer command fast-forwards the checkout.
  • Test coverage (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 in test/capy-review-voice.test.ts depends on earlier tests' fixtures and errors when run alone with -t.

Not in this PR

  • GST-395: the bootstrapper's below-the-floor fast-forward under review-voice.
  • GST-396: gstack-upgrade treats 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 typecheck clean; bun run gen:skill-docs leaves the tree unchanged
  • Focused: parity-suite, captain-skill, changelog-fragments: 24 pass, 0 fail; prose lint ok on the fragment
  • Reviewers' runs of test/capy-skill-wrapper.test.ts and test/capy-review-voice.test.ts at 9c19e93: green, no failures (44 tests)
  • Remote pregate at 9c19e93 (tree c01e4a1dcd66, run 20261031T053432Z-250488-2d06): 18,162 tests, 0 failed, Ubicloud VM destroyed (left=0)
  • Free Tests (run 41172635620) and Windows Free Tests (run 41172635661) green at 9c19e93; both pregate lanes cleared, gstack-pregate verify ok

Open in Capy

garrytan and others added 2 commits October 31, 2026 05:26
…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>
@trunk-io

trunk-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix(capy): a --for review-voice install never self-upgrades the shared checkout (GST-290) v1.91.356.0 fix(capy): a --for review-voice install never self-upgrades the shared checkout (GST-290) Oct 31, 2026
@capy-ai
capy-ai Bot merged commit 99706a4 into main Oct 31, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant