Add M10.5b snapshot wiring: sessions, evo-server, client and probe
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (client) (push) Successful in 12m40s
Foundation / checks (network) (push) Successful in 11m27s
Foundation / checks (tsan) (push) Successful in 8m6s
Foundation / checks (checks) (push) Successful in 31m54s
Foundation / checks (postgres) (push) Successful in 40m43s
Foundation / server-image (push) Successful in 25s
Foundation / postgres-tools (push) Successful in 1m2s
Foundation / image (push) Successful in 2m32s

RegionSessions owns the replication server: interest and acks per session, a
host-set default interest, and per-tick snapshots sized to each connection's
datagram limit. evo-server builds each interest's view from the region's own
habitat sites (default: the first site, radius 7). RegionSessionClient assembles,
acknowledges and presents snapshots and can change its interest; the probe prints
them. Loopback and real-process evidence. ADR-0093.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-06 10:47:47 -04:00
co-authored by Claude Opus 5.5
parent e640b6d3a3
commit 33e91458e7
15 changed files with 428 additions and 23 deletions
+2 -1
View File
@@ -526,7 +526,8 @@ session control done; 10.3b QUIC session login (schemas/network/session-v1.md) d
(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 split (ADR-0093): 10.5a session protocol v2 and the replication core
done; 10.5b wiring and process evidence and 10.5c the GUI client switch follow.
done; 10.5b wiring (sessions, evo-server, client, probe) with process evidence done; 10.5c
the GUI client switch follows.
10.6-10.9 planned.
**Entry:** M9 client/session evidence and M7/M8 dev/stage durability. Read
+4 -2
View File
@@ -45,8 +45,10 @@ route is not yet verified end to end: the edge firewall rule (UDP 7400 from
M10.5a (ADR-0093) adds session protocol v2 (interest, snapshot chunks, snapshot acks; v1 is
refused) and the replication core: server-capped interest with a perception boundary,
entity deltas against the acknowledged baseline, nearest first within 16 KiB per tick with
a slower distant tier, datagram chunks and client assembly. Next: 10.5b wiring, then the
GUI client switch (10.5c).
a slower distant tier, datagram chunks and client assembly. M10.5b wires it end to end:
evo-server replicates the region's environment for each session's interest (default: the
first habitat site), the client assembles and acknowledges snapshots, and the probe prints
them. Next: the GUI client switch (10.5c).
## Previous gate - 2026-10-02
@@ -58,3 +58,26 @@ are ignored; malformed records, a slice mismatch or disagreeing chunk headers ar
are not needed at this size and are left for measurement (10.9).
- Wiring into RegionSessions, evo-server and the clients is 10.5b; until then v2 messages
exist but no server sends snapshots.
## M10.5b wiring (2026-10-06)
- **RegionSessions** owns the `ReplicationServer`: replication opens with Welcome and
closes with the session; `Interest` arrives on the stream, `SnapshotAck` as a datagram.
The host calls `replicate(tick, source)` once per simulated tick; each session's chunks
are sized to its connection's current datagram limit (no snapshot while the datagram
extension is not negotiated). A refused chunk leaves the snapshot unacknowledged.
- **Default interest:** until a client sends its own, a session has the interest the host
set: evo-server uses the region's first habitat site with radius 7, so a new session
sees the region at once. Clients learn the slice and square from the snapshot itself.
- **evo-server source:** for each distinct interest, the habitat sites of the square in
the slice are queried from the region's own stores (`query_environment`, all fields) and
copied through `present_environment`, the same read-only path as the M9 view; organisms
stay empty (no placed individuals). A failed query sends an empty source and logs once.
- **Client:** `RegionSessionClient` assembles and acknowledges snapshots, exposes the view
and validated presentations, sends `Interest`, and closes the session (protocol) on a
malformed or unpresentable snapshot. Chunks arriving before Welcome are dropped (the
channels are not ordered); the next tick resends.
- **Probe:** `--interest X,Y,Z,R` and `--snapshots N`; one `snapshot` line per applied
snapshot (tick, cells, organisms, bounding square, slice) and `snapshot-bytes`.
- Evidence: the test region's default interest holds one habitat site, so the process test
shows a one-cell view refreshed every tick (40 chunks, 8,888 bytes in 40 ticks); the
225-cell and 32-session figures come from synthetic sources.
+26
View File
@@ -4380,3 +4380,29 @@ tests; format check (only unrelated uncommitted files of the maintainer fail it)
MSVC 19.44 preset `quic` build and CTest 4/4 (binaries rebuilt, timestamps checked).
Not done: wiring into RegionSessions, evo-server and the clients (10.5b); the GUI client
(10.5c).
## 2026-10-06 — M10.5b snapshot wiring (ADR-0093)
Implemented replication in `RegionSessions` (open/close with the session, `Interest`,
`SnapshotAck`, default interest, `replicate` with per-connection datagram limits),
snapshot assembly and acknowledgement in `RegionSessionClient`, the evo-server source (the
region's habitat sites in the interest square, `query_environment` and
`present_environment`), and probe options `--interest` and `--snapshots`.
Loopback QUIC (`evo-quic-session-tests`): a 21 x 21 synthetic slice; the default interest
(clamped to radius 7) arriving as 225 cells, none outside the square; a change reaching the
client; acknowledgements keeping deltas (fresh baselines fewer than snapshots); a new
interest replacing the view with the 25-cell square; the session staying open.
Real processes (`tools/ci/postgres-check.sh`, evo-server with QUIC): snapshots of the test
region's default interest (one habitat site), every cell in one slice and one 15 x 15
square, a snapshot every tick (40 chunks, 8,888 bytes in 40 ticks); the probe printing
snapshots and `snapshot-bytes` with three snapshots.
Found and fixed during development: test cells requesting water without moisture (the
client correctly refused the snapshot and closed); a local name hiding the fixture's
`env()`; clang-tidy optional and return-value findings.
Executed: Linux GCC 14 `postgres-check.sh` with EVO_BUILD_QUIC (20 suites); GCC preset
`quic` CTest 4/4; session tests 10/10 repeated; Clang 19 ASan/UBSan session and network
tests; clang-tidy 19 on sessions, client, replication, bridge, probe and tests; Windows MSVC
19.44 preset `quic` build (including the probe) and CTest 4/4 (binaries rebuilt, timestamps
checked). The repository format check fails only on `include/evo/server/session_window.hpp`
(already on main, not part of this change).
Not done: the GUI client (10.5c); deployment of v2 (the dev server still runs v1).