Increase test coverage from 30% to 85% and fix Windows encoding bugs#281
Increase test coverage from 30% to 85% and fix Windows encoding bugs#281bensig merged 16 commits intoMemPalace:mainfrom
Conversation
Add 180+ new tests across 10 test files covering previously untested modules: - instructions_cli (0% → 100%), hooks_cli (73% → 96%), spellcheck (28% → 84%) - palace_graph (9% → 91%), general_extractor (0% → 92%), entity_detector (0% → 69%) - entity_registry (0% → 70%), room_detector_local (0% → 55%), layers (0% → 28%) - onboarding (0% → 36%) Also fixes Windows encoding bug in onboarding.py (write_text without encoding="utf-8"). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add/expand tests for normalize (39%→97%), searcher (39%→100%), layers (28%→97%), split_mega_files (34%→72%). Fix mcp_server.py parse_args→parse_known_args to prevent SystemExit when imported during pytest (CI was crashing on all test jobs). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
PR Review: Increase test coverage and fix Windows encoding bugsExecutive Summary
Affected Areas: Business Impact: Improves reliability on Windows, doubles coverage threshold (30% → 60%), reduces regression risk Flow Changes: Ratings
PR Health
High Priority Issues🐛 #1: Incomplete Windows encoding fix —
|
…0.11 - Add tests for config, convo_miner, spellcheck, knowledge_graph - Fix Windows PermissionError in test cleanup (chromadb file locks) - Add UTF-8 encoding to split_mega_files, entity_registry, hooks_cli - Fix mcp_server parse_known_args logging for unknown args - Set coverage threshold to 85 in pyproject.toml and CI - Reset all version files to 3.0.11 Co-Authored-By: Claude Opus 4.6 <[email protected]>
…3.0.11 CI was installing latest ruff (0.15.x) which has different formatting rules than our local 0.4.x. Pin to ruff>=0.4.0,<0.5 for consistency. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
@bensig LGTM |
_patch_mcp_server had palace_path removed from its signature but the assertion body still referenced it, causing NameError at runtime and F821 from ruff. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
What does this PR do?
Increase test coverage and fix Windows encoding bugs
Adds github action pipeline for test coverage
How to test
Checklist
python -m pytest tests/ -v)ruff check .)