Deploy reviewed Windows sync alignment with schema 20 server
Rust development slice / linux (push) Failing after 7s
Rust development slice / linux (push) Failing after 7s
Bind the administrative connection-205 review to original signed history and preserve closed readiness. Include the qualified server dependency closure, UI review, native ARM64 build provenance, and guarded deployment evidence. Migration, API/gateway replacement and TLS checks passed with unchanged job authority, protected mounts and time/database services; native Windows receipt application remains separate.
This commit is contained in:
@@ -139,7 +139,7 @@ fn services(handoff: &Handoff) -> Vec<StartedService> {
|
||||
service: *service,
|
||||
process: process(
|
||||
50 + i as u32,
|
||||
if *service == Service::LinuxAgent {
|
||||
if matches!(service, Service::LinuxAgent | Service::WindowsAgent) {
|
||||
&handoff.target.agent_sha256
|
||||
} else {
|
||||
&handoff.target.helper_sha256
|
||||
@@ -263,6 +263,247 @@ fn full_linux_three_service_handoff_replays_exactly_sixteen_events() {
|
||||
assert_eq!(reopened.phase(), Phase::OutcomePersisted);
|
||||
assert!(reopened.prepare(112, Evidence::StopIntent).is_err());
|
||||
}
|
||||
#[test]
|
||||
fn windows_clock_pair_replays_all_eighteen_events_and_cannot_drop_the_clock_file() {
|
||||
let mut handoff = handoff();
|
||||
handoff.pin_transition = PinTransition::WindowsCodePairClockV1;
|
||||
handoff.stop_set = vec![Service::WindowsAgent, Service::WindowsHelper];
|
||||
handoff.files[2].role = FileRole::WindowsSettings;
|
||||
handoff.files[3].role = FileRole::WindowsPin;
|
||||
handoff.files.push(FileTransition {
|
||||
role: FileRole::WindowsTimeProfile,
|
||||
old_sha256: h(28),
|
||||
new_sha256: h(29),
|
||||
});
|
||||
let mut journal = open(&handoff);
|
||||
let mut events = until_started(&mut journal, &handoff);
|
||||
let receipt = signed(&receipt(&journal, &handoff), HEALTH_DOMAIN, &key());
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
110,
|
||||
Evidence::HealthVerified { receipt },
|
||||
));
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
111,
|
||||
Evidence::OutcomePersisted {
|
||||
outcome_sha256: h(27),
|
||||
},
|
||||
));
|
||||
assert_eq!(events.len(), MAX_WINDOWS_CLOCK_EVENTS);
|
||||
let mut reopened = open(&handoff);
|
||||
for event in events {
|
||||
reopened.replay(&event).unwrap();
|
||||
}
|
||||
assert_eq!(reopened.phase(), Phase::OutcomePersisted);
|
||||
assert_eq!(reopened.head_sha256(), journal.head_sha256());
|
||||
handoff.files.pop();
|
||||
assert!(handoff.validate().is_err());
|
||||
}
|
||||
#[test]
|
||||
fn v2_predecessor_return_keeps_original_attempt_state_owner_and_health_deadlines() {
|
||||
let mut hnd = handoff();
|
||||
hnd.schema_version = 2;
|
||||
let mut journal = open(&hnd);
|
||||
let mut events = until_started(&mut journal, &hnd);
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
111,
|
||||
Evidence::RollbackIntent {
|
||||
cause: RollbackCause::HealthRejected,
|
||||
failure_observation_sha256: h(30),
|
||||
},
|
||||
));
|
||||
let mut wrong_owner = process(40, &hnd.updater_sha256);
|
||||
wrong_owner.birth += 1;
|
||||
assert!(
|
||||
journal
|
||||
.prepare(
|
||||
112,
|
||||
Evidence::RollbackStopped {
|
||||
process: wrong_owner,
|
||||
ledger_identity_sha256: h(22),
|
||||
observation_sha256: h(31)
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
112,
|
||||
Evidence::RollbackStopped {
|
||||
process: process(40, &hnd.updater_sha256),
|
||||
ledger_identity_sha256: h(22),
|
||||
observation_sha256: h(31),
|
||||
},
|
||||
));
|
||||
assert!(
|
||||
journal
|
||||
.prepare(
|
||||
112,
|
||||
Evidence::PredecessorVerified {
|
||||
pair: hnd.predecessor.clone(),
|
||||
retained_state_sha256: hnd.retained_state_sha256.clone(),
|
||||
predecessor_record_sha256: hnd.predecessor_record_sha256.clone()
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
for file in hnd.files.iter().rev() {
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
113,
|
||||
Evidence::RestoreIntent { role: file.role },
|
||||
));
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
113,
|
||||
Evidence::CandidatePreserved {
|
||||
role: file.role,
|
||||
observation_sha256: h(32),
|
||||
},
|
||||
));
|
||||
assert!(
|
||||
journal
|
||||
.prepare(
|
||||
113,
|
||||
Evidence::PredecessorRestored {
|
||||
role: file.role,
|
||||
observed_sha256: file.new_sha256.clone()
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
113,
|
||||
Evidence::PredecessorRestored {
|
||||
role: file.role,
|
||||
observed_sha256: file.old_sha256.clone(),
|
||||
},
|
||||
));
|
||||
}
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
114,
|
||||
Evidence::PredecessorVerified {
|
||||
pair: hnd.predecessor.clone(),
|
||||
retained_state_sha256: hnd.retained_state_sha256.clone(),
|
||||
predecessor_record_sha256: hnd.predecessor_record_sha256.clone(),
|
||||
},
|
||||
));
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
115,
|
||||
Evidence::RollbackLedgerReturnIntent,
|
||||
));
|
||||
let predecessor: Vec<_> = hnd
|
||||
.stop_set
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, service)| StartedService {
|
||||
service: *service,
|
||||
process: process(
|
||||
70 + i as u32,
|
||||
if matches!(service, Service::LinuxAgent | Service::WindowsAgent) {
|
||||
&hnd.predecessor.agent_sha256
|
||||
} else {
|
||||
&hnd.predecessor.helper_sha256
|
||||
},
|
||||
),
|
||||
})
|
||||
.collect();
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
116,
|
||||
Evidence::RollbackServicesStarted {
|
||||
services: predecessor.clone(),
|
||||
ledger_identity_sha256: h(22),
|
||||
observation_sha256: h(33),
|
||||
},
|
||||
));
|
||||
let mut health = receipt(&journal, &hnd);
|
||||
health.service_processes = predecessor;
|
||||
health.signed_sync_applied_at = 117;
|
||||
health.inventory_received_at = 117;
|
||||
health.issued_at = 118;
|
||||
health.valid_until = 500;
|
||||
let proof = signed(&health, HEALTH_DOMAIN, &key());
|
||||
assert!(
|
||||
journal
|
||||
.prepare(
|
||||
286,
|
||||
Evidence::RollbackHealthVerified {
|
||||
receipt: proof.clone()
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
119,
|
||||
Evidence::RollbackHealthVerified { receipt: proof },
|
||||
));
|
||||
events.push(append(
|
||||
&mut journal,
|
||||
120,
|
||||
Evidence::RollbackOutcomePersisted {
|
||||
outcome_sha256: h(34),
|
||||
},
|
||||
));
|
||||
assert_eq!(events.len(), 33);
|
||||
assert_eq!(journal.phase(), Phase::OutcomePersisted);
|
||||
let mut reopened = open(&hnd);
|
||||
for raw in &events {
|
||||
reopened.replay(raw).unwrap();
|
||||
}
|
||||
assert_eq!(reopened.head_sha256(), journal.head_sha256());
|
||||
assert!(
|
||||
reopened
|
||||
.prepare(
|
||||
121,
|
||||
Evidence::RollbackIntent {
|
||||
cause: RollbackCause::HealthRejected,
|
||||
failure_observation_sha256: h(30)
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
let mut unknown = open(&hnd);
|
||||
until_started(&mut unknown, &hnd);
|
||||
append(
|
||||
&mut unknown,
|
||||
111,
|
||||
Evidence::Unknown {
|
||||
reason: UnknownReason::OwnerLost,
|
||||
},
|
||||
);
|
||||
assert!(
|
||||
unknown
|
||||
.prepare(
|
||||
112,
|
||||
Evidence::RollbackIntent {
|
||||
cause: RollbackCause::HealthRejected,
|
||||
failure_observation_sha256: h(30)
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
hnd.schema_version = 1;
|
||||
let mut legacy = open(&hnd);
|
||||
until_started(&mut legacy, &hnd);
|
||||
assert!(
|
||||
legacy
|
||||
.prepare(
|
||||
111,
|
||||
Evidence::RollbackIntent {
|
||||
cause: RollbackCause::HealthRejected,
|
||||
failure_observation_sha256: h(30)
|
||||
}
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_ownership_before_stop_no_partial_pair_no_start_before_return() {
|
||||
|
||||
Reference in New Issue
Block a user