pub enum Effect {
LocalFireSwitch {
rollout_id: RolloutId,
target: ClosureHash,
},
LocalFireRollbackTo {
rollout_id: RolloutId,
closure: ClosureHash,
},
LocalResetProbeCache {
rollout_id: RolloutId,
},
LocalEmitEvent {
rollout_id: RolloutId,
payload: OutboundAgentEvent,
durable: bool,
},
RemoteQueueDispatch {
host: String,
rollout_id: RolloutId,
target_closure: ClosureHash,
soak_due_at: DateTime<Utc>,
},
RemoteInsertQuarantine {
channel: String,
closure: ClosureHash,
},
RemoteOpenRolloutRecord {
rollout_id: RolloutId,
channel: String,
host: String,
},
RemoteAppendEventLog {
host: String,
rollout_id: RolloutId,
payload: OutboundAgentEvent,
},
RecordTransition {
host: String,
rollout_id: RolloutId,
from: HostState,
to: HostState,
at: DateTime<Utc>,
},
EmitMetric {
name: &'static str,
labels: Vec<(&'static str, String)>,
value: f64,
},
EmitLog {
level: LogLevel,
target: &'static str,
message: &'static str,
fields: Vec<(&'static str, String)>,
},
}Variants§
LocalFireSwitch
Fire switch-to-configuration on target. Agent applier delegates
to the activation module which detaches via systemd-run per the
agent-process-restart contract.
LocalFireRollbackTo
Fire switch-to-configuration on closure (rollback target read
from current_closure_at_dispatch). Agent decides this without a
CP signal — manifest’s onHealthFailure is the single signed
source of truth (RFC-0005 §4.1).
LocalResetProbeCache
Drop the in-memory probe cache for this (rollout, host) pair.
Emitted on LocalActivationCompleted so stale Pass results from
the prior closure cannot satisfy the new rollout’s gates.
LocalEmitEvent
Emit an outbound event to CP via POST /v1/agent/events. durable
requests on-disk queuing before the network call so a crash between
the local state change and the POST is recoverable on restart
(RFC-0005 §9.7 — open question; default policy decided in Phase 7).
rollout_id carries the rollout this event belongs to so the agent
applier can persist the outbound queue entry against the correct
(host, rollout, seq) triple without consulting a side channel.
Closes Phase 7’s enrich_effect_with_rollout stopgap.
RemoteQueueDispatch
Queue a Dispatch for the agent’s next long-poll on
/v1/agent/dispatch. Pull-only — CP never opens a connection
(RFC-0005 §2.1).
RemoteInsertQuarantine
Mark a closure as quarantined on a channel after a RollbackComplete
arrives. Subsequent dispatches refuse this closure on this channel.
RemoteOpenRolloutRecord
Persist a fresh host_rollout_records row when CP first dispatches
to a host for a new rollout (Phase 4 schema).
RemoteAppendEventLog
Append an inbound agent event to the audit log (RFC-0005 §4.3 + the broader event-log pattern — every state mutation, gate decision, manifest poll lands here too).
RecordTransition
Record a state transition (from, to, at) for the event log + status
API. Emitted on every legal HostState change.