Share replication encoding per interest; fix dev retained builds
Foundation / checks (deploy) (push) Successful in 3m26s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (client) (push) Successful in 12m36s
Foundation / checks (network) (push) Successful in 13m35s
Foundation / checks (tsan) (push) Successful in 7m48s
Foundation / checks (checks) (push) Successful in 32m51s
Foundation / checks (postgres) (push) Successful in 46m20s
Foundation / postgres-tools (push) Successful in 1m35s
Foundation / image (push) Successful in 2m32s
Foundation / server-image (push) Successful in 4m14s

ADR-0097. The second evolution-dev load drill (image 7952185d) held 20
sessions with client budgets met (response p95 111 ms, outcome p95 about
1.2 s, 20 Hz, no starvation) but the server over its own: tick work p99
48-70 ms (25 ms budget), session layer 1.2-2.0 ms per session at p99
(0.5 ms budget), governor refusing and shedding to level 3 to little
effect. ReplicationServer::tick re-encoded every environment cell and
organism for each session. Sessions with the same requested interest
(no perception predicate) now share one encoding per tick; markers stay
per session. Locally 21 sessions: about 970 us -> 360 us per tick.
The drill now waits for two consecutive calm reports before the bots.

The dev overlay's REGION_RETAINED listed the deployed build itself
(61df6a1, f88bee2), which the deploy policy refuses (CI deploy failed on
those commits); it now lists only the other builds, keeping 6c96629e,
the build of the region head. Refreshes the dev session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-08 15:03:45 -04:00
co-authored by Claude Opus 5.5
parent 9409d65947
commit 46b6358606
7 changed files with 187 additions and 41 deletions
@@ -319,3 +319,32 @@ Fixes before the next run:
- waits after restoring for a Ready pod other than the drill pod (the old check could
accept a pod still running during the rollout);
- checks that `REGION_INPUTS` is empty again.
## 10.9d second reference run (2026-10-08, image `7952185d…`)
Same drill (steps 20/24/28/32, 60 s holds), 18:21–18:26 UTC, restored and verified.
- **Client side, 20 sessions:** all established, no drops, no starvation; response p95
111 ms (LAN budget 150); outcome p95 1.18–1.21 s (budget 1.5); snapshots at a median of
19.8–20 Hz. No login beyond 20 succeeded.
- **Server side, 20 sessions:**
| Measure | Value | Budget |
|---|---|---|
| Tick work p95 | 8–16 ms (one report 27 ms) | — |
| Tick work p99 | 48–70 ms | 25 ms |
| Session layer p95 | about the whole tick work | — |
| Session layer p99 | 23–41 ms, 1.2–2.0 ms per session | 0.5 ms per session |
There was no tick debt. The governor refused from 18:22:15 and shed to level 3 from
18:22:42, which barely lowered the cost.
- **The startup trip happened again, briefly.** The first calm report came 4 s after the
restart, and the governor (now over a full window of startup ticks) refused the first
logins until 18:21:36. The drill now waits for two consecutive calm reports.
- **Cause:** `ReplicationServer::tick` encoded every environment cell and organism again
for each session, about 225 records × 20 sessions each tick.
- **Fix:** sessions with the same requested interest and no perception predicate share one
encoding per tick. Markers, and everything when perception filters, stay per session.
Behaviour is unchanged: the existing replication tests pass, and a shared-interest test
checks 20 sessions on one square and one on another. Measured locally, 21 sessions went
from about 970 µs to about 360 µs per tick (2.7×).
- **Next:** a third run with the fix. The remaining per-session cost is the comparison
with each session's acknowledged baseline.