homelab-codex-ws/services
oskar 4bfd6c4429 fix(observer): map containers_not_running to unhealthy status + incident — dead/crash-looping containers created no incident, so supervisor never alerted
node-agent (and stability-agent) emit containers_not_running for exited/dead
and crash-looping containers, but the observer's event->status/incident map
only handled service_recovered/service_healthy/service_unhealthy/
healthcheck_failed. containers_not_running fell through: status stayed at its
last "healthy" value and no incident was opened, so the supervisor saw no drift
and generated no action — a dead container produced ZERO operator alerts
(matches the "action queue empty despite failures" symptom).

- containers_not_running now sets status=unhealthy and opens an incident whose
  trigger_type ("containers_not_running") is already in the supervisor's
  CONTAINER_RESTART_TRIGGERS, so remediation (container_restart) fires with no
  supervisor change. Recovery is unchanged: service_healthy resolves the
  incident via the existing svc_key->incident_id link.
- container_restarting / container_state_unexpected (added in 4746ebe) are kept
  intentionally observational — no incident, status not flipped to unhealthy
  (would cause a false redeploy for a transient blip) — but leave a
  last_observation trace so they don't vanish. A real crash-loop still escalates
  via node-agent re-emitting containers_not_running.

Tests: services/control-plane/tests/test_observer_container_events.py — status
+ incident + trigger_type, end-to-end reconcile -> container_restart, recovery
auto-resolve, observational no-incident/trace, idempotent (no incident
multiplication). Full control-plane suite: 117 passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 16:28:31 +02:00
..
agent-system fix(actions): mirror pending z VPS na panel PIHA + mutate proxy do VPS — Action Queue byla slepa 2026-07-20 19:55:54 +02:00
brain-watchdog feat(brain-watchdog): poll Prometheus /api/v1/alerts as second alert source (Telegram) 2026-06-30 18:51:34 +02:00
control-plane fix(observer): map containers_not_running to unhealthy status + incident — dead/crash-looping containers created no incident, so supervisor never alerted 2026-07-22 16:28:31 +02:00
fleet-prometheus feat(kb): faza 3 krok 5 — cykliczny ingest (systemd timer) + alerting 2026-07-17 15:54:13 +02:00
forgejo fix(inventory): correct owner_node — forgejo→piha, mosquitto→vps (per 2026-07-02 verify) 2026-07-02 16:48:12 +02:00
gokapi feat(gokapi): config publicznego file-share na VPS (share.okit.pl, E2E, Tailscale-bind za npm@VPS, disk-protection) — do deployu 2026-07-09 17:29:28 +02:00
ha-diag-agent fix(ha-diag): node_name from env + fail-fast on unknown — evt-unknown-* files poisoned observer checkpoint (see d5139c9) 2026-07-15 19:48:58 +02:00
home-assistant feat(ha): cutover ken to 31.7 HAOS, archive legacy container instance 2026-07-22 16:17:18 +02:00
kb-postgres feat(kb): faza 3 krok 2 — migracja 004 (document_summary) + pilot streszczeń A/B 2026-07-17 13:30:47 +02:00
kb-query feat(kb): add kb-query service skeleton (search API, no ingress yet) 2026-07-22 16:06:18 +02:00
llm-gateway feat(llm-gateway): wciagniecie shadow-serwisu z PIHA do GitOps 2026-07-03 15:08:33 +02:00
mosquitto fix(inventory): correct owner_node — forgejo→piha, mosquitto→vps (per 2026-07-02 verify) 2026-07-02 16:48:12 +02:00
nextcloud feat(kb): configi Paperless/Nextcloud wg 9 decyzji — NC na PIHA, domeny kapala, Redis requirepass, backup SOLARIA, NC pin 34 2026-07-09 16:17:27 +02:00
node-agent fix(events): service_healthy tylko na transition + cleanup 358k backlog + retencja — glob zalewu paralizowal reconcile supervisora 2026-07-16 20:20:17 +02:00
node_exporter feat(kb): faza 3 krok 5 — cykliczny ingest (systemd timer) + alerting 2026-07-17 15:54:13 +02:00
npm Add node capability model 2026-05-11 20:46:50 +02:00
ollama fix(ollama): restore GPU reservation on SOLARIA, close 07-15 cutover docs 2026-07-16 14:43:29 +02:00
paperless fix(paperless-worker): celery command bypassed manage.py + missing shared scratch dir 2026-07-12 20:51:04 +02:00
paperless-worker fix(paperless-worker): celery command bypassed manage.py + missing shared scratch dir 2026-07-12 20:51:04 +02:00
planner-agent fix+debug(planner-agent): use base_url (not api_base) for litellm.acompletion, add print [TEMP] 2026-05-28 13:07:58 +02:00
stability-agent fix(stability-agent): run as uid 1000 with docker group access 2026-06-03 18:20:54 +02:00
vikunja fix(vikunja): PUBLICURL na vikunja.kapala.org 2026-07-02 17:28:56 +02:00
zigbee2mqtt docs: compress CLAUDE.md + fix zigbee2mqtt coordinator docs 2026-05-29 14:17:23 +02:00
.gitkeep Add infrastructure standards and deployment conventions 2026-05-07 21:16:03 +02:00