CODE_HEALTH #1 (see docs/CODE_HEALTH.md in #37 for full context).
tests/ contains only test_smoke.py — 3 assertions against ~40K lines of source. Every package (query/, agent/, service/, graph/, executor/, retrieval/, scoring/, …) has zero tests. pytest + pytest-asyncio + CI wiring already exist; only the tests are missing.
Why now: every other refactor in CODE_HEALTH is unsafe without a regression net, and regressions currently surface only in expensive benchmark runs.
Scope — unit tests for the LLM-free deterministic cores first:
Rule going forward (now in CLAUDE.md): refactors land with tests for the code they touch.
CODE_HEALTH #1 (see
docs/CODE_HEALTH.mdin #37 for full context).tests/contains onlytest_smoke.py— 3 assertions against ~40K lines of source. Every package (query/,agent/,service/,graph/,executor/,retrieval/,scoring/, …) has zero tests. pytest + pytest-asyncio + CI wiring already exist; only the tests are missing.Why now: every other refactor in CODE_HEALTH is unsafe without a regression net, and regressions currently surface only in expensive benchmark runs.
Scope — unit tests for the LLM-free deterministic cores first:
graph/store.py(add/get/edges/persistence round-trip)executor/runner.py(plan validation, atomic execute, rollback, orphan reconnection)scoring/ranker.py(PageRank + recency weighting)retrieval/bm25.py(indexing, scoring, determinism)query/text_utils.py(tokenize/stopwords)config.py(env parsing, YAML load)Rule going forward (now in
CLAUDE.md): refactors land with tests for the code they touch.