Add M10.6a probe-motion experiment core and session protocol v3
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m1s
Foundation / checks (network) (push) Successful in 12m13s
Foundation / checks (client) (push) Successful in 14m28s
Foundation / checks (tsan) (push) Successful in 7m56s
Foundation / checks (checks) (push) Successful in 32m49s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 40m58s

EXPERIMENT (ADR-0094), not an organism movement rule: one non-biological
marker per session, moved by admitted intentions with a shared integer rule
(probe-motion-v1, 100 mm per tick, clamped to the area), held in region
memory only.

- ProbeMarkers: spawn, area, bounded per-marker schedule, catch-up bound
- session protocol v3: marker records in snapshot chunks; the own marker is
  always sent with its applied sequence and area; v1 and v2 are refused
- MotionPredictor (bounded replay from the authoritative marker, corrections,
  error samples), CorrectionSmoother and InputLead
- tests: exact prediction with enough lead, refusal and lead adaptation,
  lost inputs, bounds, marker records through the codec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-06 15:12:13 -04:00
co-authored by Claude Opus 5.5
parent d781492957
commit ab7e26c02e
20 changed files with 1135 additions and 18 deletions
+3
View File
@@ -528,6 +528,9 @@ headless client with process kill tests done. 10.5 split (ADR-0093): 10.5a sessi
protocol v2 and the replication core done; 10.5b wiring (sessions, evo-server, client,
probe) with process evidence done; 10.5c engineering client switched to M10 sessions
(snapshot views, camera interest, grant bundles, msquic.dll in the Windows package) done.
10.6 split (ADR-0094, EXPERIMENT probe marker, not an organism movement rule): 10.6a shared
probe-motion-v1 rule, server markers, session protocol v3 marker records and the client
predictor done; 10.6b wiring and 10.6c impaired traces follow.
10.6-10.9 planned.
**Entry:** M9 client/session evidence and M7/M8 dev/stage durability. Read
+5 -1
View File
@@ -51,7 +51,11 @@ them. M10.5c switches the engineering client to M10 sessions: snapshot-fed views
driving the interest after the user moves it, grant bundles (`evo-session-probe grants`,
evo-server `--m10-max-grant-lifetime` for dev), and `msquic.dll` in the Windows package.
M10.5 is complete. Deploying the v2 server to evolution-dev (the dev server still runs v1)
is a maintainer step. Next: M10.6 movement prediction and reconciliation.
is a maintainer step. M10.6a (ADR-0094) adds the probe-motion experiment: one
non-biological marker per session moved by intentions with a shared integer rule, session
protocol v3 marker records (v2, deployed, is frozen and refused), and the client predictor
(bounded replay from the authoritative marker, corrections, smoothing, adaptive input lead).
Next: 10.6b wiring into sessions, evo-server, the probe and the GUI.
## Previous gate - 2026-10-02
@@ -0,0 +1,68 @@
# ADR-0094: M10 probe-motion experiment, prediction and reconciliation
## Status
Accepted for M10.6 (2026-10-06). Decisions confirmed with the maintainer on 2026-10-06:
intentions move a per-session probe marker (not an organism); markers are ephemeral (region
memory only); the shared rule is a fixed-speed integer kinematic; evidence is loopback
traces through the owned impairment relay plus real-process and GUI checks. Delivery:
10.6a rule, markers, protocol v3 records and the client predictor (this text); 10.6b
session, evo-server, probe and GUI wiring; 10.6c impaired traces and the report. Each
segment amends this ADR.
**EXPERIMENT.** Nothing here is a game movement rule. M11.1 decides organism movement
(rates per unit time, ADR-0089 amendment), and the marker is retired when controllable
organisms exist.
## Context
The roadmap's 10.6 needs local motion that the client can predict with shared versioned
rules and reconcile with the authority (NETWORK_ARCHITECTURE "Prediction and interest
boundaries"). No controllable organism or movement rule exists (ADR-0092: intentions change
nothing), and the project vision forbids engineering fixtures from silently becoming game
rules. Session protocol v2 was deployed to evolution-dev on 2026-10-06 and is frozen.
## Decision (10.6a)
- **Probe marker.** One per session, opened with the session, at the area's spawn, closed
with it. It has a position and a held movement vector only: no energy, contact,
perception, biology, persistence or effect on any store. A restart, epoch change or
reconnect starts a fresh marker at the spawn. The host sets the area (an inclusive
micrometre rectangle in one cell slice) and the spawn.
- **probe-motion-v1** (`include/evo/network/probe_motion.hpp`, shared by server and
client): each tick, position += vector x 100,000 / 1,000 um per axis (integer, truncating
toward zero; 100 mm per tick, 2 m/s at 50 ms), clamped to the area. An admitted intention
for tick T sets the held vector from T's step onward; per tick the newest sequence wins.
The server applies at most 16 scheduled intentions per marker and steps at most 64 ticks
per advance (a longer gap applies the held vectors without the motion it can no longer
attribute).
- **Session protocol v3** (schemas/network/session-v3.md): v2 plus marker records in
snapshot chunks. A session's own marker is always sent, first (distance 0) and every tick
it changed, with its newest applied intention sequence and its area; other markers pass
the spatial filter and carry neither. v1 and v2 are refused.
- **Client prediction** (`include/evo/client/motion_prediction.hpp`): at most 32 sent,
unacknowledged inputs (a full list stops sending); on each authoritative marker state
(after tick T) restore it, drop inputs applied (sequence <= applied) or past (tick <= T),
replay the rest with the shared rule up to the presented tick (at most 32 ticks ahead). A
refused intention is removed; reset on a new session or epoch. The jump a rebase makes to
the presented position is a correction; the error per authoritative state (predicted
versus authoritative position for that tick) is measured. Presentation smoothing is
separate: a visual offset halves every 60 ms and snaps beyond 2 m. The input lead (ticks
ahead of the newest known server tick) starts at 2, grows on each `outside_window`
refusal and shrinks after 20 admitted inputs with more than two ticks to spare, within
2..7 (below the 8-tick admission window).
- Prediction covers only the own marker's motion. Nothing biological is predicted, and
other markers are shown as replicated (interpolation is 10.7).
## Alternatives considered
- A placed test organism: biology (locomotion, maintenance) before M11.1 ratifies it.
- Checkpointed markers: a simulation-version and format change for a throwaway entity.
- Collision with habitat cells, inertia: more shared state and more of a design decision;
the fixed-speed rule exercises replay and reconciliation fully.
- Extending v2 in place: v2 is deployed; an unknown record kind would close deployed v2
clients mid-session instead of refusing them at login.
## Consequences
- Deployed v2 servers refuse v3 clients (`unsupported_version`) until redeployed.
- Exact prediction needs the inputs to arrive in time: a too-small lead shows as refusals
and corrections until the lead adapts; a lost input datagram shows as a correction (the
client resends after 10.6b's rules).
- Markers add at most 32 x 78 bytes per snapshot; their state is not durable and not part of
any checkpoint or simulation version.
+47
View File
@@ -4479,3 +4479,50 @@ Not done:
not in the dev manifest);
- ASan of the client remote test (msquic under sanitizers is still open);
- a clean-VM package run.
## 2026-10-06 — M10.6a probe-motion experiment core (ADR-0094)
Implemented (EXPERIMENT, not a game rule):
- probe-motion-v1, shared and integer-exact (`include/evo/network/probe_motion.hpp`);
- the server's `ProbeMarkers` (spawn, area, bounded schedule, catch-up bound);
- session protocol v3 marker records, kinds 5 and 6:
- the own marker is always sent, with its applied sequence and area;
- other markers pass the spatial filter;
- v1 and v2 are refused;
- the client `MotionPredictor` (bounded inputs, rebase and replay, corrections, error
samples), `CorrectionSmoother` and `InputLead` (`include/evo/client/motion_prediction.hpp`).
Tests (`tests/network_motion.cpp`):
- the rule's arithmetic and clamping;
- the marker rules;
- client/server loops with whole-tick delays:
- with enough lead, every prediction is exact (zero corrections);
- with too little lead, refusals until the lead adapts, then exact;
- lost inputs give corrections;
- predictor bounds, refusal, drop and reset;
- smoothing and snap, and lead adaptation;
- marker records through the real codec: own versus other, the own marker outside the
interest, unchanged markers not resent, removal, and four malformed records.
The tests that used "3" as a future protocol version now use 4.
Executed:
- **Linux GCC 14**
- `evo-network-tests` and `evo-quic-session-tests`;
- preset `quic`: CTest 4/4;
- `client-network`: 14/14;
- `postgres-check.sh` with QUIC: 20 suites, including region m10 session.
- **Linux Clang 19:** build, ASan/UBSan `evo-network-tests`, clang-tidy 19 on the new and
changed sources and tests.
- **Windows MSVC 19.44** (fresh binaries):
- preset `quic`: 4/4;
- preset `client-network`: 12/12.
The repository format check fails only on `include/evo/server/session_window.hpp`, as
before.
Not done:
- wiring into sessions, evo-server, the probe and the GUI (10.6b);
- impaired traces (10.6c).
Deployed v2 servers refuse v3 clients until redeployed.