fix: retain sync anchors and verify bound APT partial postconditions
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-13 17:20:50 +01:00
parent 435c4453fe
commit 998f16fde4
13 changed files with 1469 additions and 16 deletions
+5 -5
View File
@@ -238,11 +238,11 @@ impl ClientSync {
request_id: Uuid::new_v4().to_string(),
journal_id: meta.journal_id.to_string(),
checkpoint: u64::try_from(next)?,
previous_decision_id: if meta.pending_request.is_some() {
String::new()
} else {
meta.decision.map(|id| id.to_string()).unwrap_or_default()
},
// A pending request may have committed with a lost reply, or may
// never have reached the server. Preserve both witnesses: the
// server resolves the pending request first and otherwise checks
// this last applied decision against its authoritative head.
previous_decision_id: meta.decision.map(|id| id.to_string()).unwrap_or_default(),
assignment_version: self.binding.assignment_version,
attempts,
durable_message_ids: ids,
+5 -2
View File
@@ -788,7 +788,7 @@ fn rollback_and_false_clock_close_mutations_but_do_not_destroy_journal() {
let _native = NativeClock::default();
}
#[test]
fn lost_response_uses_fresh_request_and_previous_request_not_old_decision() {
fn uncertain_request_preserves_pending_request_and_last_applied_anchor() {
let mut f = Fixture::new();
let mut c = f.client();
let first = f.prepare(&mut c);
@@ -804,7 +804,10 @@ fn lost_response_uses_fresh_request_and_previous_request_not_old_decision() {
recovered.request.previous_request_id,
lost.request.request_id
);
assert!(recovered.request.previous_decision_id.is_empty());
assert_eq!(
recovered.request.previous_decision_id,
d.decision_id.to_string()
);
}
#[test]