B5: the Odin adoption test steps through sequence admission

AwaitingReady admits a new Odin sequence in one step and records Ready from
it in the next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 18:51:17 +02:00
commit aef0da34af

View file

@ -18829,9 +18829,19 @@ mod tests {
schema_id: Some(cultnet_rs::ODIN_RUNTIME_TOPOLOGY_CORRELATION_SCHEMA.into()),
};
replace_odin_entry(&routed.world.engine.options.odin_correlation_store, ready)?;
routed.step()?;
// One step admits the new sequence, the next records Ready from it.
for _ in 0..3 {
if routed.transaction()?.ready.is_some() {
break;
}
routed.step()?;
}
let adopted = routed.transaction()?;
assert!(matches!(adopted.ready, Some(ReadinessEvidence::OdinCorrelated { .. })));
assert!(
matches!(adopted.ready, Some(ReadinessEvidence::OdinCorrelated { .. })),
"{:?}",
adopted.last_error
);
let adoption = adopted.lease_adoption.context("Odin's Ready recorded no adoption")?;
assert_eq!(adoption.source, AdoptionSource::OdinTopology);
assert_eq!(adoption.write_lease_sha256, lease);