Wire M10.7b interpolation and the stale loss view into the client
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (client) (push) Successful in 12m27s
Foundation / checks (network) (push) Successful in 12m46s
Foundation / checks (tsan) (push) Successful in 7m59s
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 25m13s
Foundation / checks (postgres) (push) Canceled after 12m48s

ADR-0095. The engineering client times presentation with the tick clock:
its own marker between ticks, other markers interpolated a few ticks behind
(grey when stale). Silence beyond 3 ticks and long-gap holds are stale. A lost
session leaves its last view frozen and labelled stale until the reconnect's
fresh baseline; nothing is predicted or sent meanwhile.

evo-motion-trace --remote measures remote-marker error between two clients
through the relay, with a 1.5 s outage (motion-trace-remote-smoke CTest).
Prediction errors are recorded only for ticks inputs are scheduled for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-06 17:50:41 -04:00
co-authored by Claude Opus 5.5
parent 90cdb61e30
commit 5728e7682e
17 changed files with 651 additions and 210 deletions
+2 -2
View File
@@ -532,8 +532,8 @@ probe) with process evidence done; 10.5c engineering client switched to M10 sess
probe-motion-v1 rule, server markers, session protocol v3 marker records and the client
predictor done; 10.6b wiring (sessions, evo-server, probe, GUI marker) done; 10.6c impaired
traces done (networking/M10_PREDICTION_TRACES.md). 10.7 split (ADR-0095): 10.7a tick clock,
remote-marker interpolation and fractional prediction done; 10.7b client wiring, loss view
and two-client trace follow. 10.8-10.9 planned.
remote-marker interpolation and fractional prediction done; 10.7b client wiring, stale loss
view and two-client interpolation traces done. 10.8-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 -2
View File
@@ -61,8 +61,11 @@ camera and interest. M10.6c traces it through the impairment relay: exact withou
94-99 % exact at 60-200 ms RTT with 2-5 % loss, convergence after stopping and a restart
resync of about 2-3 s (networking/M10_PREDICTION_TRACES.md). M10.6 is complete. M10.7a (ADR-0095) adds a drift-corrected tick clock, adaptive
interpolation of remote markers (2-6 ticks behind, at most 2 ticks extrapolated, then
stale; organisms never) and sub-tick own-marker presentation. Next: 10.7b client wiring,
the stale loss view and a two-client trace.
stale; organisms never) and sub-tick own-marker presentation. M10.7b wires it into the
engineering client. A lost session's view stays frozen and labelled stale until the
reconnect's fresh baseline. In two-client traces, remote markers shown as current stay
within about 0.1 m of the true path, and outages show stale. M10.7 is complete. Next:
M10.8 authority transfer between two regions (needs a ratified handoff ADR).
## Previous gate - 2026-10-02
@@ -55,3 +55,34 @@ when a snapshot is lost. No controllable organism moves yet.
- Remote markers are shown 100-300 ms in the past, the own marker in the predicted
present. That is the usual split; interactions that need both are later work.
- Extrapolated or stale markers are flagged so the client can draw them differently.
## M10.7b client wiring, loss view and traces (2026-10-06)
- **Engineering client** (`apps/evo-client/remote_session.hpp`):
- every newly observed server tick (watermark or snapshot) feeds the clock;
- each snapshot's other markers go to the interpolator;
- the own marker is presented at clock + lead, between whole ticks;
- other markers are presented at clock - delay;
- the Session panel shows the delay and the stale count;
- stale markers are drawn grey.
- **Silence is stale.** The clock freezes one tick past the last observation, so on a
silent link the render tick never passes the newest snapshot. Markers are therefore also
stale once 3 ticks (150 ms) pass without any observation. A marker held across a gap of
more than 8 ticks is stale too.
- **Session loss.** The last view stays frozen: the own marker at its last authoritative
position, all markers stale. The banner reads "STALE (last view, frozen)" and the
environment is already stale-encoded. Nothing is predicted or sent. Welcome resets the
clock, interpolator and markers (fresh baseline). The server already stops admission and
removes the marker when a session closes: no offline progression.
- **Error measurement** records a prediction only for ticks at or before the newest server
tick plus the lead. The clock may run one tick past the newest observation, and inputs
for such a tick may still come. Recording it gave false errors, seen as a Windows-only
test failure.
- **Evidence:**
- `client-remote-session`: the frozen stale view and its reset on reconnect; two
sessions each seeing the other's marker behind its own predicted view; removal when
one leaves.
- `evo-motion-trace --remote`, with the CTest `motion-trace-remote-smoke`: current
markers' 95th percentile within 1 m, the outage mostly shown stale, recovery after it.
- Figures in [M10_PREDICTION_TRACES](../networking/M10_PREDICTION_TRACES.md).
- Not covered: interpolating organisms (none move; they are shown as replicated and never
extrapolated). M10.7 is complete.
+44
View File
@@ -4635,3 +4635,47 @@ Executed:
- `client-network`: 13/13.
Not done: client wiring, the loss view and the two-client trace (10.7b).
## 2026-10-06 — M10.7b client interpolation, loss view and traces (ADR-0095)
Implemented:
- the engineering client's tick clock, interpolated remote markers (grey when stale), the
own marker between ticks, and the frozen stale view on loss (banner, all markers stale,
own marker at its last authoritative position), reset on Welcome;
- `TickClock::silence` and silence-based staleness; long-gap holds marked stale;
- error recording limited to scheduled ticks (`predict_between(..., record)`);
- `evo-motion-trace --remote` and the CTest `motion-trace-remote-smoke`;
- a shared region bench in the trace tool.
Found and fixed during development:
- an outage never showed stale (the frozen clock kept the render tick inside the buffer);
- post-outage holds were shown as current;
- false prediction errors from presenting one tick past the scheduled ticks (a Windows-only
`client-remote-session` failure);
- MSVC rejecting `std::erase_if` with a member-pointer predicate;
- two clang-tidy optional-access findings.
Figures are in docs/networking/M10_PREDICTION_TRACES.md:
- remote markers shown as current: p99 at most 60.7 mm, max 100 mm;
- outages: 84-90 % of samples shown stale, recovery 150-950 ms;
- smoke variance: one of three runs had 32 % extrapolated and 36 % stale samples, with
current errors still 0.
Executed:
- **Linux GCC 14:**
- preset `client-network`: CTest 16/16 (including both trace smokes and
client-remote-session);
- preset `quic`: 4/4;
- full remote and prediction trace runs.
- **Linux Clang 19:** ASan/UBSan `evo-network-tests`, and clang-tidy 19 on the trace tool,
client app, panels, remote test, interpolation sources and tests.
- **Windows MSVC 19.44** (fresh binaries):
- preset `client-network`: 14/14;
- `client-remote-session` passed 5 times in a row after the fix;
- preset `quic`: 4/4.
The Postgres suite was not rerun: no server code changed in M10.7.
Not done:
- interpolating organisms (none move);
- a GUI run against evolution-dev (needs a v3 server).
+4 -1
View File
@@ -35,7 +35,10 @@ evo-client --connect void.aeternalisgames.com:7400 --server-name NAME --ca dev-c
are blue), an engineering experiment, not an organism (ADR-0094). It is predicted
locally and corrected by the server; the camera follows it until you pan or zoom.
The Session panel lists each intention as sent, admitted, rejected, simulated (final;
intentions are never durable) or unknown, plus the prediction figures.
intentions are never durable) or unknown, plus the prediction figures. Other players'
markers are shown a few ticks in the past, interpolated (ADR-0095); grey means stale.
- If the connection is lost, the last view stays on screen, frozen and labelled STALE,
until the reconnect brings a fresh view. Nothing you press is sent meanwhile.
- Each reconnect uses the next grant. A second client with a bundle for the same account
takes the session over; the first stops (do not share bundles).
- A server on an older session protocol (v1, v2) refuses the client
+42
View File
@@ -62,3 +62,45 @@ row: 95.9-98.3 % exact, resync 2,241-2,248 ms.
- Many clients at once (10.8).
- Real links (dev route); deferred until a v3 server is deployed.
- Sub-tick presentation: the marker steps at 20 Hz.
## M10.7b remote interpolation (2026-10-06, ADR-0095)
`evo-motion-trace --remote`. Two clients, each behind its own relay with the profile's
impairment. A moves with the script; B shows A's marker interpolated. Every 10 ms B's
presented position is compared with A's authoritative path, interpolated linearly at B's
render tick (clock minus delay). Midway through the 20 s, B's link is cut for 1.5 s
(outage). "Current" excludes markers shown as stale.
| Profile | Samples | p99 mm (all) | max mm (all) | Current p99 mm | Current max mm | Extrapolated | Stale | Mean delay (ticks) | Outage shown stale | Recovered ms |
|---|---|---|---|---|---|---|---|---|---|---|
| clean | 1705 | 0 | 2,514.0 | 0 | 0 | 0 % | 0.8 % | 2.00 | 89.9 % | 156 |
| lan | 1706 | 0 | 2,518.7 | 0 | 0 | 0 % | 0.8 % | 2.00 | 89.3 % | 160 |
| rtt60-loss2 | 1704 | 0 | 2,598.8 | 0 | 0 | 0 % | 0.8 % | 2.00 | 89.9 % | 154 |
| rtt120-loss2 | 1700 | 87.6 | 2,977.8 | 60.7 | 100.0 | 0 % | 2.8 % | 2.98 | 86.3 % | 510 |
| rtt200-loss5 | 1696 | 2,811.5 | 2,862.4 | 22.0 | 83.0 | 2.5 % | 5.3 % | 2.11 | 84.2 % | 950 |
- Markers shown as current are within about 0.1 m of the true path at their render tick.
Linear motion between snapshots is exact; errors come from direction changes within a
gap.
- The large all-sample maxima come from the long-gap rule after the outage: the
pre-outage position is held until the first post-outage snapshot's tick. Those frames
are flagged stale and drawn grey, never presented as current.
- During the outage the marker is shown stale after the 150 ms grace (the clock freezes
one tick past the last observation; silence beyond 3 ticks is stale). The ~10 % of
outage samples that are not yet stale are that grace.
- Recovery (the first non-stale frame after the link returns) takes 150-950 ms. It grows
with RTT and loss: the next snapshot must arrive, and the delay must cover it.
- Variance: in one of three smoke runs (rtt60-loss2, 8 s), 32 % of samples were
extrapolated and 36 % stale, while current errors stayed at 0 mm. That is consistent
with snapshot datagrams being dropped under congestion while watermarks still arrived;
the adaptive delay rose only to 2.23 ticks on average. The other two runs matched the
table.
Prediction rerun after the M10.7 changes (own marker presented between ticks; errors
recorded only for ticks inputs are scheduled for):
- clean: 100 % exact.
- lan: 99.8 %.
- rtt60-loss2: 99.5 %.
- rtt120-loss2: 97.1 %; resync 2,500 ms.
- rtt200-loss5: 94.2 %; max 1,293.3 mm.
All profiles converged.