Skip to content

fix(test): hermetic-wiring skill-seeding tripwire can never pass on default ~/.claude installs - #2586

Closed
sneakygriff wants to merge 1 commit into
garrytan:mainfrom
sneakygriff:fix/hermetic-wiring-claude-install
Closed

sneakygriff wants to merge 1 commit into
garrytan:mainfrom
sneakygriff:fix/hermetic-wiring-claude-install

Conversation

@sneakygriff

Copy link
Copy Markdown
Contributor

Problem

The tripwire skill seeding stays under runRoot and reads the live repo tree, never operator ~/.claude asserts every seeded symlink target must NOT start with ~/.claude — and then that it MUST resolve into the live repo tree. On the default global-git install the repo itself lives at ~/.claude/skills/gstack, so every correct symlink carries the banned prefix: the two assertions can never both hold.

Evidence

Pristine c118e240 (v1.64.1.0), verified 2026-08-15 on macOS arm64:

  • worktree under ~/.claude/skills/ → the seeding test fails (pair-agent: symlink escapes to .../pair-agent/SKILL.md)
  • worktree anywhere else → passes

CI never sees this because dev checkouts don't live under ~/.claude — but every user following the README install path who runs the suite does.

Fix

Targets that realpath into the resolved repo ROOT are exempted before the operator-~/.claude ban (both sides realpath'd, so a symlinked $HOME can't dodge the tripwire). Genuine escapes — a target under ~/.claude but outside the repo — still fail with the specific escape message.

Verification

bun test test/hermetic-wiring.test.ts: 5/5 pass both at ~/.claude/skills/gstack and at a non-~/.claude worktree of this branch.

🤖 Generated with Claude Code

…~/.claude ban

The skill-seeding tripwire asserted every seeded symlink target must NOT
start with ~/.claude — but on the default global-git install the repo
itself lives at ~/.claude/skills/gstack, so every CORRECT symlink (which
must resolve into the live repo tree, as the very next assertion requires)
carried the banned prefix. The test could never pass on a default install:
pristine v1.64.1.0 (c118e24) fails it in any worktree under
~/.claude/skills/ and passes elsewhere (verified 2026-08-15).

Exempt targets that realpath into the resolved repo ROOT before applying
the operatorClaude ban — realpath both sides so a symlinked HOME can't
dodge the tripwire. Genuine escapes (a target under ~/.claude but outside
the repo) still fail with the escape message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Aug 15, 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

@garrytan

Copy link
Copy Markdown
Owner

Thank you — this landed in v1.67.0.0 (credited in the CHANGELOG). Closing since the fix is on main. 🙏

@garrytan garrytan closed this Aug 17, 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.

2 participants