Mikael Hugo
|
2d465b11fd
|
test: add comprehensive Phase 1 coverage for dispatch loop (48 tests)
- Add metrics.test.ts: 21 tests for unit outcome recording, model performance tracking, fire-and-forget safety, persistence, error handling
- Add triage-self-feedback.test.ts: 27 tests for report classification, confidence thresholds, auto-fix, deduplication, severity categorization, async safety
Purpose: Increase coverage of critical autonomous dispatch paths from 40% to 60%+.
Covers fire-and-forget patterns (metrics recording and auto-fix application must not
block dispatch), concurrent recording safety, graceful degradation on error.
Tests validate:
✓ Unit outcome recording without blocking
✓ Per-task-type model performance tracking
✓ Fire-and-forget error handling (metrics/fixes don't break dispatch)
✓ Concurrent metric recording race conditions
✓ Persistence atomicity
✓ Report classification by type/severity
✓ Confidence thresholds (0.85-0.95 per type)
✓ Auto-fix deduplication and prioritization
✓ Async triage without blocking dispatch
Phase 1 complete: 48 tests, all passing.
Phase 2: Recovery path hardening (recovery/forensics)
Phase 3: Property-based FSM testing (fast-check)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
2026-05-07 00:38:19 +02:00 |
|