Ratify M10.1 timing and workload budgets with session traces
Foundation / checks (deploy) (push) Successful in 1m0s
Foundation / checks (ecs) (push) Successful in 3m34s
Foundation / checks (network) (push) Successful in 8m8s
Foundation / checks (client) (push) Successful in 14m49s
Foundation / checks (tsan) (push) Successful in 7m35s
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 16m18s
Foundation / checks (checks) (push) Canceled after 29m27s
Foundation / checks (deploy) (push) Successful in 1m0s
Foundation / checks (ecs) (push) Successful in 3m34s
Foundation / checks (network) (push) Successful in 8m8s
Foundation / checks (client) (push) Successful in 14m49s
Foundation / checks (tsan) (push) Successful in 7m35s
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 16m18s
Foundation / checks (checks) (push) Canceled after 29m27s
ADR-0089 records the maintainer-ratified 50 ms tick, 1 s flush with final outcomes p95 <= 1.5 s, responsiveness targets and reference hardware, plus derived scheduling, sequence, identity, baseline, queue/byte/work budgets and the exact/tolerant determinism contract (schemas/network/m10-budgets-v1.md). Adds SessionClient traffic counters, `evo-dev-session trace` and a reproducible trace script; development-reference results are in M10_TIMING_TRACES. Records that genome v1 and metabolism rates are per tick, so the quantum fixes biology rates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -514,6 +514,10 @@ not a commitment to every body plan, planetary solver or locomotion mode.
|
||||
**Goal:** responsive, authenticated, server-authoritative cellular sessions with
|
||||
bounded replication and recovery under loss, overload and region transfer.
|
||||
|
||||
**Status (2026-10-03):** 10.1 ratified (ADR-0089, schemas/network/m10-budgets-v1.md,
|
||||
networking/M10_TIMING_TRACES.md); targets are not yet qualified on the reference
|
||||
hardware (10.9). 10.2-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
|
||||
not automatically the production selection; proof tick and region sizes remain
|
||||
|
||||
+12
-1
@@ -1,6 +1,17 @@
|
||||
# Project status and next steps
|
||||
|
||||
## Current gate - 2026-10-02
|
||||
## Current gate - 2026-10-03
|
||||
|
||||
M10.1 ratifies M10 timing and workload budgets (ADR-0089,
|
||||
schemas/network/m10-budgets-v1.md): 50 ms tick, 1 s commit flush with final outcomes
|
||||
p95 <= 1.5 s, responsiveness LAN p95 <= 150 ms and 100 ms RTT p95 <= 250 ms, server
|
||||
budgets on one RKE2 worker and client budgets on the low-spec VM. Development-reference
|
||||
traces (`evo-dev-session trace`, networking/M10_TIMING_TRACES.md) measured admission
|
||||
p99 <= 5.2 ms, durable p95 about 1.4 s and 50 ms view cadence. Finding: genome v1 and
|
||||
metabolism use per-tick rates, so the quantum fixes biological rates until M11.1
|
||||
converts or ratifies them. Next: M10.2 transport selection against these budgets.
|
||||
|
||||
## Previous gate - 2026-10-02
|
||||
|
||||
M9.8a: Dear ImGui 1.92.9b is pinned and qualified in an isolated Windows/Linux
|
||||
SDL3 probe (ADR-0084). M9.8b adds bounded notification/dialog state, protected
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# ADR-0089: M10 protocol timing and workload budgets
|
||||
|
||||
## Status
|
||||
Accepted for M10 (2026-10-03). Ratified by the maintainer: tick quantum, durable-outcome
|
||||
target, responsiveness target and reference hardware. The remaining values are
|
||||
engineering budgets derived from those and from the M10.1 traces; later M10 segments
|
||||
may change them only with measurements and an amendment here. None of these values is
|
||||
a game rule (see "Not game rules").
|
||||
|
||||
## Context
|
||||
Open question #1 kept the 50 ms tick as a proof value "before M7/M10". M9 delivered a
|
||||
TLS 1.3 dev session (ADR-0082/0083) whose constants (8-tick intent window, one intention
|
||||
per tick, 1 s heartbeat, 256 KiB frames) were chosen for one engineering client. M10
|
||||
needs explicit, measured budgets before transport selection (10.2), admission (10.4),
|
||||
replication (10.5) and prediction (10.6) build on them. Traces:
|
||||
[M10_TIMING_TRACES](../networking/M10_TIMING_TRACES.md); normative table:
|
||||
[m10-budgets-v1](../../schemas/network/m10-budgets-v1.md).
|
||||
|
||||
## Decision — ratified (maintainer, 2026-10-03)
|
||||
- **Authoritative tick: 50 ms (20 Hz)** for M10 work. Measured: tick debt 0, view
|
||||
interval p50 50.1 ms, p99 <= 60 ms, server about 1 % CPU for one region and client.
|
||||
- **Final outcomes** (death, reproduction, durable acknowledgements): commit flush stays
|
||||
**1 s**; delivery p95 <= **1.5 s** after admission in dev/stage under nominal network.
|
||||
Measured p95 1.37-1.41 s. Realtime feel comes from snapshots and prediction, never from
|
||||
durable acknowledgements.
|
||||
- **Responsiveness:** input to the first authoritative snapshot that reflects it, before
|
||||
client smoothing: **LAN p95 <= 150 ms; emulated 100 ms RTT p95 <= 250 ms**.
|
||||
- **Reference hardware:** server budgets per region host on one RKE2 worker (8 vCPU,
|
||||
31.3 GiB; INVENTORY.md); client budgets on the low-spec VM once specified (M9.8g). The
|
||||
AMD Ryzen 7 9800X3D / 61.6 GB Windows 11 workstation (WSL2 server) is the development
|
||||
reference only; its traces do not qualify the targets.
|
||||
|
||||
## Decision — engineering budgets (derived; amend with evidence)
|
||||
- **Input scheduling window:** an intention names its tick `t` with
|
||||
`server_tick + 1 <= t <= server_tick + 8` (<= 400 ms ahead). Late inputs are rejected,
|
||||
never rewound. The client lead adapts: `ceil((rtt/2 + jitter) / 50 ms) + 1`, clamped to
|
||||
2..8 ticks. (The M9 client's fixed lead of 4 and the synthetic carrier's ~9-tick delay
|
||||
are M9 artefacts; they cannot meet the LAN target and are not the M10 path.)
|
||||
- **Snapshots:** every tick for entities in interest; fresh baseline on join, epoch change
|
||||
and loss; lower-rate tiers for distant interest are defined in 10.5.
|
||||
- **Sequences and identity:** intention sequence u64 per session, strictly increasing from
|
||||
1, never wraps (exhaustion closes the session). Ticks and baseline ids u64, never wrap.
|
||||
Realtime packet sequences (10.2) use serial-number arithmetic (RFC 1982) of at least
|
||||
16 bits with an acceptance window below half the space. Session ids u64, server
|
||||
assigned, bound to the authenticated connection; every message carries the region
|
||||
ownership epoch; a stale epoch closes the session; reconnect is a new grant, a new
|
||||
session and a fresh baseline; sessions never survive an epoch change.
|
||||
- **Baselines:** the server keeps at most 4 per session, each at most 2 s (40 ticks) old;
|
||||
a delta against an unknown or expired baseline is replaced by a fresh baseline. The
|
||||
client keeps at most 2.
|
||||
- **Per-session limits:** at most one intention per tick (8 per 8-tick window, every
|
||||
attempt counted); at most 256 unresolved intentions; realtime datagram payload at most
|
||||
1200 bytes (10.2); reliable frames at most 64 KiB in M10 (the M9 stream allows 256 KiB);
|
||||
outbound replication at most 16 KiB per tick per session (about 2.6 Mbit/s), beyond
|
||||
which interest degrades rather than queueing; client event queue 1024. Heartbeat 1 s,
|
||||
liveness 5 s, hello/handshake deadline 5 s.
|
||||
- **Per-region work:** at least 20 sessions (M10 exit), 32 by default; per-tick work
|
||||
including session handling at most 25 ms p99 (half the quantum) on the reference worker;
|
||||
session handling at most 0.5 ms per session per tick; queued host inputs at most 64 and
|
||||
64 KiB (unchanged). Overload sheds interest and refuses new sessions before tick debt.
|
||||
|
||||
## Determinism contract
|
||||
- **Exact:** authoritative state is a pure function of the checkpoint and the committed
|
||||
per-tick inputs in commit order: byte-identical across runs and supported platforms
|
||||
(existing goldens, recovery and replay use committed inputs only). Admission decisions
|
||||
need not be reproducible; their admitted results are durable.
|
||||
- **Tolerant:** wall-clock pacing and jitter, delivery timing, client prediction,
|
||||
interpolation, smoothing and presentation floats. Their tolerances are presentation
|
||||
error budgets defined in 10.6/10.7. Nothing network- or clock-derived enters
|
||||
authoritative state except through committed inputs.
|
||||
|
||||
## Not game rules — and an existing coupling
|
||||
Network limits bound work and fairness; they never encode movement speed, perception
|
||||
range, feeding or any biological outcome.
|
||||
|
||||
The tick quantum, however, is **already coupled to biology**: genome v1 capabilities use
|
||||
`micrometres_per_tick` and `femtograms_per_tick`, metabolism and development express
|
||||
maintenance and movement cost in picojoules per tick, and decomposition has a per-tick
|
||||
limit. Checkpoints record `tick_microseconds` (50,000), but the biological values are
|
||||
per tick, so the 50 ms value currently fixes real-time biological rates. Consequently:
|
||||
- M10 must not change the quantum. Any change is a versioned rules/genome migration
|
||||
(convert per-tick to per-time units or rescale), with new goldens and a decision record.
|
||||
- Ratifying 50 ms here ratifies an engineering budget, not those biological rates. The
|
||||
per-tick units remain M3/M11 biology decisions (OPEN_QUESTIONS #1, M11.1 rules review),
|
||||
which should either move to time-based units or explicitly ratify them at 50 ms.
|
||||
|
||||
## Alternatives considered
|
||||
- 30 or 40 Hz ticks: smoother but 1.5-2x tick work and bandwidth, re-validation of tick
|
||||
proofs; deferred until 10.6 prediction measurements show a need.
|
||||
- 500 ms or 250 ms flush: faster final outcomes at 2-4x commit volume; deferred to 10.9
|
||||
commit-cost measurements.
|
||||
- Rewinding late inputs: complicates authority and replay; rejected for M10.
|
||||
|
||||
## Consequences
|
||||
10.2 must meet the MTU, sequence and timeout budgets; 10.4 implements the scheduling
|
||||
window and adaptive lead; 10.5 the baseline and per-tick byte limits; 10.9 measures the
|
||||
targets on the reference hardware with 20+ clients and emulated RTT/loss. Measured
|
||||
values in this ADR come from one dev region and one client; they do not qualify the
|
||||
targets on the reference hardware.
|
||||
@@ -97,6 +97,7 @@ design. No unadopted candidate is a link dependency of the proof.
|
||||
- [ADR-0083: Dev region sessions](0083-dev-region-sessions.md) - session server in evo-server, durable no-effect intentions on synthetic carriers, empty organism presentation, reconnect with fresh baselines, loopback-only drill-time dev deployment.
|
||||
|
||||
- [ADR-0084: Engineering UI toolkit](0084-engineering-ui-toolkit.md) - Dear ImGui 1.92.9b pinned (M9.8a) and integrated as the engineering client overlay with toolkit-first input routing (M9.8c).
|
||||
- [ADR-0089: M10 timing and budgets](0089-m10-timing-and-budgets.md) - ratified 50 ms tick, 1 s flush with final outcomes p95 <= 1.5 s, responsiveness LAN p95 <= 150 ms / 100 ms RTT <= 250 ms, reference hardware; derived scheduling, sequence, baseline, queue/byte/work budgets and the exact/tolerant determinism contract; records the per-tick biology coupling.
|
||||
- [ADR-0088: Rendered deployment policy](0088-rendered-deployment-policy.md) - the deploy policy check renders every overlay with pinned kustomize v5.8.1 (checksum-verified, explicit preparation) and validates effective objects; unsupported kustomize features refused.
|
||||
- [ADR-0087: Dev session route](0087-dev-session-route.md) - evolution-dev only: void.aeternalisgames.com:7400 via a dedicated internal MetalLB VIP to the region pod, TLS end to end, CIDR-limited, operator-opened windows enforced by evo-server; committed disabled with fail-closed policy tests.
|
||||
- [ADR-0086: Windows client package](0086-windows-client-package.md) - static-runtime Windows x64 ZIP with explicit allowlist, licence texts, build identity, SHA256 manifest, credential guards and deterministic layout; local packaging until a Windows runner exists.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Authoritative network architecture
|
||||
|
||||
Status: locked server authority and untrusted clients; transport/reliability are
|
||||
proposals for M10. The scoped M9 dev session (TLS 1.3, protocol v1, dev-only grants)
|
||||
proposals for M10. M10 timing and workload budgets: ADR-0089 and
|
||||
[m10-budgets-v1](../../schemas/network/m10-budgets-v1.md). The scoped M9 dev session (TLS 1.3, protocol v1, dev-only grants)
|
||||
is specified in [DEV_SESSION_PROTOCOL](../networking/DEV_SESSION_PROTOCOL.md) and
|
||||
ADR-0082. M0 has no networking. Steam distribution follows later through
|
||||
an identity-provider adapter; core account IDs are independent of Steam IDs.
|
||||
|
||||
@@ -6,7 +6,7 @@ person. ADR indexes distinguish scoped proof choices from production proposals.
|
||||
|
||||
| # | Open question | Current position / experiment | Owner; gate |
|
||||
|---|---|---|---|
|
||||
| 1 | Tick frequency | 20Hz proof only; measure latency, CPU, stiff biology | Simulation/network; before M7/M10 |
|
||||
| 1 | Tick frequency | 50 ms (20 Hz) ratified as the M10 engineering budget (ADR-0089, traces in M10_TIMING_TRACES). Genome v1/metabolism rates are per tick, so the quantum fixes biological rates: convert to time units or ratify at 50 ms in M11.1 | Biology/design; M11.1 (network budget closed in M10.1) |
|
||||
| 2 | Fixed/variable boundaries | Fixed authoritative ticks, host wall-clock pacing; ecology integer multiples | Simulation; M1 |
|
||||
| 3 | ECS | Row/EnTT4 experiment in ADR-0021; retain bounded rows for proof, production choice awaits richer workloads (Flecs remains an alternative) | Engine; M1 and biological component gate |
|
||||
| 4 | Dependency manager | Evaluate vcpkg manifest vs Conan; no runtime dependency for proof | Build; first dependency |
|
||||
|
||||
@@ -3982,3 +3982,32 @@ selector, a port-less entry, and rendered route patches of the selector, VIP and
|
||||
range; the reviewer's m98f-8a1e5ef-repro.py now exits 1 with default-deny and
|
||||
session-port failures in platform/dev and platform/cluster. No cluster action. M9.8f
|
||||
remains open.
|
||||
|
||||
|
||||
## 2026-10-03 — M10.1 protocol timing and workload budgets (ADR-0089)
|
||||
|
||||
Maintainer ratified: 50 ms tick, 1 s flush with final outcomes p95 <= 1.5 s,
|
||||
responsiveness LAN p95 <= 150 ms / 100 ms RTT p95 <= 250 ms, server budgets on one RKE2
|
||||
worker and client budgets on the low-spec VM. Derived budgets and the exact/tolerant
|
||||
determinism contract are in ADR-0089 and schemas/network/m10-budgets-v1.md.
|
||||
|
||||
Implemented: `SessionClient::traffic()` received-frame counters (additive API, checked
|
||||
in network_session); `evo-dev-session trace` (continuous polling, nearest-rank
|
||||
percentiles, CSV); `tools/network/session-trace.sh` (throwaway PostgreSQL, development-v1
|
||||
region, evo-server with sessions and ops metrics, three loopback runs, cross-host pause).
|
||||
|
||||
Traces (development reference: Ryzen 7 9800X3D, 61.6 GB, Windows 11; WSL2 server):
|
||||
committed-script run with Linux loopback at 250/100/1000 ms and Windows -> WSL2 at
|
||||
250 ms: admission p50 0.9-1.4 ms, p99 <= 5.2 ms; durable p50 0.92-1.06 s, p95
|
||||
1.37-1.41 s, max 1.46 s; outcome lead 9 ticks; view interval p50 50.1 ms, p99 <= 60 ms;
|
||||
267-byte views, about 7.5 KB/s; tick debt max 0, server about 1 % CPU, 10.5 MB RSS. Two
|
||||
earlier runs matched within about 1 ms. A 1 ms-sleep Windows client measured about
|
||||
31 ms admission (Windows timer granularity); the trace now polls continuously.
|
||||
Finding recorded in ADR-0089: genome v1 and metabolism rates are per tick, so the
|
||||
quantum fixes biological rates; changing it needs a versioned rules migration (M11.1).
|
||||
|
||||
Executed checks: Windows MSVC network preset 1/1 (twice, after each change); Linux GCC 14
|
||||
network tests and evo-dev-session build; Clang ASan/UBSan network tests; clang-tidy on
|
||||
the session client, evo-dev-session and network_session tests; format check.
|
||||
Not covered: emulated RTT/loss, multiple clients, the reference worker and low-spec VM,
|
||||
movement/prediction; the targets are therefore not yet qualified (10.9).
|
||||
|
||||
@@ -95,5 +95,7 @@ re-encoding; dev grant environment refusal, bit-flip tag failures and key misuse
|
||||
admission scope/lifetime/reuse/duplicate/capacity rules and every intent status;
|
||||
TLS 1.3 loopback with suite/version checks, 100 kB transfer, close_notify,
|
||||
untrusted CA, wrong name, mismatched key, record tampering, transport failure and
|
||||
plaintext rejection. `evo-dev-session-fuzz` is the libFuzzer target
|
||||
plaintext rejection. `evo-dev-session trace` (M10.1) measures admission and durable round trips, view cadence
|
||||
and bytes against a running region (`tools/network/session-trace.sh`,
|
||||
[M10_TIMING_TRACES](M10_TIMING_TRACES.md)). `evo-dev-session-fuzz` is the libFuzzer target
|
||||
(`EVO_BUILD_FUZZER`, Linux Clang). Results: engineering/VALIDATION.md.
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# M10.1 timing traces
|
||||
|
||||
Supports [ADR-0089](../adr/0089-m10-timing-and-budgets.md). These are development-reference
|
||||
measurements of the M9 dev session path, not qualification on the reference hardware.
|
||||
|
||||
## Method
|
||||
`tools/network/session-trace.sh <out-dir>` (Linux/WSL2, PostgreSQL prepared) provisions
|
||||
the development-v1 region (world 100, region 1, frame 9) in a throwaway database, runs
|
||||
`evo-server` (lineage profile, 50 ms quantum, 1 s flush, synthetic inputs, dev sessions,
|
||||
ops metrics) and `evo-dev-session trace` at 250, 100 and 1000 ms intention intervals,
|
||||
then waits for a client on another host (here Windows to WSL2). The trace client polls
|
||||
continuously, sends one intention per interval after a fresh baseline, and records on
|
||||
its monotonic clock: send to IntentResult (admission round trip), send to IntentOutcome
|
||||
(durable), outcome tick minus the view tick at send, view inter-arrival and bytes.
|
||||
Percentiles are nearest-rank. A run fails on any loss, rejection or reconnect.
|
||||
|
||||
Hardware: AMD Ryzen 7 9800X3D (8 cores/16 threads), 61.6 GB, Windows 11 Pro; server in
|
||||
WSL2 (kernel 5.15.167.4, 16 vCPU, 30.1 GiB visible); one region, one client at a time,
|
||||
no emulated loss or delay.
|
||||
|
||||
## Results (2026-10-03, committed script)
|
||||
|
||||
| Run | Intents | Admission ms p50/p95/p99/max | Durable ms p50/p95/max | Outcome lead (ticks) | View interval ms p50/p99/max |
|
||||
|---|---|---|---|---|---|
|
||||
| Linux loopback, 250 ms | 120 | 0.9 / 1.9 / 2.1 / 2.1 | 943 / 1398 / 1446 | 9 | 50.1 / 59.9 / 63.1 |
|
||||
| Linux loopback, 100 ms | 200 | 1.1 / 2.1 / 4.2 / 4.9 | 953 / 1405 / 1455 | 9 | 50.1 / 59.5 / 60.6 |
|
||||
| Linux loopback, 1000 ms | 30 | 1.0 / 4.8 / 5.2 / 5.2 | 1057 / 1406 / 1455 | 9 | 50.1 / 57.9 / 60.4 |
|
||||
| Windows -> WSL2, 250 ms | 120 | 1.4 / 2.1 / 2.3 / 2.5 | 917 / 1368 / 1418 | 9 | 50.1 / 59.4 / 60.7 |
|
||||
|
||||
Every view was 267 bytes (one habitat); about 7.3-7.9 KB/s received including
|
||||
heartbeats and results. Server: tick debt maximum 0, about 1 % CPU, at most 10.5 MB RSS.
|
||||
Two earlier runs with the same build gave the same distributions within about 1 ms.
|
||||
|
||||
## Interpretation
|
||||
- Durable latency = the carrier delay (about 9 ticks, 450 ms) plus waiting for the next
|
||||
1 s commit flush, plus a small commit cost: observed 0.45-1.46 s. Meeting p95 <= 1.5 s
|
||||
leaves little margin under load; 10.9 must measure commit cost with 20+ clients.
|
||||
- The 9-tick outcome lead is the M9 synthetic-carrier path (ADR-0083), not M10 admission.
|
||||
- Admission round trips are bounded by the server loop's 2 ms sleep, not the network.
|
||||
- Measurement pitfall: with a 1 ms sleep per poll, the Windows client measured about
|
||||
31 ms admission and 47 ms median view interval, because Windows sleeps in about
|
||||
15.6 ms timer ticks. The trace polls continuously; frame-paced clients add their own
|
||||
frame period to perceived latency, which 10.6 must budget.
|
||||
|
||||
## Not covered
|
||||
Emulated RTT/loss (needs netem or a lossy relay; 10.2/10.9), multiple clients, the
|
||||
reference worker and low-spec VM, real movement and prediction, larger views.
|
||||
Reference in New Issue
Block a user