Files
aevolution/schemas/network/session-v10-cellular-mutation-action.md
T
dingoandClaude Opus 5.5 d98d71e7c0
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m4s
Foundation / checks (tsan) (push) Successful in 9m59s
Foundation / checks (client) (push) Successful in 19m19s
Foundation / checks (network) (push) Successful in 19m24s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 32m13s
Foundation / checks (checks) (push) Canceled after 32m19s
Show what a bud costs (ADR-0129 amendment)
The v10 cellular perception carries the bud cost after the diagnostics block: the
energy (construction plus the bud's provision) and matter per channel one bud takes
from a fully grown cell's reserve. biology::bud_cost reads it from fund_bud itself,
so the shown cost is exactly the charge; the server caches it per genome. The
client shows it and names the channels the reserve is short on. v10 clients must
be rebuilt.

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

4.7 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, 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 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.