P2-05: Zero unit tests for core decider modules — only plugin has tests #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: P2 (Medium)
File:
tests/directoryProblem
Current test coverage:
tests/test_decider_plugin.py— 848 lines, 100 tests (covers Hermes plugin only)config.py,llm.py,matrix.py,ensemble.py,precedent.py,adr.py,server.py,cli.py,util.pyThe gap analysis (#213) flagged this, but it was never resolved. Core modules with zero tests include:
Fix
Create
tests/test_decider_core.pywith tests for each core module:test_config.py: load_config edge cases (missing file, bad JSON, missing fields)test_llm.py: retry logic, jitter, timeout (mock HTTP)test_util.py: sanitize_input (all injection patterns), fence_input, extract_json (fences, markdown, multiple JSON)test_matrix.py: score clamping, threshold logic, parse errorstest_ensemble.py: weight calculation, agreement metric, error handling, timeouttest_precedent.py: hash collisions, normalization, concurrent writestest_adr.py: filename safety, collision resistance, content structuretest_cli.py: stdin parsing (JSON + plain text), --mode flagstest_server.py: auth, rate limiting, cache, body limits