Skip to main content

Crate planarian_incident

Crate planarian_incident 

Source
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”).