Wire M10.8c-1 region handoff: protocol v4, durable probes, crossing, ghosts
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

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>
This commit is contained in:
dingo
2026-10-06 21:24:42 -04:00
co-authored by Claude Opus 5.5
parent 97a3756e46
commit a7a3d12283
39 changed files with 1315 additions and 68 deletions
+56
View File
@@ -4767,3 +4767,59 @@ Executed:
Not done:
- the source side and the client switch (10.8c);
- two-process kill tests (10.8d).
## 2026-10-06 — M10.8c-1 region handoff wiring (ADR-0096)
Implemented:
- session protocol v4 (HandoffOffer, SessionRedirect, `handed_off` and `moved`, ghost marker
kind; v1-v3 refused);
- the client library keeps offers and redirects;
- `ProbeLedger` (durable open, save, prepare, abort, incoming) and the PostgreSQL version;
- `HandoffAdmission` (state after the switch);
- `RegionSessions`:
- neighbours and the movement area;
- crossing detection, freeze, prepare, control release, a signed ticket, the offer and the
close;
- timed aborts and ghost polling;
- logins placing the durable probe (clamped into the area), with a redirect or `moved`
when it is owned elsewhere;
- saves at session end;
- `ProbeMarkers` `open_at`, `place`, `freeze` and ghosts;
- schema v13 `incoming_probe_transfers` (apply chain, audit, CI checks);
- client ghost drawing.
Found and fixed during development:
- a dangling marker pointer after clamping (two `place` calls);
- the spawn computed from the area instead of the configured one;
- a probe left beyond the edge by an aborted handoff crossing again at login (now clamped).
Tests:
- codec tests for the offer and redirect (round trip, text and padding rules, zero region or
transfer, lengths), with the v4 version, type and reason boundaries;
- ghosts and freezing through replication;
- `two_region_handoff` (two regions in one process over a fake world database):
- a crossing; a ghost at the destination before the switch;
- a ticket login at the crossing position (owner and generation moved); the ghost gone;
- a redirect; a crossing back;
- an abandoned handoff aborted after its deadline, the probe resumed at the edge, and the
late ticket refused;
- PostgreSQL: incoming transfers appear for the destination only while open.
Executed:
- **Linux GCC 14:**
- `postgres-check.sh` with QUIC: 21 suites (migrations to v13; races 8 commits, 16
aborts);
- presets `quic` 4/4 and `client-network` 16/16;
- `evo-quic-session-tests` 3 times in a row.
- **Linux Clang 19:** ASan/UBSan `evo-network-tests`; clang-tidy 19 on the protocol, motion,
replication, interpolation, client, region-sessions, handoff-ledger, store and test sources
(findings fixed); clang-format 19.
- **Windows MSVC 19.44:** presets `quic` 4/4 and `client-network` 14/14.
Not done:
- the engineering client's handling of offers, redirects and multi-region grants, and
evo-server and probe configuration (10.8c-2);
- real processes (10.8d).
Deployed v3 servers refuse v4 clients until redeployed; v12 and v13 need a rebuilt
migrations image.