Add M10.8b signed handoff tickets and ticket admission
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (client) (push) Successful in 12m40s
Foundation / checks (postgres) (push) Canceled after 4s
Foundation / checks (network) (push) Successful in 12m53s
Foundation / checks (tsan) (push) Successful in 7m55s
Foundation / checks (checks) (push) Successful in 31m47s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

ADR-0096. A source region's handoff key signs a 160-byte ticket for one probe
transfer, account and destination; it rides the Hello grant slot and is
verified against neighbour keys bound to their regions. SessionControl
admits a ticket once per region, superseding like a grant, with the session
ending at the client's original grant expiry. RegionSessions makes the
destination's durable step first: PostgresHandoffLedger stages and commits
the transfer and moves the account's control, idempotently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-06 18:32:14 -04:00
co-authored by Claude Opus 5.5
parent 6a645ef7e4
commit 0ce51077b1
18 changed files with 1039 additions and 19 deletions
+41
View File
@@ -4726,3 +4726,44 @@ run's races ended 11 commits, 13 aborts.
Not done:
- tickets (10.8b), region wiring (10.8c) and two-process kills (10.8d);
- deploying v12 (needs a rebuilt migrations image; a maintainer step).
## 2026-10-06 — M10.8b handoff tickets and admission (ADR-0096)
Implemented:
- `HandoffSigningKey`, `HandoffVerifier`, `VerifiedHandoffTicket` and `HandoffLedger`
(`include/evo/network/handoff_ticket.hpp`; schema `network/handoff-ticket-v1`);
- `SessionControl::check_handoff` and `open_handoff`;
- `RegionSessions` ticket admission (marker routing, neighbour keys, durable step first,
shared session-opening tail);
- `PostgresHandoffLedger` (stage, commit, `handoff_account_control`).
Tests:
- `network_control`:
- tickets round-trip; a flipped byte every 7 bytes is refused;
- wrong source key, scope (world and destination), expiry, lifetime over 120 s, a session
already ended, wrong environment, unknown key and invalid claims are all refused;
- grants and tickets never verify as each other;
- control: a ticket supersedes a grant session, replay is refused, the session expiry is
capped, and later grants still open.
- `quic_sessions` (loopback QUIC):
- no keys: refused;
- a handoff ledger without a control ledger: configuration error;
- an admitted ticket: the durable step for the session Welcome names, the ticket's session
expiry, renewal under the handoff's generation;
- replay, another destination, and a refused or undecided durable step: refused
(unauthenticated, wrong_scope, capacity).
- `probe_handoff_store_tests` (PostgreSQL): the ledger admits and moves ownership and
control; a retry converges; another account, an unknown or aborted transfer, and no lease
are refused.
Executed:
- **Linux GCC 14:** `postgres-check.sh` with QUIC: 21 suites (race run: 16 commits, 8
aborts); preset `quic`: 4/4; `evo-network-tests` and `evo-quic-session-tests`.
- **Linux Clang 19:** ASan/UBSan `evo-network-tests`; clang-tidy 19 on the ticket,
session-control, region-sessions, ledger and test sources; clang-format 19.
- **Windows MSVC 19.44:** preset `quic`: 4/4; `client-network`: 14/14 (built before the
formatting pass, which changed whitespace only).
Not done:
- the source side and the client switch (10.8c);
- two-process kill tests (10.8d).