Skip to main content

Crate planarian_state

Crate planarian_state 

Source
Expand description

State assembly (SPEC §10): each tick, observe every unit, run the probes that are due, evaluate conditions, and assemble a SystemState.

Desired state comes from the evaluated manifest, observed state from the backends, health from the probes. The three stay separate: SystemState keeps observations and evidence, and status is derived on demand.

Canonical probes come from the installed core package, never from the generation’s manifest (I10). The manifest can add User probes; a definition it gives for a canonical probe id is replaced by the core’s.

No process spawning and no reads of /proc, /sys or /nix: everything goes through the backend traits (§6).

Structs§

Assembler
Context
Baselines and overrides from the journal, which state does not own.
Manifest
The manifest part of an evaluated generation.

Constants§

HARDWARE_CADENCE
HARDWARE_CADENCE_BATTERY
MIN_STALE
QUIET_INTERVAL
Quiet mode’s probe interval for units foreground work does not depend on.
TICK
TICK_BUDGET
Warn if a tick takes longer than this (§10).

Functions§

apply_canonical
Replace or add the core’s canonical probes on a unit (I10). Probes the manifest marks Canonical but the core does not ship are demoted to User.
backend_reason
A Reason for a unit observed failed with a backend error.
per 🔒
A Measurement probe’s declared rate (§10): its cadence runs at most once per per.
session_bound 🔒
A unit whose readiness is per logind session (§9 graphical-session).

Type Aliases§

Canonical
Canonical probes shipped in the core package, by unit name.