Skip to content

Remove the /connect-chrome alias when /open-gstack-browser is disabled (#4308) - #4319

Closed
szsunyuan wants to merge 2 commits into
garrytan:mainfrom
szsunyuan:fix/4308-disabled-skill-alias
Closed

szsunyuan wants to merge 2 commits into
garrytan:mainfrom
szsunyuan:fix/4308-disabled-skill-alias

Conversation

@szsunyuan

@szsunyuan szsunyuan commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Disabling /open-gstack-browser now takes its backwards-compat alias /connect-chrome off too. Before, gstack-config set disabled_skills open-gstack-browser removed the skill's own entry and left the alias in Claude Code's skill list.

Why (in your own words)

setup installs /connect-chrome as a second entry for /open-gstack-browser: a copy of that skill's SKILL.md with name: rewritten, written by _install_alias_skill_md into ~/.claude/skills/connect-chrome (gstack-connect-chrome with skill_prefix). disabled_skills reaches a Claude install through bin/gstack-relink, which walks the checkout's skill directories and cleans the entries named after each disabled skill. The alias never comes up in that walk. The loop skips the symlinked connect-chrome source dir on purpose (#2201), and a checkout made without symlinks has no such dir at all. So the alias outlives the skill it points at, and /connect-chrome still loads a skill the user turned off.

This addresses #4308, reported with reproduction steps by @dipbazz. The issue left one thing unchecked, whether the next full ./setup clears the alias. It does not (transcript below). setup's alias installer returns early for a disabled skill, which keeps a fresh install clean but removes nothing that is already there.

Validation status: Full free CI passed on head 4398d0d18 (35 checks passed, 21 skipped, none failed), including all eleven free-suite shards, typecheck, macOS named regressions, Windows setup and Windows smoke. The three new cases fail on unchanged main and pass with the fix. Locally, 199 focused checks pass on the final tree, and the full free suite ran once with every failing file rerun alone on this head and on unchanged main (below): none of the failures comes from this change. Required selected paid coverage and remaining shipping reviews are still pending; skipped fork jobs are not passes.

Why this shape

gstack-config set disabled_skills runs gstack-relink, not setup, so the removal has to live in relink for the command to take effect when the user runs it. relink already has the function for the job. _cleanup_skill_entry removes an entry only when it can prove gstack owns it, and it already recognizes a copy whose name: line was rewritten to the entry's own name, which is what the alias is. The fix is two calls to it in the branch that handles a skill kept off.

The two alias names are spelled out because a checkout without symlinks gives relink nothing to discover them from. setup and bin/gstack-uninstall already spell out the same names.

Nine lines in one script, two cases in relink's owner test file, one case in the disabled_skills setup suite, and one changelog fragment. Fine to absorb into a wave.

What it does

  • When open-gstack-browser is kept off, gstack-relink also cleans ~/.claude/skills/connect-chrome and ~/.claude/skills/gstack-connect-chrome, through the same ownership gate as every other entry.
  • A user's own skill named connect-chrome is reported and left byte-identical, like any other entry gstack cannot prove is its own.
  • Adds two cases to test/relink.test.ts. One removes both alias names on a checkout with no symlinked alias dir, and checks that an enabled skill keeps its alias. The other keeps a user's own connect-chrome skill.
  • Adds one case to the disabled_skills (#1206) block of test/setup-install-registry.test.ts. It runs the real ./setup and follows the alias through disable, setup, enable and setup.

What it deliberately does not do

Live evidence

Bun 1.4.4 on Linux, LC_ALL=C, private HOME and GSTACK_HOME. No browser or live model was used. The transcripts come from the real ./setup and gstack-config, run against a throwaway HOME by the repo's install fixture (the real checkout files with stubbed binaries). The listings are filtered to the two names involved, and setup's own output is left out.

Actual CLI before and after

Before, on main at bc858ffc6:

$ ./setup --host claude --no-prefix
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
connect-chrome
open-gstack-browser
$ gstack-config set disabled_skills open-gstack-browser
Router: disabled skills left out of ~/.claude/skills/gstack/SKILL.md
Relinked 59 skills as flat names
Disabled (gstack-config disabled_skills, not registered): open-gstack-browser
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
connect-chrome
$ ./setup --host claude --no-prefix
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
connect-chrome

The last two commands are the step the issue left unchecked. A full ./setup leaves the alias in place too.

After, on this branch:

$ ./setup --host claude --no-prefix
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
connect-chrome
open-gstack-browser
$ gstack-config set disabled_skills open-gstack-browser
Router: disabled skills left out of ~/.claude/skills/gstack/SKILL.md
Relinked 59 skills as flat names
Disabled (gstack-config disabled_skills, not registered): open-gstack-browser
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
(nothing)
$ ./setup --host claude --no-prefix
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
(nothing)
$ gstack-config set disabled_skills ""
Relinked 60 skills as flat names
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
open-gstack-browser
$ ./setup --host claude --no-prefix
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
connect-chrome
open-gstack-browser

A prefixed install where the user owns a skill named connect-chrome, on this branch. gstack's gstack-connect-chrome goes, and the user's skill stays byte-identical and is reported:

$ ./setup --host claude --prefix
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
gstack-connect-chrome
gstack-open-gstack-browser
# the user adds their own skill named connect-chrome
$ gstack-config set disabled_skills open-gstack-browser
Router: disabled skills left out of ~/.claude/skills/gstack/SKILL.md
Relinked 59 skills as gstack-*
Disabled (gstack-config disabled_skills, not registered): open-gstack-browser
Skipped 1 foreign entry (not gstack-managed, left untouched): connect-chrome
  skipped connect-chrome: existing entry is not gstack-managed (foreign skill with the same name) — left untouched
exit=0
$ ls ~/.claude/skills | grep -E 'chrome|open-gstack'
connect-chrome

The reporter's checkout shape, on this branch. The reporter is on Windows, where a checkout without symlink support has connect-chrome as a plain file. A small install built that way on Linux gives the reporter's second message word for word, and disabling the skill then removes the alias:

$ gstack-config set disabled_skills connect-chrome
Error: unknown skill 'connect-chrome' in disabled_skills. Did you mean 'context-restore'? Existing value left unchanged.
exit=1
$ ls ~/.claude/skills
connect-chrome context-restore open-gstack-browser ship
$ gstack-config set disabled_skills open-gstack-browser
Relinked 2 skills as flat names
Disabled (gstack-config disabled_skills, not registered): open-gstack-browser
exit=0
$ ls ~/.claude/skills
context-restore ship

Failing-first regression

The three new cases were written before the fix and run against unchanged bin/gstack-relink:

$ bun --no-env-file --no-load-bunfig test test/relink.test.ts -t '#4308'
1308 |     expect(fs.existsSync(path.join(skillsDir, 'connect-chrome'))).toBe(false);
error: expect(received).toBe(expected)
Expected: false
Received: true
(fail) gstack-relink: a disabled skill takes its alias with it (#4308) > disabling open-gstack-browser removes its connect-chrome alias under both names, and an enabled skill keeps it
1325 |     expect(out).toContain('skipped connect-chrome');
error: expect(received).toContain(expected)
Expected to contain: "skipped connect-chrome"
Received: "Relinked 1 skills as flat names\nDisabled (gstack-config disabled_skills, not registered): open-gstack-browser"
(fail) gstack-relink: a disabled skill takes its alias with it (#4308) > a user's own connect-chrome skill is reported and left byte-identical

 0 pass
 63 filtered out
 2 fail

$ bun --no-env-file --no-load-bunfig test test/setup-install-registry.test.ts -t '#4308'
201 |     expect(existsSync(alias)).toBe(false);
error: expect(received).toBe(expected)
Expected: false
Received: true
(fail) disabled_skills (#1206) > disabling open-gstack-browser takes /connect-chrome with it, across setup runs, until the skill is enabled again (#4308)

 0 pass
 16 filtered out
 1 fail

The second relink case fails on main only at its last line. Nothing there looks at the alias name, so the user's skill is safe but also never reported. Its file-content assertions are the guard for this change. After the fix all three pass (3 pass, 24 expect() calls).

Focused checks

Commands ran under the isolated environment above, on the final tree.

Check Pass Fail
test/relink.test.ts (relink owner file, including the two new cases) 65 0
test/setup-install-registry.test.ts (real ./setup, including the new case) 17 0
relink, alias and ownership suites: relink-disabled-router, retired-skills, crew-skills-on-capy, setup-alias-name-uniqueness, setup-link-ownership, plan-mode-preamble-render, uninstall-windows-copies 80 0
test/test-of-test-ratchet.test.ts, test/module-size-ratchet.test.ts, test/spawnsync-timeout-tripwire.test.ts, test/egress-receipt-wiring.test.ts 22 0
test/changelog-fragments.test.ts 15 0
Total 199 0

Each run was bun --no-env-file --no-load-bunfig test <files> --timeout=300000. Product bun run typecheck exits 0. bun run typecheck:test reports 812 known diagnostics, none new. gstack-plain-title check on the title, branch, commit subjects, fragment and this body prints PLAIN_TITLE: ok; gstack-prose-lint --gate on the fragment prints PROSE_LINT: ok; git diff --check is clean; gstack-redact --repo-visibility public on the exact outgoing patch reports zero findings.

One earlier run of test/setup-install-registry.test.ts had a failure in an existing case, a second checkout never silently replaces the global Claude install. The same case failed the same way on unchanged main, because this container's claude CLI wrote its own policy files into the fixture's ~/.claude between the two snapshots the case compares. It did not recur in the run counted above.

Full free suite and base control

bun run test ran once locally on the tree of the first commit, which differs from this head only by the two-line setup comment the second commit removes. All five shards reported failures, 345 failing tests in 91 files by the runner's count. That is 90 repo test files and one probe.test.ts that a browser test generates. This container's Playwright browsers are Chromium build 1243, while the repo pins Playwright 1.65.0 (build 1254), so every browser launch fails here; 41 of the 90 files are under browse/test/. The other 49 are spread over /cso, iOS QA, Ubicloud runner and other suites. They were not diagnosed one by one, only compared with main. Neither test file this PR changes is among the 90.

Every failing file was then rerun on its own, with the same flags, on this head (4398d0d18) and on unchanged main at bc858ffc6:

Result Files Fails on this branch Fails on unchanged main
Fails on main as often or more 86 363 365
Passes alone on both 3 0 0
Fails equally once nothing else is running 1 5 5
  • The three that pass alone are test/harness-register.test.ts, test/qa-browser-deadline-evidence.test.ts and test/plan-count-timeout.test.ts. The last one failed 1 of 2 on the branch in the first rerun pass, which ran four files at a time, and passes 2 of 2 on both sides with nothing else running.
  • browse/test/chromium-profile-isolation.test.ts failed 6 on the branch and 5 on main in that first pass, and 5 on each side with nothing else running.

Scope

  • Changed: four files, +102/-0 against main at bc858ffc6: bin/gstack-relink, test/relink.test.ts, test/setup-install-registry.test.ts and changelog.d/fix-4308-disabled-skill-alias.md. Two commits: d42a0d83a69b844d025b5e3c197085e849f7ff6d (the fix, its cases and the fragment) and 4398d0d1852b2ecf4a63ae3b26ed07322536b31f (takes the setup comment back out).
  • Verified live by: full free CI on this head, the real ./setup and gstack-config before and after in a throwaway HOME, the reporter's checkout shape rebuilt on Linux, the failing-first runs of the three new cases, 199 focused passing checks, the full free suite with a per-file base control on unchanged main, both typechecks, and exact-patch lint and redaction scans.
  • Did NOT test: this fix on native Windows or macOS (CI's Windows setup, Windows smoke and macOS named-regressions jobs passed on this head, but it was not confirmed that any of them disables a skill that has an alias; the reporter's checkout shape was rebuilt on Linux instead), a green full free suite locally (this container cannot launch the pinned Chromium; CI ran it green on this head), a live Claude Code session listing its skills, or any paid lane.

The free paid-coverage planner (bun run eval:select --base upstream/main) selects two behavioral probes for this diff in the PR profile, gstack-upgrade-happy-path and skillmd-setup-discovery, no quality judges, and defers nothing. Neither probe was run; neither receives pass credit here.

Liveness proof (required for external contributors)

image

Checklist

  • Liveness screenshot attached (GSTACK PR typed live into a real surface).
  • This is not a generated-file-only diff; no generated file is changed.
  • No ETHOS.md edits, and no changes to voice / founder perspective / YC references.
  • New public command / external service / host adapter has an accepted issue linked: N/A, none added.
  • Linked issue and reproduction: Disabling open-gstack-browser leaves its installed connect-chrome alias registered #4308.

Test plan

  • Reproduce the alias surviving disabled_skills with the real ./setup and gstack-config, and show that a later ./setup keeps it.
  • Prove the three new cases fail on unchanged main.
  • Show the alias leaving with the skill, staying off across ./setup, and returning once the skill is enabled and setup runs again.
  • Show the prefixed alias name removed and a user's own connect-chrome skill left byte-identical.
  • Rebuild the reporter's checkout shape (no symlinked alias dir) and show the fix there.
  • Pass the relink owner suite, the disabled_skills setup suite, the alias and ownership suites, ratchets and layout guards.
  • Run the full free suite once and rerun every failing file on this head and on unchanged main.
  • Pass strict product types and the unchanged test-type debt limit.
  • Check the plain title, fragment prose, whitespace and the exact outgoing patch for sensitive content.
  • Complete full free acceptance on this PR head (CI on 4398d0d18: 35 passed, 21 skipped).
  • Complete required selected paid coverage, with maintainer-run fork-PR coverage where needed.
  • Complete remaining shipping reviews and verification before merge.

Fork PRs do not receive upstream eval secrets. Skipped paid jobs are not passes; required maintainer-run coverage remains necessary before merge.

Fixes #4308.

szsunyuan and others added 2 commits November 12, 2026 10:13
garrytan#4308)

`gstack-config set disabled_skills open-gstack-browser` removed the
skill's own entry but left ~/.claude/skills/connect-chrome, the
rewritten-copy alias setup installs, so /connect-chrome stayed in the
skill list. gstack-relink cleaned only the entries named after the
skill: its loop skips the symlinked connect-chrome source dir, and a
checkout made without symlinks has no such dir at all.

When open-gstack-browser is disabled, gstack-relink now also cleans
connect-chrome and gstack-connect-chrome through the same ownership gate
as every other entry, so a user's own skill with that name stays. setup
already declines to write the alias for a disabled skill, and writes it
back on its next run once the skill is enabled again.

Add relink cases for both alias names and for a user's own
connect-chrome skill, and a real-setup case that follows the alias
through disable, setup, enable and setup.

Fixes: garrytan#4308

Co-Authored-By: Claude Code <[email protected]>
The previous commit added a two-line cross-reference comment above
setup's alias installer. Any edit to setup makes the paid-eval planner
fall back to every gate case, which is out of proportion for a comment,
so take it back out. The fix itself is in bin/gstack-relink, whose
comment already names setup's _install_alias_skill_md.

Co-Authored-By: Claude Code <[email protected]>
@trunk-io

trunk-io Bot commented Nov 12, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Thanks @szsunyuan. This is a clean fix for #4308, and the tests cover both the plain and the prefixed alias. We're picking it up: we'll bring the change onto current main ourselves and credit you when it lands. Nothing more is needed from you.

@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-801) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed.

@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thank you. Your relink change and tests were rebuilt on current main and landed in #4682, with you credited as co-author. In review the alias cleanup was made to keep a user's own files, removing only the generated SKILL.md. Closing this in favour of that PR.

@capy-ai capy-ai Bot closed this Nov 22, 2026
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.

Disabling open-gstack-browser leaves its installed connect-chrome alias registered

1 participant