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:
@@ -19,6 +19,11 @@ pub use linux_full::{LinuxFullTransition, LinuxFullTransitionProof, render_linux
|
||||
pub const MAX_RECORD_BYTES: usize = 16 * 1024;
|
||||
pub const MAX_EVENT_BYTES: usize = 16 * 1024;
|
||||
pub const MAX_EVENTS: usize = 16;
|
||||
/// Only the explicit five-file Windows clock transition needs two additional
|
||||
/// ReplaceIntent/Replaced events. Historical profiles retain the 16-event cap.
|
||||
pub const MAX_WINDOWS_CLOCK_EVENTS: usize = 18;
|
||||
/// Explicit V2 allows one predecessor return under the original attempt.
|
||||
pub const MAX_V2_EVENTS: usize = 40;
|
||||
pub const HEALTH_DOMAIN: &[u8] = b"rmm.agent-update-health.v1\0";
|
||||
|
||||
/// All fields below are untrusted wire data, never authorization capabilities.
|
||||
@@ -123,7 +128,7 @@ pub struct Handoff {
|
||||
|
||||
impl Handoff {
|
||||
pub fn validate(&self) -> Result<()> {
|
||||
ensure!(self.schema_version == 1, "HANDOFF_SCHEMA");
|
||||
ensure!(matches!(self.schema_version, 1 | 2), "HANDOFF_SCHEMA");
|
||||
for id in [
|
||||
self.attempt.tenant_id,
|
||||
self.attempt.asset_id,
|
||||
@@ -373,10 +378,55 @@ pub enum Evidence {
|
||||
OutcomePersisted {
|
||||
outcome_sha256: String,
|
||||
},
|
||||
RollbackIntent {
|
||||
cause: RollbackCause,
|
||||
failure_observation_sha256: String,
|
||||
},
|
||||
RollbackStopped {
|
||||
process: Process,
|
||||
ledger_identity_sha256: String,
|
||||
observation_sha256: String,
|
||||
},
|
||||
RestoreIntent {
|
||||
role: FileRole,
|
||||
},
|
||||
CandidatePreserved {
|
||||
role: FileRole,
|
||||
observation_sha256: String,
|
||||
},
|
||||
PredecessorRestored {
|
||||
role: FileRole,
|
||||
observed_sha256: String,
|
||||
},
|
||||
PredecessorVerified {
|
||||
pair: CodePair,
|
||||
retained_state_sha256: String,
|
||||
predecessor_record_sha256: String,
|
||||
},
|
||||
RollbackLedgerReturnIntent,
|
||||
RollbackServicesStarted {
|
||||
services: Vec<StartedService>,
|
||||
ledger_identity_sha256: String,
|
||||
observation_sha256: String,
|
||||
},
|
||||
RollbackHealthVerified {
|
||||
receipt: SignedHealth,
|
||||
},
|
||||
RollbackOutcomePersisted {
|
||||
outcome_sha256: String,
|
||||
},
|
||||
Unknown {
|
||||
reason: UnknownReason,
|
||||
},
|
||||
}
|
||||
/// Native guards must independently attest the actual known failure. Missing
|
||||
/// replies, uncertain replacement, lost owner and persisted Unknown are denied.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(tag = "cause", rename_all = "snake_case", deny_unknown_fields)]
|
||||
pub enum RollbackCause {
|
||||
StartupFailed { service: Service },
|
||||
HealthRejected,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
@@ -415,6 +465,15 @@ pub enum Phase {
|
||||
LedgerReturnIntent,
|
||||
ServicesStarted,
|
||||
HealthVerified,
|
||||
RollbackIntent,
|
||||
RollbackStopped,
|
||||
RestoreIntent,
|
||||
CandidatePreserved,
|
||||
PredecessorRestored,
|
||||
PredecessorVerified,
|
||||
RollbackLedgerReturnIntent,
|
||||
RollbackServicesStarted,
|
||||
RollbackHealthVerified,
|
||||
OutcomePersisted,
|
||||
Unknown,
|
||||
}
|
||||
@@ -431,6 +490,9 @@ pub struct Journal {
|
||||
observed_at: u64,
|
||||
started: Option<(Vec<StartedService>, u64)>,
|
||||
health_key: VerifyingKey,
|
||||
updater: Option<Process>,
|
||||
original_start_at: Option<u64>,
|
||||
restored: usize,
|
||||
}
|
||||
|
||||
impl Journal {
|
||||
@@ -452,6 +514,9 @@ impl Journal {
|
||||
replaced: 0,
|
||||
started: None,
|
||||
health_key,
|
||||
updater: None,
|
||||
original_start_at: None,
|
||||
restored: 0,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -464,6 +529,20 @@ impl Journal {
|
||||
pub fn handoff_sha256(&self) -> &str {
|
||||
&self.handoff_hash
|
||||
}
|
||||
pub fn rollback_active(&self) -> bool {
|
||||
matches!(
|
||||
self.phase,
|
||||
Phase::RollbackIntent
|
||||
| Phase::RollbackStopped
|
||||
| Phase::RestoreIntent
|
||||
| Phase::CandidatePreserved
|
||||
| Phase::PredecessorRestored
|
||||
| Phase::PredecessorVerified
|
||||
| Phase::RollbackLedgerReturnIntent
|
||||
| Phase::RollbackServicesStarted
|
||||
| Phase::RollbackHealthVerified
|
||||
)
|
||||
}
|
||||
|
||||
/// Prepare exact bytes for a bounded append-only CAS transaction against
|
||||
/// `head_sha256`. Returning bytes is NOT proof that this transaction ran.
|
||||
@@ -491,8 +570,19 @@ impl Journal {
|
||||
if matches!(event.evidence, Evidence::Replaced { .. }) {
|
||||
self.replaced += 1;
|
||||
}
|
||||
if let Evidence::ServicesStarted { services, .. } = event.evidence {
|
||||
self.started = Some((services, event.observed_at));
|
||||
if matches!(event.evidence, Evidence::PredecessorRestored { .. }) {
|
||||
self.restored += 1;
|
||||
}
|
||||
if let Evidence::UpdaterOwnsLedger { ref process, .. } = event.evidence {
|
||||
self.updater = Some(process.clone());
|
||||
}
|
||||
if matches!(event.evidence, Evidence::LedgerReturnIntent) {
|
||||
self.original_start_at = Some(event.observed_at);
|
||||
}
|
||||
if let Evidence::ServicesStarted { ref services, .. }
|
||||
| Evidence::RollbackServicesStarted { ref services, .. } = event.evidence
|
||||
{
|
||||
self.started = Some((services.clone(), event.observed_at));
|
||||
}
|
||||
self.phase = next;
|
||||
self.observed_at = event.observed_at;
|
||||
@@ -506,7 +596,14 @@ impl Journal {
|
||||
event.schema_version == 1
|
||||
&& event.handoff_sha256 == self.handoff_hash
|
||||
&& event.sequence == self.count + 1
|
||||
&& (event.sequence as usize) <= MAX_EVENTS
|
||||
&& (event.sequence as usize)
|
||||
<= if self.handoff.schema_version == 2 {
|
||||
MAX_V2_EVENTS
|
||||
} else if self.handoff.pin_transition == PinTransition::WindowsCodePairClockV1 {
|
||||
MAX_WINDOWS_CLOCK_EVENTS
|
||||
} else {
|
||||
MAX_EVENTS
|
||||
}
|
||||
&& event.previous_sha256 == self.head_hash,
|
||||
"HANDOFF_EVENT_CHAIN"
|
||||
);
|
||||
@@ -642,11 +739,205 @@ impl Journal {
|
||||
digest(outcome_sha256)?;
|
||||
Phase::OutcomePersisted
|
||||
}
|
||||
(
|
||||
Phase::LedgerReturnIntent | Phase::ServicesStarted,
|
||||
Evidence::RollbackIntent {
|
||||
cause,
|
||||
failure_observation_sha256,
|
||||
},
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
digest(failure_observation_sha256)?;
|
||||
match cause {
|
||||
RollbackCause::StartupFailed { service } => ensure!(
|
||||
self.phase == Phase::LedgerReturnIntent
|
||||
&& self.handoff.stop_set.contains(service),
|
||||
"HANDOFF_ROLLBACK_START_FAILURE"
|
||||
),
|
||||
RollbackCause::HealthRejected => ensure!(
|
||||
self.phase == Phase::ServicesStarted,
|
||||
"HANDOFF_ROLLBACK_HEALTH_FAILURE"
|
||||
),
|
||||
}
|
||||
Phase::RollbackIntent
|
||||
}
|
||||
(
|
||||
Phase::RollbackIntent,
|
||||
Evidence::RollbackStopped {
|
||||
process,
|
||||
ledger_identity_sha256,
|
||||
observation_sha256,
|
||||
},
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
ensure!(
|
||||
self.updater.as_ref() == Some(process)
|
||||
&& ledger_identity_sha256 == &self.handoff.ledger_identity_sha256,
|
||||
"HANDOFF_ROLLBACK_ORIGINAL_OWNER"
|
||||
);
|
||||
digest(observation_sha256)?;
|
||||
Phase::RollbackStopped
|
||||
}
|
||||
(
|
||||
Phase::RollbackStopped | Phase::PredecessorRestored,
|
||||
Evidence::RestoreIntent { role },
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
ensure!(
|
||||
self.handoff
|
||||
.files
|
||||
.iter()
|
||||
.rev()
|
||||
.nth(self.restored)
|
||||
.is_some_and(|f| f.role == *role),
|
||||
"HANDOFF_RESTORE_ORDER"
|
||||
);
|
||||
Phase::RestoreIntent
|
||||
}
|
||||
(
|
||||
Phase::RestoreIntent,
|
||||
Evidence::CandidatePreserved {
|
||||
role,
|
||||
observation_sha256,
|
||||
},
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
ensure!(
|
||||
self.handoff
|
||||
.files
|
||||
.iter()
|
||||
.rev()
|
||||
.nth(self.restored)
|
||||
.is_some_and(|f| f.role == *role),
|
||||
"HANDOFF_RESTORE_ORDER"
|
||||
);
|
||||
digest(observation_sha256)?;
|
||||
Phase::CandidatePreserved
|
||||
}
|
||||
(
|
||||
Phase::CandidatePreserved,
|
||||
Evidence::PredecessorRestored {
|
||||
role,
|
||||
observed_sha256,
|
||||
},
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
ensure!(
|
||||
self.handoff
|
||||
.files
|
||||
.iter()
|
||||
.rev()
|
||||
.nth(self.restored)
|
||||
.is_some_and(|f| f.role == *role && f.old_sha256 == *observed_sha256),
|
||||
"HANDOFF_RESTORE_PREDECESSOR_HASH"
|
||||
);
|
||||
Phase::PredecessorRestored
|
||||
}
|
||||
(
|
||||
Phase::PredecessorRestored,
|
||||
Evidence::PredecessorVerified {
|
||||
pair,
|
||||
retained_state_sha256,
|
||||
predecessor_record_sha256,
|
||||
},
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
ensure!(
|
||||
self.restored == self.handoff.files.len()
|
||||
&& pair == &self.handoff.predecessor
|
||||
&& retained_state_sha256 == &self.handoff.retained_state_sha256
|
||||
&& predecessor_record_sha256 == &self.handoff.predecessor_record_sha256,
|
||||
"HANDOFF_RESTORE_PAIR_OR_STATE_CHANGED"
|
||||
);
|
||||
Phase::PredecessorVerified
|
||||
}
|
||||
(Phase::PredecessorVerified, Evidence::RollbackLedgerReturnIntent) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
Phase::RollbackLedgerReturnIntent
|
||||
}
|
||||
(
|
||||
Phase::RollbackLedgerReturnIntent,
|
||||
Evidence::RollbackServicesStarted {
|
||||
services,
|
||||
ledger_identity_sha256,
|
||||
observation_sha256,
|
||||
},
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
ensure!(
|
||||
ledger_identity_sha256 == &self.handoff.ledger_identity_sha256,
|
||||
"HANDOFF_LEDGER_IDENTITY_CHANGED"
|
||||
);
|
||||
let expected: Vec<_> = self
|
||||
.handoff
|
||||
.stop_set
|
||||
.iter()
|
||||
.copied()
|
||||
.filter(|s| *s != Service::LinuxAptHelper)
|
||||
.collect();
|
||||
ensure!(
|
||||
services.len() == expected.len(),
|
||||
"HANDOFF_STARTED_SERVICE_SET"
|
||||
);
|
||||
for (index, service) in services.iter().enumerate() {
|
||||
ensure!(
|
||||
service.service == expected[index],
|
||||
"HANDOFF_STARTED_SERVICE_SET"
|
||||
);
|
||||
service.process.validate(
|
||||
if matches!(service.service, Service::LinuxAgent | Service::WindowsAgent) {
|
||||
&self.handoff.predecessor.agent_sha256
|
||||
} else {
|
||||
&self.handoff.predecessor.helper_sha256
|
||||
},
|
||||
)?;
|
||||
ensure!(
|
||||
!services[..index]
|
||||
.iter()
|
||||
.any(|p| p.process.pid == service.process.pid),
|
||||
"HANDOFF_PROCESS_REUSE"
|
||||
);
|
||||
ensure!(
|
||||
self.started.as_ref().is_none_or(|(prior, _)| !prior
|
||||
.iter()
|
||||
.any(|p| p.process == service.process)),
|
||||
"HANDOFF_RESTORE_OLD_PROCESS_REUSED"
|
||||
);
|
||||
}
|
||||
digest(observation_sha256)?;
|
||||
Phase::RollbackServicesStarted
|
||||
}
|
||||
(Phase::RollbackServicesStarted, Evidence::RollbackHealthVerified { receipt }) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
self.verify_health(receipt, event.observed_at)?;
|
||||
Phase::RollbackHealthVerified
|
||||
}
|
||||
(
|
||||
Phase::RollbackHealthVerified,
|
||||
Evidence::RollbackOutcomePersisted { outcome_sha256 },
|
||||
) => {
|
||||
self.rollback_window(event.observed_at)?;
|
||||
digest(outcome_sha256)?;
|
||||
Phase::OutcomePersisted
|
||||
}
|
||||
_ => anyhow::bail!("HANDOFF_PHASE_ORDER"),
|
||||
};
|
||||
Ok(next)
|
||||
}
|
||||
|
||||
fn rollback_window(&self, at: u64) -> Result<()> {
|
||||
ensure!(
|
||||
self.handoff.schema_version == 2
|
||||
&& self
|
||||
.original_start_at
|
||||
.and_then(|start| at.checked_sub(start))
|
||||
.is_some_and(|age| age < 180)
|
||||
&& at < self.handoff.finish_before,
|
||||
"HANDOFF_ROLLBACK_ORIGINAL_DEADLINE"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn verify_health(&self, signed: &SignedHealth, at: u64) -> Result<()> {
|
||||
let receipt: HealthReceipt = canonical(&signed.payload, 4096)?;
|
||||
let signature =
|
||||
|
||||
@@ -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