Repository navigation
Upgrading from inside the gstack checkout no longer reinstalls Codex you removed (#4835) - #4850
Merged
Merged
Conversation
…you removed (#4835) The gstack checkout's own .agents/skills/gstack is its Codex render, not a project install, so the known install roots leave it out. A separate project's vendored copy is still discovered. Reported by @schubter. Fixes #4835 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.
Running
./setup --refresh-registered(what/gstack-upgraderuns) from inside the gstack checkout no longer puts Codex skills back into~/.codex/skillsafter you removed them.Why: upgrades should refresh only the installs you have. Reported by @schubter. Fixes #4835.
Nothing to do: the next upgrade refreshes only the installs you actually have.
What changed
Inside the gstack checkout, the checkout's own Codex render is no longer listed as a project install.
Tests
bun test test/setup-install-registry.test.ts: 19 pass, 0 fail, including the three new setup: --refresh-registered reinstalls Codex globally from the checkout's own .agents render #4835 cases, which failed on main (8982588) before the fixbun run typecheckandbun run typecheck:test: cleanBefore/after as text: Inside the gstack checkout, the checkout's own Codex render is no longer listed as a project install
A user with only a Claude install removed
~/.codex/skills/gstack, ran the upgrade from inside their gstack checkout, and got Codex reinstalled globally. The checkout keeps its own Codex skill render at.agents/skills/gstack, and the upgrade's search for older installs treated that folder as a Codex install inside a project. Since the checkout lives under~/.claude/skills, setup then installed Codex globally and added it back to the checkout's installed hosts.The list of places setup checks for older installs (
gstack_install_known_rootsinbin/gstack-install-registry.sh) now leaves out the project Codex folder when it resolves, with symlinks followed, to the same checkout as the project root. A separate project that keeps its own gstack copy at.agents/skills/gstackis still found and refreshed../setup --statushad its own copy of this check, which is removed now that the shared list does it.Why
gstack's install rules say an upgrade refreshes exactly the installs you registered and never brings back one you removed (docs/ADDING_A_HOST.md, rule 3). This bug broke that rule for anyone who upgrades from inside their checkout.
Blast radius
The list feeds three callers, which are the upgrade's discovery of older installs (
setup),./setup --status, and the first record of a checkout's installed hosts (gstack_render_hosts_seedinbin/gstack-host-renders.sh). All three now ignore only a folder that resolves to the checkout it sits in, which was already what--statusdid; the new tests run the real./setupfor both the checkout case and the vendored-project case, and the existing install, host-render and Codex-scope tests pass unchanged.Pre-Landing Review
No blocking issues. The second reviewer noted one low-severity side effect, listed below and not fixed here.
Review notes
Below the blocking floor; recorded here and not fixed in this PR.
bin/gstack-install-registry.sh: a checkout that has no installed-hosts record yet, and no Codex install anywhere, no longer counts its own.agentsrender as Codex being used, so setup's host-render cleanup moves that render to a backup on the first run../setup --host codexbrings it back. This is the behavior setup: --refresh-registered reinstalls Codex globally from the checkout's own .agents render #4835 asks for.Documentation
Status: current. The docs already match this change, so nothing was edited.
Scope: the diff from base 8982588 to HEAD 8145261 (bin/gstack-install-registry.sh, the changelog fragment and test/setup-install-registry.test.ts), with no staged, unstaged or new files. I searched the docs for
--refresh-registered,.agents/skills/gstackand install-registry discovery.Documentation health:
.agents/skills/gstackcorrectly.Coverage debt: none. This is a bug fix that adds no public command, flag or environment variable. Diagram drift: none.
Issues
Fixes #4835
Agent notes
Refs GST-4007. Credit: @schubter reported #4835.
Approvals
No approvals recorded for branch setup-refresh-skips-checkout-codex-render.
Plan: exempt: bug fix with a failing-first test (R65)
Plan check: exempt bug fix
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen dispatches=1
Gate edits: none detected (3 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)