2.0 KiB
Session protocol v7 cellular action
ADR-0111 defines this reliable-stream input. It uses session message type 23 and
an exactly 48-byte little-endian payload under the existing 8-byte EVSN
header. The version is 7 and flags are zero. Versions 1–6 retain their wire
layouts and behavior.
| 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 | 2 | signed movement X component |
| 34 | 2 | signed movement Y component |
| 36 | 1 | intake target present: 0 or 1 |
| 37 | 3 | reserved, all zero |
| 40 | 4 | target patch lower-left X in μm |
| 44 | 4 | target patch lower-left Y in μm |
When the target flag is zero, both coordinates must be zero. The codec rejects zero identity fields, invalid flags, nonzero reserved bytes, noncanonical absent-target coordinates, truncated/trailing payloads and versions other than 7. Movement bounds, patch alignment, timing, session authority and biological effects are checked by admission and the authoritative cellular host.
The action id is durable account-scoped identity, not a connection sequence.
Clients retry the same id only with byte-identical canonical input. A receipt
means admission only. ActionOutcome::committed (wire value 5) means the action
and its cellular state committed together; the client reads its authoritative
view for the resulting state. This result is accepted only in v7. Exact retry,
ID conflict, query, and commit resolution behavior follows ADR-0111 and the
durable cellular publication contract.
For persistence, the biological input is canonicalized separately as 24 bytes: tick u64, movement X/Y i16, target flag u8, three zero bytes, and target X/Y u32, all little-endian. Session, epoch and action id are excluded; the latter is already the durable record key. Thus an exact reconnect retry yields the same stored input bytes.