personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: fold skill-discovery check into idempotency test

test_skill_discovery_from_journal_cwd asserted the existence of
journal/.claude/skills/journal/SKILL.md at the repo root — a path
that's gitignored, produced only by `make skills`, and not a
make-test prerequisite. Fresh-clone runs hit it before `make
install` had built the artifact and failed deterministically.

Move the assertion into test_make_skills_idempotent's tmp tree:
after `make skills` runs, verify the symlinked SKILL.md resolves
and its content starts with frontmatter. Same property, hermetic
setup, no dependency on dev-box state.

+9 -7
+9 -7
tests/test_journal_skill.py
··· 109 109 second = link_state(temp_root / "journal") 110 110 assert first == second 111 111 112 - 113 - def test_skill_discovery_from_journal_cwd(): 114 - repo_root = _repo_root() 115 - skill_path = repo_root / "journal" / ".claude" / "skills" / "journal" / "SKILL.md" 116 - 117 - assert skill_path.is_file() 118 - assert skill_path.read_text(encoding="utf-8").startswith("---") 112 + # Skill-discovery contract: claude code looks at <cwd>/.claude/skills/, so 113 + # after `make skills` the journal-cwd path must resolve to a real SKILL.md 114 + # whose content starts with frontmatter. Verifying it here against the tmp 115 + # tree (rather than the gitignored repo_root/journal/.claude/...) means 116 + # the test is hermetic — it doesn't depend on the dev box having 117 + # previously run `make install` or `make skills` to produce the artifact. 118 + discovered = temp_root / "journal" / ".claude" / "skills" / "journal" / "SKILL.md" 119 + assert discovered.is_file() 120 + assert discovered.read_text(encoding="utf-8").startswith("---")