Expand description
Incident lifecycle (SPEC §13): open, defer to systemd, attempts with budget and backoff, close on a stabilized desired predicate, regression, escalation, cooldown. Pure: time comes in as an argument, and every incident that changes is returned so the daemon can journal it.
Structs§
- Manager
- Track 🔒
- Per-unit observation history. Not journaled: after a restart it is re-learned within a few ticks, while the incidents themselves (budgets, backoff, holds) come back from the journal.
Constants§
- BACKOFF
- BUDGET
- COOLDOWN_
FIRST - COOLDOWN_
LATER - ESCALATE_
AT - FAILURE_
WINDOW - How far back failures count toward systemd’s own start limit.
- OPEN_
AFTER - Consecutive ticks of divergence before an incident opens.
- REGRESSION_
WINDOW - SETTLE
- STABILIZATION
- STARTUP_
GRACE - The default startup grace (
services.planarian.startupGrace). - UNKNOWN_
LIMIT - Consecutive Unknown ticks before a diagnostic incident opens (§10).
Functions§
- divergent
- §13 “Open when …”: the divergences that open an incident.
- escalation_
cooldown - How long an escalation holds the incident before Planarian looks again (§13: no autonomous action until the hold ends or someone acts).
- satisfied
- The desired predicate (§13 “Closed when”).