test: load-insensitive tviews perf gate; env note

This commit is contained in:
2026-11-20 22:44:55 +01:00
parent 414bb0326c
commit 0448002cc5
4 changed files with 106 additions and 40 deletions
+16 -1
View File
@@ -24,7 +24,12 @@ Evidence roots (relative to repo root):
- `prototype-tile-leak/` (tile size vs leak; README tables and the 2026-11-08 phone run)
How to run: `devbox run test` = Nim in-process tests first, then the Node black-box harnesses;
`devbox run mutation` = the mutation suite.
`devbox run mutation` = the mutation suite. Run everything from the repo root through `devbox run`.
**Do not export devbox's `LD_LIBRARY_PATH` into host tools or stale binaries.** The devbox store is
built against glibc 2.44 while this host (NixOS) runs 2.42, so a 2.44-built `libsqlite3` loaded by a
2.42 loader fails at load time (or loads a mismatched libc). Rebuild after a `devbox.lock` change
(`devbox run test`/`bench` do it on first use); never reuse a binary built before the change.
---
@@ -188,6 +193,16 @@ How to run: `devbox run test` = Nim in-process tests first, then the Node black-
caveat]. A real-network run (laptop over the intended HTTPS path, phone on LAN) is an M7 item.
- Load/perf regression gate: `bench` + concurrency numbers (this section and §4.3) compared with
the committed baselines; the 2x threshold and its [PROPOSED] status are in DESIGN §5.3.
- **In-process egress gate** (#28, `tests/tviews.nim`): wall-clock gates are load-sensitive, so every
asserted number is the *fastest* of 20 timed passes after a warm-up (min-of-N), never a mean: a pass
the OS descheduled is not the minimum, while a regression raises every pass. Stated budgets are
10 us for one `Context` build and 2 ms for one egress pass (M5's 7.5 ms is a whole-mutation p99, not
a per-pass mean; the #28 shape measured 0.79 ms GM / 0.32 ms player on the reference build, 0.5-1.7 ms
in the debug suite depending on CPU clocks). The gate allows a documented 2x around each budget
(20 us, 4 ms) for a saturated box. The load-insensitive explored-size invariant
`smallMs <= gmMs*3 + 0.5` (16384 vs 262144 cells) is kept on minima. Absolute averages are
*recorded*, not asserted, by `devbox run bench` (`results/bench.log`: GM egress pass 0.24 ms,
player 0.08 ms, release build).
### 5.4 Known limitations