From e1ed2708d835d712f5f3a9dfd51b8f66ca1ac447 Mon Sep 17 00:00:00 2001 From: Godopu Date: Sun, 4 Oct 2026 08:38:01 +0900 Subject: [PATCH] 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/. 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 Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff --- tests/test_issue42_skill_blocks.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_issue42_skill_blocks.py b/tests/test_issue42_skill_blocks.py index 505fb77..e7d38de 100644 --- a/tests/test_issue42_skill_blocks.py +++ b/tests/test_issue42_skill_blocks.py @@ -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()}"