Expand description
Probe worker (RFC-0007 §8). On each LocalResetProbeCache:
- Aborts every per-probe ticker spawned for the previous rollout
(the
JoinHandle::abortinvariant: no probe ticker from rollout N runs afterLocalResetProbeCache { rollout_id: N }is observed). - Reads
/etc/nixfleet/agent/health-checks.json(rendered by the host’s NixOS module from the mkFleet-resolved effective set — closure-driven, transitively signed via the closure hash chain per RFC-0007 §4). Path is hardcoded; no--health-checks-configflag. - Emits one
LocalProbeTopologyDeclaredevent into the reducer input MPSC, then spawns one ticker per probe withmode != "disabled".
Each ticker fires every intervalSeconds (or once, if
runOnce = true). On each tick it dispatches to the kind-specific
probe_runners::run and emits LocalProbeResult. The ticker holds
its own first-observation + first-failure flags to drive the
LocalProbeObservedFirst / LocalProbeFailureFirst events RFC-0005
§3.2 requires.
Test-mode escape hatch: NIXFLEET_AGENT_PROBE_TEST_MODE=1 skips
reading the JSON file and the spawn loop — the smoke test sets it
so the runtime can boot without a /etc/ file or actual probes.