Expand description
Manifest poll worker: verifies channel-refs (fleet.resolved) + per-channel rollout manifests on a 30s tick. Two side effects per successful tick:
- Emits
super::super::ReducerInput::ManifestSetUpdatedso the reducer task refreshes its cachedSignedManifestSetand re-runsplan_next. - Writes the verified
crate::server::VerifiedFleetSnapshotintostate.verified_fleet. The fleet manifest exists in two homes because the legacy operator-API routes (channel_status,whoami, the rollouts proxy) still read fromstate.verified_fleetsynchronously; consolidating onto the runtime cache is a separate effort. Both writes happen in this worker so the two views stay in lock-step.
Failure semantics:
- Fleet verify fails → skip this tick entirely; the reducer keeps using
its prior cache and
state.verified_fleetretains the prior snapshot. - Per-channel rollout-manifest verify fails → log + skip that channel
only. The emitted
SignedManifestSetis partial;plan_nextsimply doesn’t act on missing channels until next poll. - Reducer channel send fails (closed/full) → log + skip the emit. Full is unusual at 30s cadence; closed means CP is shutting down.
Structs§
- Channel
Refs Source - Forge URLs + trust path the manifest-poll worker reads on every tick.
CLI builds this from
--channel-refs-{artifact,signature}-url,--channel-refs-token-file,--trust-file,--freshness-window-secs.
Constants§
- POLL_
INTERVAL 🔒 - Poll cadence.
Functions§
- check_
rollout_ 🔒id_ discriminator - CP-side storage invariant: a signed rollout manifest may only be stored
under the canonical RolloutId (RFC-0008 §6.3
{channel}@{channel_ref}) it claims via its own(channel, channel_ref)fields. Defends against a bytes-vs-url-claim substitution where the CP receives a manifest for channel B while the request is for channel A’s rollout id. Mandated by theverify_rollout_manifestdocstring; mirrors the agent’sassert_rollout_id_matcheson the consumer side. - fetch_
and_ 🔒verify_ channel_ manifest - poll_
once 🔒 - prime_
blocking - Synchronous startup prime. Called by
server::servebefore the listener opens so routes that readstate.verified_fleet(e.g.channel_status, the enrollment route’s freshness check) see a populated snapshot on the first request. - publish_
verified_ 🔒fleet - spawn