Expand description
Activation worker. Receives ActivationIntent from the applier,
emits LocalActivationStarted to the reducer, drives the rich
activation pipeline (crate::activation), and emits
LocalActivationCompleted / LocalActivationFailed based on the
pipeline’s outcome.
Test-mode (NIXFLEET_AGENT_ACTIVATION_TEST_MODE) short-circuits in
this worker BEFORE entering the pipeline — smoke tests + integration
tests rely on this to avoid spawning real subprocesses.
Functions§
- activation_
test_ 🔒mode_ enabled - Test-mode gate. When the env var
NIXFLEET_AGENT_ACTIVATION_TEST_MODEis set to ANY value,handle_intentshort-circuits the activation pipeline and emitsLocalActivationCompletedwith the intent’s target as the observed value. Smoke tests (tests/runtime_smoke.rs) MUST set this — they exercise the runtime integration end-to-end through the durable queue, not the actual activation subprocess. Production code paths must NEVER set it; the gate is read on every intent so a test setup mistake fails closed (no activation) rather than open (real subprocess). - handle_
intent 🔒 - spawn