Commit Graph

4 Commits

Author SHA1 Message Date
khyari hamza 0e36755db9 fix(service): address review findings for decision service
- Rehydrate sequence counter from DB on restart (BUG-1)
- Add uniqueness guard raising SequenceConflictError (BUG-2)
- Fix delete_decision consistency between persisted/in-memory (BUG-3)
- Validate new_decision_id exists in mark_superseded (BUG-4)
- Include orphaned subtrees in get_tree output (BUG-5)
- Remove dead _decision_seq/_next_seq from plan_lifecycle (BUG-7)
- Export SequenceConflictError from services __init__ (SPEC-2)
- Replace list[Any] with list[ArtifactRef] typing (SPEC-4)
- Add actor_reasoning max_length validation (SEC-1)
- Use SELECT COUNT(*) in count_decisions (PERF-1)
- Replace MagicMock with create_autospec(Settings) (TEST-3)
- Eliminate UnitOfWork.__new__() anti-pattern (TEST-4)
- Use exact assertion counts in DI tests (TEST-5)
- Add restart rehydration, BFS order, invalid type, and
  confidence boundary test scenarios (TEST-1/2/6/7)
- Fix decision_service_coverage.feature to match actual API

ISSUES CLOSED: #172
2026-03-03 12:53:28 +00:00
khyari hamza e179f34266 test(service): add persisted-mode integration scenarios for coverage
Add 9 Behave scenarios exercising all database-backed code paths in
DecisionService: record, get, list, list_by_type, get_path_to_root,
get_superseded, mark_superseded, delete, and duplicate detection.
File-level coverage rises from 81% to 96%.

ISSUES CLOSED: #172
2026-03-03 12:18:27 +00:00
khyari hamza db81c4cfd6 test(service): add edge-case scenarios for coverage
Add 11 new Behave scenarios covering SnapshotStore hash-less storage,
hash-index cleanup on remove, multi-entry removal, list_for_plan with
missing snapshots, whitespace-only validation, no-root tree traversal,
and list-by-type string coercion. Brings scenario count from 37 to 48.

ISSUES CLOSED: #172
2026-03-03 12:18:27 +00:00
khyari hamza 878bad4848 feat(service): add decision recording and snapshot store 2026-03-03 12:18:27 +00:00