From dd6357e6700a4bc595742416db593fc57c15a2f1 Mon Sep 17 00:00:00 2001 From: mos-dt-0 Date: Tue, 11 Aug 2026 17:11:11 -0500 Subject: [PATCH] test(skill): install linker asserts harness-home link topology The two install-linker-compatibility tests still asserted the pre-isolation behavior (mosaic skill links planted in $HOME/.claude/skills). This branch deliberately moved the link farm into the mosaic-owned harness homes ($MOSAIC_HOME/.claude/skills) and demoted the base-install dirs to cleanup-only legacy targets, so the tests now assert the new topology: the skill links appear under the harness home, foreign links in the legacy dir are preserved, and no new mosaic link is planted in the base install. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Dtdjx4Gxude9fwyLezCrhh --- packages/mosaic/src/commands/skill.spec.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/mosaic/src/commands/skill.spec.ts b/packages/mosaic/src/commands/skill.spec.ts index 8d31765b..17ec47f7 100644 --- a/packages/mosaic/src/commands/skill.spec.ts +++ b/packages/mosaic/src/commands/skill.spec.ts @@ -332,9 +332,11 @@ describe('Claude skill bridge', () => { expect(result.status, result.stderr).toBe(0); expect(readlinkSync(liveForeignLink)).toBe(liveForeignTarget); expect(readlinkSync(danglingForeignLink)).toBe(join(mosaicHome, 'foreign-missing')); - expect(readlinkSync(join(paths.claudeSkillsDir, 'missing'))).toBe( + // Skills now link into the mosaic-owned harness home, never the base install. + expect(readlinkSync(join(mosaicHome, '.claude', 'skills', 'missing'))).toBe( join(paths.mosaicSkillsDir, 'missing'), ); + expect(existsSync(join(paths.claudeSkillsDir, 'missing'))).toBe(false); }); it('preserves live and dangling foreign Claude symlinks while linking missing skills', () => { @@ -349,17 +351,20 @@ describe('Claude skill bridge', () => { symlinkSync(external, liveLink); symlinkSync(join(root, 'external-missing'), danglingLink); + const mosaicHome = join(root, '.config', 'mosaic'); const result = spawnSync('bash', [LEGACY_SYNC_SCRIPT, '--link-only'], { encoding: 'utf8', - env: { ...process.env, HOME: root, MOSAIC_HOME: join(root, '.config', 'mosaic') }, + env: { ...process.env, HOME: root, MOSAIC_HOME: mosaicHome }, }); expect(result.status, result.stderr).toBe(0); expect(readlinkSync(liveLink)).toBe(external); expect(readlinkSync(danglingLink)).toBe(join(root, 'external-missing')); - expect(readlinkSync(join(paths.claudeSkillsDir, 'missing'))).toBe( + // Skills now link into the mosaic-owned harness home, never the base install. + expect(readlinkSync(join(mosaicHome, '.claude', 'skills', 'missing'))).toBe( join(paths.mosaicSkillsDir, 'missing'), ); + expect(existsSync(join(paths.claudeSkillsDir, 'missing'))).toBe(false); }); });