-
-
Notifications
You must be signed in to change notification settings - Fork 745
Closed
Labels
status: needs-triageAwaiting initial triageAwaiting initial triage
Description
Problem
The recovery-handler.js module (720 lines) in .aios-core/core/orchestration/ has zero test coverage. This module manages automatic error recovery for the orchestration pipeline with multiple recovery strategies.
Solution
Add comprehensive unit tests covering:
- RecoveryStrategy and RecoveryResult enums — all values verified
- Error classification — transient (timeout/network), state (corruption), configuration (missing config), dependency (module not found), fatal (OOM/critical), unknown
- Strategy selection — max retries escalation, circular detection, error-type-based routing, epic criticality, autoEscalate toggle
- handleEpicFailure — attempt tracking, Error object handling, event emission, recovery result recording
- Strategy execution — RETRY_SAME_APPROACH, ROLLBACK_AND_RETRY, SKIP_PHASE, ESCALATE_TO_HUMAN, TRIGGER_RECOVERY_WORKFLOW (with/without orchestrator), unknown strategy, error catching
- Escalation — report generation with epic name, suggestions, event emission
- Suggestions — per error type (transient, state, config, dependency, unknown)
- Attempt tracking — getAttemptCount, canRetry, resetAttempts, getAttemptHistory
- Logging — getLogs, getEpicLogs filtering, orchestrator forwarding
- Clear — state reset
Test Details
- 59 tests across 13 describe blocks
- Mocks:
fs-extra - All tests passing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs-triageAwaiting initial triageAwaiting initial triage