Do not require an activation Idunn cannot have published yet
Odin's startup demanded that the live Idunn projection already carry the runtime activation matching its bundle. Idunn publishes that record only after it has observed the started process -- the activation carries that process's executable digest -- so at the moment Odin checks, it cannot exist. Every first start failed with "Idunn live projection differs from Odin's immutable runtime bundle". The Expected incarnation is still required to match, and a projected activation, once present, must be this one, so a stale or foreign activation is still refused. The bundle's own activation is verified against the Idunn anchor regardless, and the write lease is checked against the live projection before Odin writes anything. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
8e16f56f33
commit
08965a44e1
1 changed files with 18 additions and 2 deletions
|
|
@ -150,10 +150,26 @@ impl RuntimeState {
|
|||
.current_projection(TARGET)?
|
||||
.context("Idunn projection has no Expected Odin incarnation")?;
|
||||
ensure!(
|
||||
projection.expected == authority_material.expected
|
||||
&& projection.activation.as_ref() == Some(&authority_material.activation),
|
||||
projection.expected == authority_material.expected,
|
||||
"Idunn live projection differs from Odin's immutable runtime bundle"
|
||||
);
|
||||
// The activation cannot be required here. Idunn publishes it only after
|
||||
// it has observed the started process -- it carries that process's
|
||||
// executable digest -- so at the moment this runs it does not yet
|
||||
// exist, and demanding it made every first start fail. What is required
|
||||
// is that a projected activation, once present, is *this* one; a stale
|
||||
// or foreign activation is still refused.
|
||||
//
|
||||
// The bundle's own activation is not taken on trust either: it is
|
||||
// verified against the Idunn anchor below, and the write lease is
|
||||
// checked against the live projection before Odin writes anything.
|
||||
ensure!(
|
||||
projection
|
||||
.activation
|
||||
.as_ref()
|
||||
.is_none_or(|activation| activation == &authority_material.activation),
|
||||
"Idunn live projection names another Odin activation"
|
||||
);
|
||||
let provider_anchor = projection
|
||||
.provider_anchor
|
||||
.as_ref()
|
||||
|
|
|
|||
Loading…
Reference in a new issue