Observe Odin's warming directly whenever no Odin can observe it

Warming presence reaches Idunn as Odin's signed topology correlation, with one
exception for Odin's own first bootstrap. That exception was scoped too
narrowly: it asked whether an Odin had ever been admitted, when the question
that matters is whether an Odin can currently report.

A continuity restart of Odin cannot be observed through Odin -- the incumbent
that would do the observing is the process being restarted. Neither can a
deployment made while the admitted Odin has no usable correlation. Both sat
waiting for evidence that could not arrive, and continuity restarted the
target into that wait every few seconds.

The rule is now the one that justified the bootstrap case in the first place:
direct observation exactly when "observed through Odin" is unavailable, and
only ever for this one target. Every other target still waits for Odin, which
is what makes Odin the root of the chain.

Also adds the projection-presence check continuity uses to tell a projection
that still describes a dead incarnation from one already demoted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-07 23:29:34 +02:00
commit a6120f242e
2 changed files with 128 additions and 42 deletions

View file

@ -3373,6 +3373,60 @@ impl CultCacheTopologyDriver {
bail!("topology projection changed repeatedly during admitted restoration")
}
/// Whether the projection currently names any activation for this target.
///
/// Continuity asks so it can tell a projection that still describes a dead
/// incarnation from one that has already been demoted to Expected-only.
pub fn projected_activation_is_present(&self, target: &str) -> Result<bool> {
if !self.projection_store.exists() {
return Ok(false);
}
let entries = SingleFileMessagePackBackingStore::new(&self.projection_store)
.pull_all_read_only_snapshot()?;
Ok(projection_entry(&entries, IdunnRuntimeActivationRecord::TYPE, target)?.is_some())
}
/// Whether the projection already carries this admitted Expected.
///
/// Deliberately says nothing about the activation. Continuity restores the
/// Expected for a target whose process is gone, and at that moment there is
/// no activation to be exact about -- the next one is issued when the
/// workload starts.
pub fn admitted_expected_projection_is_exact(
&self,
expected: &IdunnExpectedIncarnationRecord,
provider_anchor: &ServiceIdentityTrustAnchor,
) -> Result<bool> {
expected.validate()?;
if !self.projection_store.exists() {
return Ok(false);
}
let entries = SingleFileMessagePackBackingStore::new(&self.projection_store)
.pull_all_read_only_snapshot()?;
let anchor = runtime_presence_trust_anchor(expected, provider_anchor)?;
let expected_is_exact = match projection_entry(
&entries,
IdunnExpectedIncarnationRecord::TYPE,
&expected.target,
)? {
Some(envelope) => {
envelope.schema_id.as_deref() == Some(IDUNN_EXPECTED_INCARNATION_SCHEMA)
&& IdunnExpectedIncarnationRecord::decode_canonical(&envelope.payload)?
== *expected
}
None => false,
};
let anchor_is_exact = match projection_entry(
&entries,
GameCultServiceTrustAnchorRecord::TYPE,
&anchor.trust_anchor_id,
)? {
Some(envelope) => service_trust_anchor_from_envelope(envelope)? == anchor,
None => false,
};
Ok(expected_is_exact && anchor_is_exact)
}
pub fn admitted_runtime_projection_is_exact(
&self,
expected: &IdunnExpectedIncarnationRecord,