Files
aevolution/schemas/network/session-v7-cellular-action.md
T
dingo a2e5cd5f68
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (ecs) (push) Canceled after 1m39s
Foundation / checks (network) (push) Canceled after 1m8s
Foundation / checks (client) (push) Canceled after 1m49s
Add canonical cellular action input codec
2026-10-10 22:59:05 -04:00

40 lines
2.0 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 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.