Admit v10 mutation choices through the cellular host and sessions

The region host checks a choice against the committed offer, reserves the
successor for the next tick, and publishes it with that tick's batch; the
owner's v10 session gets the receipt and final outcome. Schema v35 now
refuses a checkpoint that skips a reserved choice, and the host reloads
pending reservations after uncertainty, refusal or recovery (ADR-0121).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-13 19:45:23 -04:00
co-authored by Claude Opus 5.5
parent 1bbac48543
commit f59c8498b1
14 changed files with 583 additions and 12 deletions
@@ -93,3 +93,34 @@ crash/retry tests. The biology generator and funded-transition APIs remain pure.
Candidate ranking, automatic mutation, new-life creation, and presentation
belong to no part of this contract. The operation is not player-accessible until
the later 11.4d client action and review UI are complete.
## Implementation notes
- 11.4c-1 (schema v35): a checkpoint whose trace carries selections publishes
only through `publish_cellular_mutation_checkpoint`, with the canonical
64-byte mutation block and one result byte per choice, taken from the
publisher's own replay. Recovery reloads the bound choices and requires the
replay's results to equal them.
- 11.4c-2 (host and session admission, 2026-10-13): the region host admits a
v10 `CellularMutationAction` only when it names the account's living cell,
its exact outstanding offer (event index and offer tick) and one of the
offered operators, checked against the committed state. It reserves the
successor for the next tick (head + 1), queues the reservation, and the
scheduler includes it in that tick's batch. Exact repeats are idempotent;
a second choice while one waits is refused as `too_many_unresolved`, and a
changed reuse of an action ID as `invalid_action`. The receipt names the
publishing tick; once published, the owner receives an `ActionOutcome`:
`committed` when applied, `committed_no_effect` for a durable refusal (life
died, insufficient funding). A repeat after publication returns the same
outcome (`duplicate`) while the host remembers it.
- A reserved choice must never be skipped: schema v35 also refuses any
checkpoint whose tick range contains an unbound reservation of the region
that the checkpoint does not carry. Without this, an uncertain reservation
(the reply was lost but the row committed) could pass its tick unpublished
and block its account's next choice forever. The host treats an uncertain
reservation, a refused publication or a recovery as "reload pending
reservations under the current lease before the next publication".
- The wire `tick` of the choice is the client's latest simulated tick (after
the offer); the server, not the client, chooses the publishing tick.
- Not yet done: replicating the offer's unranked candidates to the owner
(11.4d server half) and the client choice and review UI (maintainer).