pub fn normalize_rollout_policies(fleet: &mut FleetResolved)Expand description
Post-deserialization normalization for FleetResolved.rollout_policies.
Synthesizes an implicit single match-all wave (soak_minutes=0) for any
all-at-once policy declared without explicit waves. Operator’s
most-common form is {strategy = "all-at-once";} with empty waves;
without this synthesis, the applier’s per-wave soak lookup
(crates/nixfleet-control-plane/src/runtime/applier.rs:198 +
:655) returns None and falls back to DEFAULT_SOAK_MINUTES = 60,
silently producing a 1-hour soak hold on a strategy whose semantic
name is “ship everywhere with no staging.”
Strategies other than all-at-once declared without explicit waves
are left untouched — a canary or custom strategy without waves IS
malformed, and the applier’s DEFAULT_SOAK_MINUTES fallback (with
its warn log) remains the right behaviour as a safety net.
Invariant preserved: policies that already declare waves are not modified; operator’s explicit declaration always wins.
Called from nixfleet_reconciler::verify::verify_artifact
post-deserialization so every consumer of Verified<FleetResolved>
(CP reducer + agent manifest cache) sees the canonical shape. Signed
bytes are not modified — the signature covers the wire form (empty
waves), the in-memory form is post-normalization.