Add gated agent update planning, preserved handoff and Linux worker ports
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-14 21:48:21 +01:00
parent dc9cb1b096
commit 1e89c4577f
82 changed files with 25052 additions and 69 deletions
+34 -3
View File
@@ -25,6 +25,7 @@ fn map(s: &root::Snapshot) -> reconcile::HelperSnapshot {
.attempts
.iter()
.map(|a| SyncAttempt {
update_handoff_bytes: a.update_handoff_bytes.clone(),
job_id: a.job_id.to_string(),
attempt_id: a.attempt_id.to_string(),
job_payload_hash: a.job_payload_hash.clone(),
@@ -115,7 +116,12 @@ impl Helpers {
for _ in 0..3 {
let mut snapshots = vec![];
let mut inodes = None;
for e in &self.endpoints {
// Full is the only provisioned update owner authority. General
// cannot inspect its broader process capability context; it must
// stay closed without classifying the original effect Unknown.
let mut ordered: Vec<_> = self.endpoints.iter().collect();
ordered.sort_by_key(|e| e.profile != "full_maintenance_v1");
for e in ordered {
let q = control::Request::Snapshot {
challenge: Uuid::new_v4(),
identity: readiness::Identity::from_binding(&self.binding)?,
@@ -128,7 +134,19 @@ impl Helpers {
ensure!(old == ids, "HELPERS_MUST_SHARE_LEDGER_AND_LOCK");
}
inodes = Some(ids);
snapshots.push(r.snapshot.context("HELPER_SNAPSHOT_REQUIRED")?);
let snapshot = r.snapshot.context("HELPER_SNAPSHOT_REQUIRED")?;
if snapshot
.attempts
.iter()
.any(|a| !a.update_handoff_bytes.is_empty())
{
ensure!(
e.profile == "full_maintenance_v1",
"UPDATE_FULL_OWNER_REQUIRED"
);
return Ok(Some(map(&snapshot)));
}
snapshots.push(snapshot);
}
let first = &snapshots[0];
if snapshots.iter().all(|s| {
@@ -150,7 +168,20 @@ impl Helpers {
) -> Result<Option<reconcile::HelperSnapshot>> {
use prost::Message;
let mut applied: Option<root::Snapshot> = None;
for e in &self.endpoints {
let update_control = request
.attempts
.iter()
.any(|a| !a.update_handoff_bytes.is_empty());
let endpoints: Vec<_> = self
.endpoints
.iter()
.filter(|e| !update_control || e.profile == "full_maintenance_v1")
.collect();
ensure!(
!update_control || endpoints.len() == 1,
"UPDATE_FULL_OWNER_REQUIRED"
);
for e in endpoints {
let q = control::Request::Apply {
challenge: Uuid::new_v4(),
identity: readiness::Identity::from_binding(&self.binding)?,