Add M10.4c evo-server QUIC listener and headless session client
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m46s
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 (checks) (push) Canceled after 3m44s
Foundation / checks (client) (push) Canceled after 3m49s
Foundation / checks (network) (push) Canceled after 1m59s

evo-server gains an opt-in M10 listener (--m10-*, QUIC builds only): RegionSessions
with the PostgreSQL control and action ledgers on their own connection under the
host's lease, carried actions submitted to the host and its acknowledgements and
drops turned into outcomes. evo-session-probe is a dev-only headless client. Real
process tests cover intentions, durable action outcomes, SIGKILL before and after
an action's commit, duplicate retries and the probe. The simulated watermark now
reaches every session every tick, so clients always know the server tick.
ADR-0092.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-04 09:20:55 -04:00
co-authored by Claude Opus 5.5
parent 69f3ad7cf8
commit 0bf9901c7f
27 changed files with 1053 additions and 42 deletions
+3 -2
View File
@@ -523,8 +523,9 @@ hardware (10.9). 10.2 split: 10.2a selection, pins and build of msquic/OpenSSL d
session control done; 10.3b QUIC session login (schemas/network/session-v1.md) done;
10.3c durable per-world account control (schema v10) done. 10.4 split (ADR-0092):
10.4a intention/action protocol and admission done; 10.4b durable action records
(schema v11, same transaction as the checkpoint) done; 10.4c evo-server wiring with a
headless client follows. 10.5-10.9 planned.
(schema v11, same transaction as the checkpoint) done; 10.4c evo-server QUIC listener and
headless client with process kill tests done. The engineering GUI client still uses the
M9 dev path. 10.5-10.9 planned.
**Entry:** M9 client/session evidence and M7/M8 dev/stage durability. Read
NETWORK_ARCHITECTURE, PERSISTENCE_ARCHITECTURE and ADR-0017. The M9 transport is
+5 -1
View File
@@ -32,7 +32,11 @@ actions have no biological effect yet. M10.4b makes
action outcomes durable: schema v11 records each batch's actions in the same statement as
its checkpoint, the host attaches actions to the ticks they ride, and outcomes are read
from the durable record after crashes before or after a commit, unknown publications and
cross-region moves. Next: M10.4c evo-server wiring with a headless client.
cross-region moves. M10.4c adds the opt-in
evo-server QUIC listener (session control and action records under the host's lease) and
the headless `evo-session-probe`, with real-process tests including SIGKILL before and after
an action's commit. M10.4 is complete; the GUI client still uses the M9 dev path. Next:
M10.5 bounded snapshots and spatial interest.
## Previous gate - 2026-10-02
@@ -23,8 +23,9 @@ authoritative state yet. Committed batch traces record host inputs only, not req
state claim (position, energy): the message has no such fields and any extra bytes make
it invalid. Answers: an `IntentionReceipt` (admitted = scheduled for its tick, or a
refusal) and a cumulative `SimulatedThrough` watermark (every admitted intention up to a
sequence whose tick has been simulated in the epoch), repeated every 20 ticks so a lost
datagram is covered. Intentions are superseding: there is no per-intention durable record.
sequence whose tick has been simulated in the epoch), sent to every session on every
simulated tick (sequence 0 before its first), so a lost datagram is covered and clients
always know the server tick (until 10.5 snapshots carry it). Intentions are superseding: there is no per-intention durable record.
- *Actions* (stream): a client-chosen action id, unique per account and stable across
retries and reconnects, a kind and a tick. Answers: an `ActionReceipt` (scheduled, or a
refusal) and a final `ActionOutcome`: `committed_no_effect` with its commit sequence once
@@ -89,3 +90,30 @@ Schema v11 (`migrations/0011_region_actions.sql`, [region-actions-v1](../../sche
- Limits: action rows are retained (no pruning policy yet); clones (ADR-0067) do not copy
them; the two-argument publication of a commit that has an action block would still
return its receipt (the adapter never does this).
## M10.4c evo-server listener and headless client (2026-10-04)
- **evo-server** (`--m10-listen ADDRESS:PORT --m10-cert F --m10-key F --m10-issuer F
--m10-environment dev|stage|world0`, builds with EVO_BUILD_QUIC and PostgreSQL only;
opt-in, development and test, nothing deploys it): `RegionSessions` with
`PostgresControlLedger` and `PostgresActionLedger` on their own connection slot (reconnects
after store failures) under the host's current lease (`RegionHost::authority()`). After
each host step the sessions see the host's authority; actions scheduled up to 8 ticks
ahead go to the host (`submit_action`; a refusal is final `not_committed`); the host's
action acknowledgements and drops become outcomes. Draining closes sessions with
`shutdown`. The issuer public key is a 65-byte file (key id 1).
- **evo-session-probe** (dev only): generates a dev issuer key pair, signs a grant for a
given account and serial, logs in, sends intentions and probe actions, queries ids and
prints one machine-readable line per answer.
- **After a restart, `unknown` means "not on record"**: a new process cannot tell an id it
never saw from one admitted by a dead process. Both were never committed (the old epoch
is fenced and its commits are final), so retrying the same id is safe and commits once.
- **Found with real processes: clients need the server tick every tick.** A client that sent
only actions learned the server tick from receipts and from watermarks repeated every 20
ticks, so after waiting about a second for an outcome its next action named a past tick
(`outside_window`). `SimulatedThrough` is now sent to every established session on every
simulated tick (sequence 0 before its first intention): 24 bytes per tick on the datagram
channel, and the client's clock for the server tick until 10.5 snapshots carry it.
- Process evidence: actions survive SIGKILL after their commit (the outcome is answered from
the record by the next process, and a retry is a duplicate with the same outcome); an
action whose tick had not run at SIGKILL has no record, answers `unknown`, and commits
exactly once when retried.
+33
View File
@@ -4276,3 +4276,36 @@ session and network tests; Windows MSVC 19.44 preset `quic` build and CTest 4/4
rebuilt, timestamps checked).
Not done: evo-server wiring, headless client and process kill tests with real sessions
(10.4c); ASan of the PostgreSQL suite; a real two-region move with a pending action.
## 2026-10-04 — M10.4c evo-server QUIC listener and headless client (ADR-0092)
Implemented the opt-in `--m10-*` listener in evo-server (`apps/evo-server/m10_bridge.hpp`:
RegionSessions with PostgreSQL control and action ledgers on their own `PgSlot`, under
`RegionHost::authority()`), `evo-session-probe` (dev issuer keys, signed dev grants, login,
intentions, actions, queries) and `tests/region_m10_session_tests.cpp` (evo-postgres-tests
with EVO_BUILD_QUIC; region 7/151).
Process evidence (real evo-server, synthetic ticks, fast lease, in-process QUIC clients):
intention receipt and watermark; action receipt then a committed outcome matching its
durable record; SIGKILL after the record of a second action exists, restart, a newer grant:
the query answers the record, and a retry of the first action is a duplicate with the same
outcome; SIGKILL while a third action's tick had not run: no record, the next process
answers `unknown`, the retry is admitted and commits once; the probe logs in, gets
admitted intentions and two committed actions and exits 0; SIGTERM drains with exit 0.
Found and fixed with real processes: clients that sent only actions learned the server tick
too rarely (watermarks repeated every 20 ticks and only after intentions), so a later
action named a past tick (`outside_window`); the watermark now goes to every session every
simulated tick. The first intention after Welcome can be refused while the QUIC datagram
extension is not yet negotiated: tests retry (the probe retries each tick) and the client
API documents it. Also a shadowed variable in the probe (MSVC C4456, GCC -Wshadow) and
unchecked optional accesses (tidy).
Executed: Linux GCC 14 `tools/ci/postgres-check.sh` with EVO_BUILD_QUIC (20 integration and
rehearsal suites including the M10 process test, migration and audit probes); clang-tidy 19
on evo-server, the probe, the ledgers, the host and the M10/action/control tests (Clang
build with PostgreSQL, network and QUIC) and on the session sources and tests; format
check; GCC preset `quic` CTest 4/4, session tests 10/10 repeated; Clang 19 ASan/UBSan
session and network tests; Windows MSVC 19.44 preset `quic` build (including the probe) and
CTest 4/4 (binaries rebuilt, timestamps checked).
Not done: the engineering GUI client on M10 sessions; packaging (the server image does not
enable QUIC); a two-process cross-region move; ASan of the PostgreSQL suite.
+7
View File
@@ -251,6 +251,13 @@ final `stats`. Only `ack` and `outcome` lines are durable facts.
`--ready-file` mirrors readiness for probes. SIGTERM drains (commits pending ticks
and releases the lease) within `--drain-ms`.
With EVO_BUILD_QUIC, `--m10-listen ADDRESS:PORT --m10-cert F --m10-key F --m10-issuer F
--m10-environment dev|stage|world0` opens the M10 session listener (ADR-0091/0092;
development and test only, port 0 picks an ephemeral port printed as `m10 listening`).
Session control and action records use a separate runtime connection under the host's
lease. Events: `m10 opened|closed|refused`, `m10 committed`, `m10 dropped`.
`evo-session-probe` is the matching headless client (dev issuer keys and grants only).
Exit codes:
- 0: drained;
- 3: the drain deadline passed, and the next owner reconciles;