Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(testing): keep TESTING.md below master's size after merging v0.60.77.0 (eval-lane note moves to the verify operations doc)

garrytan3c2642fc575f
diff --git a/docs/TESTING.md b/docs/TESTING.md
index aedd4b1a51..72ca297dd0 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -30,9 +30,7 @@ log's absolute path. A failing `bun run verify` keeps each failed check's log
and prints it. In CI, each red job's step summary lists the failing tests with a
`bun test … -t` reproduce command.
-**CI check is red on master:** follow the [CI red runbook](ci-red-runbook.md)
-(`master-red`, `flake`, `nightly-red` and `known-red` labels, the failure
-manifest, CI health).
+**Red CI on master:** [CI red runbook](ci-red-runbook.md).
| File suffix or location | Lane | Command | Runs in PR CI |
|---|---|---|---|
@@ -274,11 +272,9 @@ only where a Postgres lane names it. Those lanes are: a workflow step that
runs with `DATABASE_URL` and names the file, a `test/e2e/` wrapper that
imports it (`registerPostgresTests`), a `tests/heavy/` script that names it,
or a row in `scripts/e2e-backend-matrix.txt`. Unit-lane files with no other
-Postgres owner are listed in `test/postgres-unit-arms.txt` (one sorted path
-per line), read by `persistence-validation.yml`'s `unit-postgres-arms` job (two
-shards balanced by `scripts/postgres-arm-weights.json`, both Bun versions), the
-[race hunt](#race-hunt) and the lane guard. Each file runs in its own Bun
-process and each failure prints an `::error file=…` line with its reproduce command.
+Postgres owner are listed in `test/postgres-unit-arms.txt`, read by
+`persistence-validation.yml`'s `unit-postgres-arms` job (one Bun process per
+file), the [race hunt](#race-hunt) and the lane guard.
`bun run check:postgres-lanes` (in `verify`) fails on every arm with no lane
and on a bad list row. An arm deliberately left out is an `ALLOWLIST` row in
`scripts/check-postgres-lane-coverage.ts` naming its reason and TODO; a row
@@ -413,7 +409,7 @@ Test command tiers, each with a clear scope:
| Command | What it runs | Wallclock | When to use |
|---|---|---|---|
| `bun run test` | Parallel unit loop (`scripts/run-unit-parallel.sh`): weighted shards (CPU-detected, 4 by default, at most 8; CI uses 8), then the serial pass. Excludes `*.slow.test.ts` and `test/e2e/*`; no typecheck. Builds the PGLite schema snapshot first and exports `GBRAIN_PGLITE_SNAPSHOT` (opt out: `GBRAIN_NO_SNAPSHOT=1`). Caps total concurrency to available memory at `GBRAIN_TEST_MEM_PER_FILE_MB` (default 1536) per slot, shedding intra-shard width before shards. Shards that fail with the WASM out-of-memory signature or are killed externally get one serial rescue pass: phantoms go green with an `oom_rescued` note, real failures stay red. Knobs: `GBRAIN_TEST_NO_MEM_ADAPT=1`, `GBRAIN_TEST_NO_OOM_FALLBACK=1`, `GBRAIN_TEST_MAX_CONCURRENCY` (default 4), `GBRAIN_TEST_SHARD_TIMEOUT` / `GBRAIN_TEST_SHARD_KILL_AFTER`, `--shards N` / `--max-concurrency N` / `--dry-run`. | a few minutes on a laptop | Inner edit loop. Default. |
-| `bun run verify` | CI's authoritative pre-test gate set, fanned out by `scripts/run-verify-parallel.sh` through a bounded worker pool (default `detect_cpus`; override `GBRAIN_VERIFY_MAX_PARALLEL`) with the heavy checks ordered first (typecheck, the two compile-embed checks, admin build, fuzz bundles, whole-tree greps), then the self-timed `SOLO_CHECKS` alone ([why](operations/verify-and-nightly-e2e.md#verify-solo-checks)). `check:eval-chronicle` and `check:eval-canary` are deliberately NOT in the battery (their test-file twins `test/eval-chronicle.test.ts` and `test/eval-canary.test.ts` run the identical evals in the unit matrix, and CI's verify job and matrix always run together — the package scripts stay for on-demand runs, so `verify`-only local callers should know both evals ride the unit lane instead). The `CHECKS` array in that script is the single source of truth — CI literally calls `bun run verify` in a dedicated job. | ~65-85s | Before pushing; before `/ship`. |
+| `bun run verify` | CI's authoritative pre-test gate set, fanned out by `scripts/run-verify-parallel.sh` through a bounded worker pool (default `detect_cpus`; override `GBRAIN_VERIFY_MAX_PARALLEL`) with the heavy checks ordered first (typecheck, the two compile-embed checks, admin build, fuzz bundles, whole-tree greps), then the self-timed `SOLO_CHECKS` alone ([why](operations/verify-and-nightly-e2e.md#verify-solo-checks)). Two evals ride the unit lane instead ([why](operations/verify-and-nightly-e2e.md#evals-in-the-unit-lane)). The `CHECKS` array in that script is the single source of truth — CI literally calls `bun run verify` in a dedicated job. | ~65-85s | Before pushing; before `/ship`. |
| `bun run test:full` | `verify && bun run test && bun run test:slow && [smart e2e]`. Smart e2e runs only when `DATABASE_URL` is set and propagates its failure; otherwise it prints a skip notice to stderr. Use `ci:local` to provision the databases and require PgBouncer execution. | ~3-5min depending on slow + e2e | Pre-merge sanity, before opening a PR. |
| `bun run ci:local` | Independent host gitleaks scans, then frozen dependencies, guards/typecheck, the complete serial and slow lanes, and four unit/E2E shards inside Docker. Each E2E shard has its own pgvector database; selected PgBouncer tests must execute against the transaction-mode pooler. Unit, serial, and slow lanes have database URL overrides unset. Any failed stage fails the command. Complete shard logs survive container teardown under `.context/ci-local-shards/`. `ci:local:diff` runs only gitleaks and the doc checks on a doc-only diff and the full gate otherwise; `--no-shard` runs unit/E2E sequentially. Doc-only diffs still require successful gitleaks scans. | Depends on the full corpus | Full local gate before shipping. |
| `bun run ci:ubicloud` | The `ci:local` lanes (gitleaks, guards/typecheck, serial, slow, unit, all E2E with required PgBouncer execution) fanned out across ephemeral Ubicloud VMs from one heaviest-first work queue; `ci:ubicloud:diff` takes the same doc-only fast path as `ci:local:diff`. Needs `UBICLOUD_API_KEY` or `UBICLOUD_API_TOKEN`, no local Docker. See "Ubicloud fan-out" below. | ~5 min (floor: the longest single file) | Full gate before shipping when a Ubicloud token is available. |
diff --git a/docs/operations/verify-and-nightly-e2e.md b/docs/operations/verify-and-nightly-e2e.md
index 52ac1248ec..2ed85ab458 100644
--- a/docs/operations/verify-and-nightly-e2e.md
+++ b/docs/operations/verify-and-nightly-e2e.md
@@ -74,3 +74,12 @@ does, so a push to master does not cancel the nightly full corpus.
- 2026-10-05: created (green master wave, lane C): solo verify phase,
typecheck heap ceiling, full-corpus shard classification, macOS typecheck
skip (#6040, #6056).
+
+## Evals in the unit lane
+
+`check:eval-chronicle` and `check:eval-canary` are not in the `bun run verify`
+battery. Their test-file twins, `test/eval-chronicle.test.ts` and
+`test/eval-canary.test.ts`, run the identical evals in the unit matrix, and
+CI's verify job and unit matrix always run together. The package scripts stay
+for on-demand runs, so a local caller who runs only `verify` gets neither eval.
+