Files
aevolution/schemas/network/session-v10-cellular-mutation-action.md
T
dingoandClaude Opus 5.5 1446d36d26
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m1s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m31s
Foundation / checks (checks) (push) Successful in 42m41s
Foundation / checks (postgres) (push) Successful in 45m36s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m15s
Foundation / image (push) Successful in 3m18s
Decline a mutation offer (ADR-0120 amendment, schema v40)
An offer the cell cannot afford stayed open, and only one offer is issued at a
time, so banked feeding credit never became a new offer. A v10 choice naming
operator 0 now declines the exact outstanding offer. It is reserved and published
like any choice: schema v40 accepts operator 0 in the reserved input and trace
selections and stores result 3, declined. The owner consumes the offer and
changes nothing else, and the client reports it as committed. Old traces never
carry operator 0, so their replay is unchanged. The Evolution panel gets a
"Decline this offer" button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:43:36 -04:00

4.9 KiB
Raw Blame History

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; 0 declines the offer (ADR-0120 amendment)
58 6 reserved, all zero

The decoder rejects zero identities (operator 0 is a decline, not an identity), 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 or declined and committed_no_effect for a durable refusal (life died, insufficient funding). Operator 0 (2026-10-15) declines the exact current offer: it consumes the offer without changing the genome, and needs schema v40.

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 64-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
24 8 cost to this cell: construction energy (ADR-0129)
32 32 cost to this cell: matter per channel (carbon, nitrogen, phosphorus, other)

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.

v10 tick effects and type 27 (ADR-0129)

In a v10 cellular perception the diagnostics byte at payload offset 77 is the engulf result (0 not reported, 1 not requested, 2 engulfed, 3 no eligible prey (no longer sent), 4 unsupported, 5 no contact, 6 prey too large, 7 membrane too thick) and byte 78 the bud result (0 not reported, 1 not requested, 2 budded, 3 not able, 4 insufficient funding, 5 no placement); bytes 79-81 stay zero, and both results are zero without tick effects. v9 keeps bytes 77-81 zero.

A v10 diagnostics block is followed by the bud cost (ADR-0129 amendment, 2026-10-15), so v10 patch records start at payload offset 122:

Payload offset Size Field
82 8 bud cost energy, pJ: construction plus the bud's provision
90 32 bud cost C, N, P, other, each fg: the investment matter

It is what one bud takes from the reserve once the cell is fully grown and undamaged, exactly as the owner funds it, and it does not depend on tick effects. All zero means this genome cannot bud. A cleared zero-life view must carry an all-zero bud cost. v9 has no bud cost.

Type 27 (server to owner, reliable stream, v10 only) is exactly 24 bytes: the tick (u64, nonzero), the life identity (u64, nonzero), the cause (u8: 0 not recorded, 1 starved, 2 engulfed) and seven zero bytes.