Module activation

Module activation 

Source
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_MODE is set to ANY value, handle_intent short-circuits the activation pipeline and emits LocalActivationCompleted with 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