Skip to content

fix(setup): add Claude runtime alias for renamed installs#1885

Draft
maxpetrusenkoagent wants to merge 1 commit into
garrytan:mainfrom
maxpetrusenkoagent:hermes/oss-pr-2026-06-06-openclaw-1882
Draft

fix(setup): add Claude runtime alias for renamed installs#1885
maxpetrusenkoagent wants to merge 1 commit into
garrytan:mainfrom
maxpetrusenkoagent:hermes/oss-pr-2026-06-06-openclaw-1882

Conversation

@maxpetrusenkoagent

@maxpetrusenkoagent maxpetrusenkoagent commented Jun 6, 2026

Copy link
Copy Markdown

Summary

Fixes #1882.

Claude-host skill bodies still contain runtime references to ~/.claude/skills/gstack/.... When the checkout is installed as ~/.claude/skills/<non-gstack>, setup links slash-command wrappers but leaves those runtime paths unresolved.

This PR adds a narrow setup-time runtime alias:

  • create ~/.claude/skills/gstack -> ~/.claude/skills/<install-name> only for global Claude installs under $HOME/.claude/skills
  • skip canonical ~/.claude/skills/gstack installs
  • skip non-Claude skills/ directories to avoid scope creep
  • refuse to replace an existing separate real ~/.claude/skills/gstack install

No generated SKILL.md files are rewritten.

Verification

  • bun test test/setup-claude-runtime-alias.test.ts test/setup-windows-fallback.test.ts test/setup-sections-linking.test.ts test/setup-conductor-worktree.test.ts
    • 23 pass, 0 fail
  • bash -n setup
  • git diff --check
  • Temp HOME smoke test:
    • installed from $TMP_HOME/.claude/skills/gstack-dev
    • verified $TMP_HOME/.claude/skills/gstack -> $TMP_HOME/.claude/skills/gstack-dev
    • verified $TMP_HOME/.claude/skills/gstack/bin/gstack-config get skill_prefix runs through the hardcoded runtime path

Review

  • Claude subagent review: approved, no blocking findings
  • Codex autoreview first pass: requested a Claude-only scope guard
  • Codex autoreview second pass after scope guard: APPROVE
  • Post-open exact PR diff Codex review: APPROVE
    • Diff SHA-256: 086d3663f24146281aa563d8eb29019fc1b56c21d73ef2450c97833227d15475

CI / checks

GitHub currently reports no checks on the fork branch for this draft PR, so the exact-diff Codex review above was used as the fallback reviewer gate.

Notes

A broader bun run test:windows run still has the pre-existing unrelated browse/test/terminal-agent.test.ts lazy-spawn failure. The touched files and this patch do not affect that path.

@trunk-io

trunk-io Bot commented Jun 6, 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

@maxpetrusenko

Copy link
Copy Markdown

Codex/autoreview: CLEAN

Reviewed the exact PR diff for #1882. No blocking findings.

Evidence checked:

  • Runtime alias is scoped to $HOME/.claude/skills only.
  • Canonical skills/gstack installs are left unchanged.
  • Existing separate real skills/gstack installs are not replaced.
  • No generated skill bodies are rewritten.
  • Regression tests cover renamed install, non-Claude skills dir, and canonical install cases.

Verification from PR body / agent run:

  • bun test test/setup-claude-runtime-alias.test.ts test/setup-windows-fallback.test.ts test/setup-sections-linking.test.ts test/setup-conductor-worktree.test.ts PASS, 23 tests
  • bash -n setup PASS
  • git diff --check PASS
  • temp HOME smoke test PASS

Residual risk: GitHub currently reports no checks on this fork draft PR; gh pr view reports mergeable=MERGEABLE.

@jbetala7

jbetala7 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Possible overlap with #1819 (opened 2026-05-31, Fixes #1202 / addresses #1694) - flagging so the two can be coordinated. #1819 relocates a direct ~/.claude/skills/gstack checkout out to ~/.gstack/repos/gstack and explicitly states it keeps ~/.claude/skills as the alias root, with "a runtime-only sidecar is created later in the Claude install step." This PR adds exactly that runtime sidecar/alias at ~/.claude/skills/gstack via ensure_claude_runtime_alias().

So the two are two halves of the same problem - a renamed or relocated install must still resolve ~/.claude/skills/gstack/... runtime paths (here keyed to #1882 vs #1202/#1694) - and both add new functions to the same setup region near link_claude_root_skill_alias, so they will likely textually conflict. There is also a real question of whether the sidecar/alias ends up created once or twice once both install paths exist. Might be cleanest to land them together (or rebase one onto the other) so the alias/sidecar creation lives in a single place.

Not a blocker on this PR's logic - the ensure_claude_runtime_alias guards (skip the canonical gstack install, skip non-Claude skills/ dirs, refuse to clobber a separate real install) look sound, and the helper-ordering test is a nice touch.

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.

Skills hardcode ~/.claude/skills/gstack/ paths — any install dir not named gstack silently breaks after setup

3 participants