Files
aevolution/schemas/network/session-v10-cellular-mutation-action.md
T
dingoandClaude Opus 5.5 f77956e579 Send the owner its outstanding mutation offer over v10
Session protocol v10 adds type 26: the life's earned offer with its unranked
candidates in operator order and each successor's capability value,
maintenance and total mass. The cellular bridge sends it when the offer or the
owner's session changes and clears a consumed offer; the client keeps the
latest one for the maintainer's choice UI (ADR-0121, 11.4d server half).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:07:50 -04:00

73 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Session protocol v10 cellular mutation choice
ADR-0121 adds v10 as an additive extension. Versions 1–9 retain their exact
wire layouts and behavior. V10 retains the v9 owner diagnostics and adds a
reliable-stream mutation-choice action as message type 25. This message selects
an operator from an already earned offer; it supplies no genome, successor
identity, price, or biological state.
## Type 25
The standard 8-byte `EVSN` header uses version 10, type 25 and flags 0. The
payload is exactly 64 bytes, little-endian:
| Payload offset | Size | Field |
|---:|---:|---|
| 0 | 8 | authenticated session id, nonzero |
| 8 | 8 | control epoch, nonzero |
| 16 | 8 | stable per-account action id, nonzero |
| 24 | 8 | intended simulation tick, nonzero |
| 32 | 8 | stable life identity, nonzero |
| 40 | 8 | earned offer event index, nonzero |
| 48 | 8 | exact offer tick, nonzero and before the intended tick |
| 56 | 2 | offered operator id, nonzero |
| 58 | 6 | reserved, all zero |
The decoder rejects all zero identities, an offer tick at or after the target
tick, reserved bytes, wrong lengths, and use under versions 1–9. When server
admission is enabled, it must bind the action to the authenticated account,
verify the exact current offer and operator, reserve the successor identity
idempotently by `(world, account, action_id)`, then schedule the choice for that
advancing tick. The reliable receipt means admission only; the final outcome is
tied to the committed tick and its recovered cellular checkpoint.
Runtime admission (11.4c-2): the server ignores the client tick for scheduling
(it is the client's latest simulated tick, after the offer) and publishes the
choice with the tick after its committed head; the receipt's `tick` names it.
Receipt statuses: `admitted`, `not_ready`, `too_many_unresolved` (another
choice of the account is waiting), `invalid_action` (not the exact offer and
candidate, or a changed reuse of the action id), and `duplicate` with the
final outcome. The `ActionOutcome` is `committed` when applied and
`committed_no_effect` for a durable refusal (life died, insufficient funding).
## Type 26 (server to owner)
11.4d adds the owner's outstanding offer as a reliable-stream message, type 26,
sent only to the owning account's v10 session when the offer or the session
changes. Payload, little-endian: a 40-byte prefix followed by `count` 24-byte
candidates.
| Payload offset | Size | Field |
|---:|---:|---|
| 0 | 8 | tick of the view, nonzero |
| 8 | 8 | life identity |
| 16 | 8 | offer event index (zero when cleared) |
| 24 | 8 | offer tick, at or before the view tick (zero when cleared) |
| 32 | 2 | candidate count, 0 to 8 |
| 34 | 6 | reserved, all zero |
Each candidate:
| Offset | Size | Field |
|---:|---:|---|
| 0 | 2 | operator id, nonzero, strictly increasing (stable order, never a rank) |
| 2 | 1 | capability (0 to 6, the genome enum) |
| 3 | 1 | effect (0 adjust up, 1 adjust down, 2 acquire, 3 shed) |
| 4 | 4 | the successor's capability value; zero when shed |
| 8 | 8 | the successor's maintenance |
| 16 | 8 | the successor's total mass |
A message with no candidates clears the client's offer and must carry zero event
and offer tick; one with candidates must name a nonzero life, event and offer
tick. Types 25 and 26 are not decoded under versions 1–9.