docs: record test wall times and the parallelism knob
Adds the warmed/cold table for test/client-test/e2e, the pre-push total, mutation and bench, the machine/commit note and the FFF_TEST_JOBS / FFF_E2E_JOBS overrides. TESTING explains what makes the fan-out safe (per-file isolation, shared build cache, worktree-local nimcache, tmpfs state dirs) and why the wall-clock gate files still run alone.
This commit is contained in:
+25
-1
@@ -26,6 +26,27 @@ Evidence roots (relative to repo root):
|
||||
How to run: `devbox run test` = Nim in-process tests first, then the Node black-box harnesses;
|
||||
`devbox run mutation` = the mutation suite. Run everything from the repo root through `devbox run`.
|
||||
|
||||
Both gates run concurrently at `FFF_TEST_JOBS` (default: half the cores, capped at 8; `FFF_TEST_JOBS=1`
|
||||
serialises). Concurrency does not change a test or an assertion; it is safe because the harnesses
|
||||
were already isolated (each Node test file is its own process with its own state dir, free ports,
|
||||
nginx and server). What makes it fast: the real server (clean, `leakfault`, `dispfault`) and the leak
|
||||
checker are built once per source+flags and shared across the parallel files (`lib.mjs`
|
||||
`cachedNimBuild`, locked and published by rename), each Nim test file compiles into a worktree-local
|
||||
`run/nimcache/test-*`, and `fault.test.mjs`'s 22 independent cases are sharded across processes
|
||||
(`FFF_TEST_SHARDS`/`FFF_TEST_SHARD`). Two Node files whose assertions are wall-clock gates
|
||||
(`persistence.test.mjs`'s move-ack budget, `tiles.test.mjs`'s lock-free burst) run alone before the
|
||||
fan-out, so those numbers are never measured under the suite's own load. `devbox run e2e` uses
|
||||
`FFF_E2E_JOBS` (default: the same, capped at 4) and keeps its timing-gate files (`map`, `fog`,
|
||||
`fogbench`, `perf`) in a serial first phase for the same reason. The host froze under uncapped load
|
||||
before, hence the half-cores default.
|
||||
|
||||
Harness state dirs are created under `TMPDIR`; the gates point it at `/dev/shm` when it exists
|
||||
(`FFF_TEST_NO_TMPFS=1` opts out). On a disk-backed `/tmp`, the fan-out's SQLite commits
|
||||
(`synchronous=FULL`) plus transcripts and tile fixtures could stall a first commit long enough for a
|
||||
harness ack to look lost; tmpfs keeps the same SQLite and SIGKILL-restart semantics without the
|
||||
fsync storm. The harness ack/handshake patience is 15 s (`lib.mjs` `HARNESS_TIMEOUT_MS`) so a busy
|
||||
host is not mistaken for a missing answer; the wall-clock gate files keep their own asserted budgets.
|
||||
|
||||
**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
|
||||
@@ -623,11 +644,14 @@ from the prototype, what was missing, what the M3 build added, and the tools it
|
||||
Vitest seam (pure reducer, protocol client, envelope); `devbox run e2e` = the built client through
|
||||
the real server and vhost; `devbox run fogbench` = the 50-token 16384 px server measurement
|
||||
(`results/m4-fog-bench.log`). The finish gate (#76) runs all of them plus `mutation` and `bench`.
|
||||
Both suites fan out files at `FFF_TEST_JOBS` (see "How to run"); no file is serialised for
|
||||
correctness, only the wall-clock gate files are run alone so their budgets stay meaningful.
|
||||
- The nine M3 accept groups and their proving harness tests are mapped in `tools/groups.mjs`;
|
||||
`tools/groups.test.mjs` fails if a group file or its named evidence test disappears, so the
|
||||
acceptance checklist cannot silently go stale. Harnesses that are not an accept group (`smoke`,
|
||||
`walls`, `tokens`, `details`, `scene`, `wsheaders`) run in the same pass.
|
||||
- In-process tests stay Nim (`nimble test`, unchanged).
|
||||
- In-process tests stay Nim (every `tests/*.nim` file, compiled and run like `nimble test`; the
|
||||
runner only bounds how many files compile at once).
|
||||
- Browser e2e details and the client-side extension rules (append-only reducer slices and render
|
||||
modules): `client/README.md`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user