Close the B1 transition: lift, precondition, boot reconciliation, closed history

Soul found B1's rule sound and its transition unsafe. This makes the rule's
old inputs impossible to reintroduce a stuck state from.

- The control store's legacy lift owns the transition. A pre-B1 continuity
  abort that issued an activation lifts with topology_reconciliation Pending,
  so the one resolution demotes its own activation. A record already terminal
  under the old rule is reopened at Starting, since a terminal record cannot
  owe work. History lifts records as written. Before this, one resident
  record of that shape failed validation and ControlSnapshot::read refused the
  whole store, so Idunn could not boot.
- Supervision owns the Expected-only precondition. When its pre-restart
  demotion fails it mints no continuity and writes next_restart_at_unix_millis
  on the generation's ContinuityBackoff (attempts and window untouched), so it
  neither restarts over an undemotable projection nor retries every tick.
- Boot reconciles once: a projected activation that exactly matches the
  activation a failed continuity in history (or a resident terminal record)
  issued is demoted. Nothing is adopted; an activation no admitted generation,
  live transaction or failed issuer accounts for is reported and left alone.
  New read-only CultCacheTopologyDriver::projected_activation.
- Unreadable history.cc fails closed. The continuity restart ceiling and the
  consumed-command check no longer read an empty history; they stop, and the
  fault is reported once while it lasts (ReportOnce). The undecodable-record
  report is a pure function, pinned.
- docs/deployment-authority.md no longer says the projection never drifts.

Tests: legacy fixtures written by the 9001b58 encoder for the three abort
shapes (a second throwaway generator, see the fixtures README), driven through
the Engine; the seeded-transaction helper now takes a command kind and an
incumbent, and a Deploy carries a frozen-source receipt and a signed brake
release, so Deploy commit, Deploy pre- and post-fence aborts and a continuity
abort over an incumbent run through the real phase machine.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 06:11:29 +02:00
commit 9e5b7f84fd
8 changed files with 1433 additions and 68 deletions

File diff suppressed because it is too large Load diff

View file

@ -4488,6 +4488,22 @@ impl CultCacheTopologyDriver {
)
}
/// The activation the projection currently names under this incarnation's
/// key, if any. Read-only: it never judges whether the activation is the
/// right one, so a caller can tell an exact issuer from a substitute
/// before it demotes anything.
pub fn projected_activation(
&self,
expected: &IdunnExpectedIncarnationRecord,
) -> Result<Option<IdunnRuntimeActivationRecord>> {
let key = incarnation_key(expected)?;
let entries = self.snapshot()?;
projection_entry(&entries, IdunnRuntimeActivationRecord::TYPE, &key)?
.map(|envelope| IdunnRuntimeActivationRecord::decode_canonical(&envelope.payload))
.transpose()
.map_err(Into::into)
}
/// Every incarnation currently projected for one target, by its Expected.
pub fn projected_incarnations(
&self,