The .claude/skills check accepts both local layouts and fails on a dangling link. Review: round 1 (@e1ed270) claude agy grok PASS, codex NOT PASS (a dangling top-level link was skipped); fixed in 150b493; round 2 4/4 PASS. Reports and the round-2 identity sidecars go to .agents/reports/<session>/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
5.2 KiB
Final Review Report: Job 1c2989b2 (PR #47 / Issue #42 Skills Link Round 2 Delta)
1. Review Identity & Metadata
- Loop ID:
loop-20261004T044643Z-1b1440 - Job ID:
1c2989b2 - Reviewer: agy (session:
herdr:reviewer-agy-01) - Base Commit:
e1ed2708d835d712f5f3a9dfd51b8f66ca1ac447(Round 1 Head) - Head Commit:
150b4937f816c6407be16fc4c37ab88e478927e7(1 commit) - Tree Hash:
afce44d2e0f91720d81e8d7d484f0e1358dee680 - Verification Path:
/var/folders/q_/68sxgw3j073dgjg8wl9s08vw0000gn/T/mam-review/loop-20261004T044643Z-1b1440/1 - Git Status: Clean (working tree clean, no uncommitted changes)
- Whitespace Check (
git diff base...HEAD --check): Clean (0 errors)
2. Commit Audit (base..head)
Commit 150b493: test(issue-42): review R1 - a dangling .claude/skills link fails instead of skipping
Diff summary:
tests/test_issue42_skill_blocks.py:- Refactored layout validation into helper function
claude_skills_problems(link, skills_dir, names). - Defined absent status strictly as
not link.exists() and not link.is_symlink(), ensuring a dangling broken symlink is never falsely treated as absent. - Added deterministic parametrized test
test_claude_skills_layouts(tmp_path, layout, ok)covering 6 synthetic layouts.
- Refactored layout validation into helper function
Product Code Modifications: None (0 changes to .sh or .py product code).
3. Evaluation of Review Items
Item 1: Resolution of Codex R1 (Dangling Top-Level Symlink)
- Issue: In the previous iteration (
e1ed270),if not link.exists(): pytest.skip(...)followed the symlink. If.claude/skillswas a dangling broken symlink,Path.exists()returnedFalse, causing the test to skip rather than fail. - Fix: In
claude_skills_problems:Whenif not link.exists() and not link.is_symlink(): return None.claude/skillsis a broken symlink,link.is_symlink()isTrue, so it proceeds to validation. It testslink.exists() and link.resolve() == skills_dir.resolve(), which evaluates toFalse, returning a problem entry and causing the test to fail. - Empirical Validation:
- Injected temporary broken top-level symlink
.claude/skills -> nonexistent: test immediately failed withAssertionError: assert ['... -> ... is not ...'] == []. - Confirmed Codex R1 is fully resolved and closed.
- Injected temporary broken top-level symlink
Item 2: Deterministic Synthetic Tests & Shared Validation Logic
- Both the real filesystem check
test_claude_skills_link_resolves_to_agents_skillsand the synthetic testtest_claude_skills_layoutsuse the identical validation functionclaude_skills_problems. - Synthetic test runs 6 isolated cases in
tmp_path:absent: correctly returnsNone(triggers skip).single: valid top-level symlink returns[](passes).per_skill: valid directory with per-skill symlinks returns[](passes).wrong_skill: symlink pointing to another skill returns problem (fails).broken_top: dangling top-level symlink returns problem (fails).broken_entry: dangling entry symlink inside directory returns problem (fails).
- These tests run deterministically in all environments, including isolated worktrees without
.claude/skills.
Item 3: Scope & Boundaries
- Only
tests/test_issue42_skill_blocks.pywas modified (+59, -12 lines). - Zero changes to product scripts or Python libraries.
- Zero version bumps.
4. Test Suite Execution Results
Executed in verification worktree (/var/folders/q_/68sxgw3j073dgjg8wl9s08vw0000gn/T/mam-review/loop-20261004T044643Z-1b1440/1) with --basetemp=/tmp/pytest-pr47-r2:
| Test Suite | Result | Duration |
|---|---|---|
tests/test_issue42_skill_blocks.py |
37 passed, 1 skipped* | 0.07 s |
tests/test_version_consistency.py |
3 passed | 0.22 s |
tests/test_tier1_unit.py |
67 passed | 62.01 s |
* Note: test_claude_skills_link_resolves_to_agents_skills skipped as expected in worktrees lacking untracked .claude/skills; synthetic test suite thoroughly exercises all 6 layout conditions.
5. Conclusion
PR #47 Round 2 delta cleanly fixes the dangling symlink false-skip defect identified by Codex R1, centralizes logic into a shared helper function, and adds comprehensive synthetic layout test coverage.
[VERDICT: PASS]