Bump admitted generation to v3 and transaction to v4 with typed readiness (F0)

One migration for the route-continuity foundation. No decision reads the new
state.

- ReadinessEvidence (OdinCorrelated | RouteProof) replaces the bare Odin Ready
  receipt on both records. The class a target must collect is derived from its
  Expected (ReadinessClass::of): a shared-infrastructure odin.verse-rendezvous
  dependency means Odin-correlated, none means route-proof. It is not stored.
  RouteProof evidence is refused for a target that declares Odin.
- Generation carries route supervision state (challenge times, failures,
  degraded marker, actuation window) and continuity backoff. A new generation
  inherits the actuation window and backoff and starts unobserved and
  undegraded. route_repair_started_at stays readable.
- Transaction carries the current phase deadline (stamped by transition from
  the plan's frozen durations) and lease adoption evidence.
- FailedAfterFencing names its recovery: RestartAdmitted, RestoreIncumbent
  (the default for older records) or OperatorRequired{reason}.
- Every v2 generation lifts as Odin-correlated with its receipts unchanged;
  v2 and v3 transactions lift through LegacyDeploymentTransaction. The boot
  migration rewrites both, preserving stored_at, and history reads lift the
  same way. The Legacy structs die when no older record can remain.

Fixtures under tests/fixtures/idunn-control-legacy are the bytes the 9001b58
encoder wrote for records built through its own constructors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 02:14:47 +02:00
commit 09222ad8eb
11 changed files with 1307 additions and 113 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
# Legacy control-record wire fixtures
Each `*.hex` file is two lines: the CultCache envelope `schema_id`, then the
record's MessagePack payload in hex. They are the exact bytes the encoder at
Idunn `9001b58` (the base of the F0 cut) wrote for records built through that
revision's own constructors: `DeploymentTransaction::new`,
`AdmittedGeneration::from_transaction`, `SealedRelease::new`,
`compile_deployment_plan`, and `rmp_serde::to_vec`. A throwaway test on a
scratch commit over `9001b58` printed them; it is not kept.
Everything in them is synthetic: identities were enrolled fresh in a temporary
directory, the Odin receipts are placeholder bytes with correct digests, and
the plan is the `deployment_plan` test recipe. No byte comes from a live store.
| File | Schema | What it is |
|---|---|---|
| `generation-with-receipts` | `idunn.admitted_generation.v2` | routed, stateless generation with Ready and latest Odin receipts |
| `generation-route-repair-started` | `idunn.admitted_generation.v2` | the same with `route_repair_started_at_unix_millis` set |
| `transaction-fencing` .. `transaction-committing` | `idunn.deployment_transaction.v3` | one continuity transaction in each post-fencing phase |
| `transaction-committing-v2` | `idunn.deployment_transaction.v2` | the Committing record in the v2 layout: the v3 tuple without key 34 (base code stops writing v2, so this one is the v3 encoding with its trailing nil slot dropped and the header count lowered) |
| `transaction-failed-after-fencing` | `idunn.deployment_transaction.v3` | terminal post-fencing failure with complete abort evidence |
`control_plane.rs` decodes these through `LegacyDeploymentTransaction` and
`LegacyAdmittedGeneration`. The fixtures die with those structs.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long