Expand description
Periodic agent-side manifest poll. Mirrors CP’s
runtime::workers::manifest_poll: every 30s the worker fetches
/v1/fleet.resolved + each channel’s /v1/rollouts/{id} from CP,
verifies signatures + cross-checks each rollout’s
fleet_resolved_hash against the canonical hash of the just-fetched
fleet, then emits ReducerInput::ManifestSetUpdated so the reducer’s
cached SignedManifestSet reflects the current fleet snapshot.
First tick fires at Instant::now() (no startup delay), so the
reducer’s manifests cache is populated before the longpoll worker
receives its first Dispatch. Subsequent ticks every 30s; on tick
failure the worker retains the prior emit and retries next tick.
Failure semantics (matching CP’s manifest_poll):
- Fleet fetch/verify failed -> skip the entire tick; reducer retains its prior cache.
- Per-rollout fetch/verify failed OR cross-check mismatch -> log + skip that channel only; emit the partial set.
- Reducer channel closed (cancel propagated) -> exit.
Constants§
- POLL_
INTERVAL 🔒 - Poll cadence. Matches CP’s
runtime::workers::manifest_poll::POLL_INTERVAL.
Functions§
- spawn
- spawn_
with_ trust_ path - Tunable-trust-path entry point. Production code calls
spawnwhich threadsAgentConfig::trust_file(the--trust-fileCLI arg); integration tests under thetest-helpersfeature gate call this variant with a tempdir-rooted trust.json so the worker can run without touching/etc/nixfleet/agent/. Same convention asnixfleet_agent::runtime::ShutdownToken::__test_only_from_rx. - tick_
once 🔒