Add gated agent update planning, preserved handoff and Linux worker ports
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -58,6 +58,8 @@ pub struct AttemptDecision {
|
||||
pub original_boot_id: Option<Uuid>,
|
||||
pub unlock: bool,
|
||||
pub reason: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub update_inflight: Option<crate::agent_update::UpdateInflightDecision>,
|
||||
}
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@@ -100,6 +102,21 @@ impl ReconcileDecisionPayload {
|
||||
&& self.attempts.len() <= 256
|
||||
&& self.acknowledged_message_ids.len() <= 256
|
||||
&& (!self.helper_ready || self.ready)
|
||||
&& self.attempts.iter().all(|attempt| {
|
||||
attempt.update_inflight.as_ref().is_none_or(|update| {
|
||||
!self.ready
|
||||
&& !self.helper_ready
|
||||
&& !attempt.unlock
|
||||
&& attempt.outcome_state == "running"
|
||||
&& attempt.outcome_bytes.is_empty()
|
||||
&& attempt.outcome_sha256.is_none()
|
||||
&& crate::agent_update::digest(&update.handoff_sha256)
|
||||
&& crate::agent_update::digest(&update.delegation_sha256)
|
||||
&& crate::agent_update::digest(&update.head_sha256)
|
||||
&& !update.owner_nonce.is_nil()
|
||||
&& update.finish_before > 0
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user