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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Dtdjx4Gxude9fwyLezCrhh
This commit is contained in:
committed by
Jason Woltje
co-authored by
Claude Fable 5
parent
709a23d08c
commit
dd6357e670
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user