Files
aevolution/schemas/network/session-v4.md
T
dingoandClaude Opus 5.5 a7a3d12283
Foundation / checks (deploy) (push) Successful in 3m29s
Foundation / checks (ecs) (push) Successful in 2m0s
Foundation / checks (client) (push) Successful in 12m51s
Foundation / checks (network) (push) Successful in 13m0s
Foundation / checks (tsan) (push) Successful in 7m50s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 32m4s
Foundation / checks (postgres) (push) Canceled after 19m13s
Wire M10.8c-1 region handoff: protocol v4, durable probes, crossing, ghosts
ADR-0096. Session protocol v4 (v3 is deployed and frozen) adds HandoffOffer,
SessionRedirect, close reasons handed_off and moved, and ghost marker records.
Sessions use the durable probe record: logins open it where it was saved
(redirected when it lives elsewhere), and session ends save it. A marker
crossing into a neighbour's area is frozen, prepared, its control released
and a signed ticket offered; uncommitted transfers are aborted after the
ticket's lifetime. The destination shows arriving probes as ghosts (schema
v13 incoming_probe_transfers) and opens the marker where it crossed.

Refreshes the dev session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:24:42 -04:00

1.8 KiB

M10 session protocol, version 4

Version 4 is version 3 plus two server-to-client stream messages, two close reasons and a ghost marker kind, for cross-region handoff (ADR-0096). Everything else is as in v3. The header version is 4. Versions 1-3 were deployed to evolution-dev and are frozen; all three are refused (unsupported_version). Once v4 is deployed it is frozen like them.

Messages (in addition to v3 types 1-15)

Type Direction Body Bytes
16 HandoffOffer server -> client, stream transfer id (16), destination address, ticket (160) 312
17 SessionRedirect server -> client, stream owner address 136

An address is: region u64 (nonzero), endpoint (64 bytes), server name (64 bytes). Each text field is 1-64 printable ASCII characters without spaces (0x21-0x7E), padded with zero bytes. A nonzero byte after the first zero is invalid, and the transfer id must be nonzero.

  • HandoffOffer, while established: the session's probe crossed into the destination region. The ticket (handoff-ticket-v1) goes in Hello's grant slot there. The source then sends Close(handed_off).
  • SessionRedirect, before Welcome: the account's probe is owned by that region. A grant for it is needed there. The region then sends Close(moved).

Close reasons (in addition to v3's 1-13)

  • 14 handed_off: the session ended because its probe crossed into another region.
  • 15 moved: the account's probe is owned by another region; a Redirect may precede it.

Snapshot records

Marker upsert (kind 5): the own byte becomes a kind.

  • 0: another session's marker.
  • 1: the receiving session's own marker (sequence and area follow).
  • 2: a ghost, a probe being handed to this region, read-only, with no sequence or area.

Any other value is malformed.