diff --git a/scripts/observer/observer.py b/scripts/observer/observer.py index 4165abb..00f8bc0 100644 --- a/scripts/observer/observer.py +++ b/scripts/observer/observer.py @@ -268,8 +268,11 @@ class Observer: # Positive confirmation from node-agent that a managed container # is running. This keeps services.json populated so the supervisor # can correctly detect drift (absent entry = never reported = unknown, - # not the same as confirmed missing). No incident resolution needed. + # not the same as confirmed missing). + # Also resolve any active incident — if a service that had been + # unhealthy/crashing is now confirmed healthy, the incident is over. self.world_state["services"][svc_key]["status"] = "healthy" + self._resolve_incident(svc_key, timestamp) elif etype in ["service_unhealthy", "healthcheck_failed"]: self.world_state["services"][svc_key]["status"] = "unhealthy" self._handle_incident(svc_key, event)