test(issue-42): the .claude/skills check accepts both local layouts
test_claude_skills_link_resolves_to_agents_skills assumed .claude/skills is one symlink to .agents/skills. It is local and git-ignored, and a checkout may instead hold a directory with one link per skill (this workspace's layout), where every link is correct but the test failed. PR #46's reviews and suites ran in worktrees, where the directory is absent and the test skips, so the failure only showed in the main checkout after the merge. The test now accepts a single link to .agents/skills, or a directory whose entry for each of the eight skills resolves to the matching .agents/skills/<skill>. Checked against no link (skip), per-skill links (pass; the old test fails), one link pointing at the wrong skill (fail) and a single link (pass). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
1 parent
6af4a796b1
commit
e1ed2708d8
1 file changed
+10
-1
@@ -238,7 +238,16 @@ def test_frontmatter_name_matches_directory(skill):
|
||||
|
||||
|
||||
def test_claude_skills_link_resolves_to_agents_skills():
|
||||
""".claude/skills is local (git-ignored) and comes in two layouts: one link
|
||||
to .agents/skills, or a directory with one link per skill. Either way each
|
||||
skill Claude Code loads must be the .agents/skills one."""
|
||||
link = REPO / ".claude" / "skills"
|
||||
if not link.exists():
|
||||
pytest.skip(".claude/skills is untracked; absent in a worktree")
|
||||
assert link.resolve() == SKILLS.resolve()
|
||||
if link.is_symlink():
|
||||
assert link.resolve() == SKILLS.resolve()
|
||||
return
|
||||
for skill in SKILL_NAMES:
|
||||
entry = link / skill
|
||||
assert entry.exists(), f".claude/skills/{skill} is missing"
|
||||
assert entry.resolve() == (SKILLS / skill).resolve(), f".claude/skills/{skill} -> {entry.resolve()}"
|
||||
Reference in new issue
Block a user