Healthy Recovery Probes Leave an Edge Circuit Breaker Open
Level 2 · node · Reliability · Missing transition to closed after a healthy recovery probe
Scenario
A fictional industrial edge gateway opens a circuit breaker to prevent routing to a failed destination. An operator can manually probe whether a destination has recovered. After a healthy probe, the breaker must close and allow traffic again. The current implementation resets the failure count but leaves the breaker open. Trace the recovery transition through the repository, service, and controller.
Requirements
After a healthy recovery probe, close the breaker for that destination and allow routing again. An unhealthy probe must keep routing blocked and increase the failure count. Preserve per-destination isolation, the initially blocked state, and rejection of invalid inputs without mutations. Do not make network calls.
Acceptance criteria
- A newly registered destination begins blocked.
- An unhealthy probe blocks routing and increments the failure count.
- A healthy probe allows routing to the destination again.
- After a healthy probe the breaker state is closed.
- After a healthy probe the accumulated failure count is zero.
- Other destinations retain their own breaker states.
- An invalid probe input leaves the stored state unchanged.