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:
parent
4b5e60fb12
commit
9e5b7f84fd
8 changed files with 1433 additions and 68 deletions
|
|
@ -314,9 +314,19 @@ window.
|
|||
|
||||
A failed continuity restart leaves its own candidate activation projected under
|
||||
the shared Expected key. Its abort demotes that key to Expected-only with the
|
||||
exact activation the transaction issued, so the projection never drifts from the
|
||||
admitted receipt. Rollback after fencing demotes the admitted generation's exact
|
||||
activation. No path adopts an activation the transaction did not issue.
|
||||
exact activation the transaction issued. Rollback after fencing demotes the
|
||||
admitted generation's exact activation. No path adopts an activation the
|
||||
transaction did not issue.
|
||||
|
||||
A projection can still hold an activation the abort never resolved: a failure
|
||||
between preparing a candidate and publishing its observation, an abort written
|
||||
by an earlier Idunn, or an operator edit. Continuity therefore restarts a
|
||||
generation only from an Expected-only projection: when its own demotion is
|
||||
refused it mints no restart, records the deferral in the generation's
|
||||
continuity backoff, and tries again after it. At boot, Idunn demotes an
|
||||
activation still projected for a failed continuity in history, by that
|
||||
transaction's exact activation, and only reports one no failed transaction
|
||||
issued.
|
||||
|
||||
Idunn starts and recovers from its own durable admitted state. Odin is the first
|
||||
managed semantic daemon, never an Idunn bootstrap dependency. Odin's initial
|
||||
|
|
|
|||
1444
src/control_plane.rs
1444
src/control_plane.rs
File diff suppressed because it is too large
Load diff
|
|
@ -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,
|
||||
|
|
|
|||
20
tests/fixtures/idunn-control-legacy/README.md
vendored
20
tests/fixtures/idunn-control-legacy/README.md
vendored
|
|
@ -22,3 +22,23 @@ the plan is the `deployment_plan` test recipe. No byte comes from a live store.
|
|||
|
||||
`control_plane.rs` decodes these through `LegacyDeploymentTransaction` and
|
||||
`LegacyAdmittedGeneration`. The fixtures die with those structs.
|
||||
|
||||
## Pre-B1 continuity aborts
|
||||
|
||||
The `transaction-*-abort*` files and `provider-anchor` were printed by a second
|
||||
throwaway test over `9001b58`. It built a continuity transaction that issued an
|
||||
activation (the recipe and binding of the `deployment_plan` tests, a provider
|
||||
identity enrolled fresh, the trust-anchor path in the binding fixed at
|
||||
`/tmp/idunn-b1-legacy/provider-anchor.cc`) and gave it the aborts the base code
|
||||
writes: the pre-fence abort literal of `begin_pre_fencing_abort`, and the base
|
||||
`post_fencing_abort_intent`. In each, the transaction issued an activation and
|
||||
its abort records `topology_reconciliation = Skipped`, because the base rule
|
||||
owed a continuity no projection cleanup. The workload and Odin evidence are
|
||||
borrowed from `transaction-fencing`.
|
||||
|
||||
| File | What it is |
|
||||
|---|---|
|
||||
| `transaction-pre-fence-abort` | Warming continuity, pre-fencing abort in flight |
|
||||
| `transaction-pre-fence-abort-terminal` | the same abort finished: Complete, `FailedBeforeFencing` |
|
||||
| `transaction-post-fence-abort` | Fencing continuity, post-fencing abort in flight |
|
||||
| `provider-anchor` | one line: the provider trust-anchor file bytes, hex. A test writes it to the fixed path so the Engine can read the plan's anchor |
|
||||
|
|
|
|||
1
tests/fixtures/idunn-control-legacy/provider-anchor.hex
vendored
Normal file
1
tests/fixtures/idunn-control-legacy/provider-anchor.hex
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
93b263756c7463616368652e73746f72652e76319197d93167616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631d93167616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631d93467616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e76312e7631d93167616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631d9967b22736368656d614e616d65223a2267616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631222c22736368656d6156657273696f6e223a2267616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e76312e7631222c226d656d62657273223a5b5d7d91d93167616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631909194d92867616d6563756c742d70726f76696465722d6865616c74682d6964656e746974792d7075626c6963d93167616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631d923323032362d30392d32395430333a34353a31352e3031353232313330302b30303a3030c5014596d93167616d6563756c742e70726f76696465725f6865616c74685f6964656e746974792e74727573745f616e63686f722e7631d94031626661653932326138626630313132373562353536623236393135303363386366643538313234383931373134323365373736663133386463313235376337dc00205858cca9ccbb7dccb9cc8d01cccfccfccc9153ccdbcce23c224bcca757617dcce5cc8a163a6516cc9dccee2c2acce9d92d6f735f696e7374616c6c6174696f6e5f66696c655f626f756e645f636c6f6e6561626c655f626173656c696e65d923323032362d30392d32395430333a34353a31352e3031353232313330302b30303a3030d9477368613235362d63663933623766656534396235313133343736366538613937623432303065653636396338353164386464336634353366623537666664326233366630653430
|
||||
2
tests/fixtures/idunn-control-legacy/transaction-post-fence-abort.hex
vendored
Normal file
2
tests/fixtures/idunn-control-legacy/transaction-post-fence-abort.hex
vendored
Normal file
File diff suppressed because one or more lines are too long
2
tests/fixtures/idunn-control-legacy/transaction-pre-fence-abort-terminal.hex
vendored
Normal file
2
tests/fixtures/idunn-control-legacy/transaction-pre-fence-abort-terminal.hex
vendored
Normal file
File diff suppressed because one or more lines are too long
2
tests/fixtures/idunn-control-legacy/transaction-pre-fence-abort.hex
vendored
Normal file
2
tests/fixtures/idunn-control-legacy/transaction-pre-fence-abort.hex
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue