Add durable cellular action protocol v7
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 40s
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 (client) (push) Canceled after 1m16s
Foundation / checks (ecs) (push) Canceled after 1m8s
Foundation / checks (network) (push) Canceled after 37s

This commit is contained in:
dingo
2026-10-10 22:57:03 -04:00
parent d0c7a938f1
commit d1717410d6
7 changed files with 163 additions and 18 deletions
@@ -0,0 +1,33 @@
# 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.