Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(testing): results are reused only by a master push of a passed full-suite tree
garrytancb4cd2ec3bc6
diff --git a/docs/TESTING.md b/docs/TESTING.mdindex 2ff4493074..09ec6054b0 100644--- a/docs/TESTING.md+++ b/docs/TESTING.md@@ -720,8 +720,7 @@ CI retains timestamped unit/E2E logs, frozen E2E selection, and serial attemptrecords for 14 days. Compare push-to-required-green time including queueing,first failure, rescues/reruns, runner minutes, unique file counts, and coveragecompleteness. Compare cold and warm caches separately. Snapshot timings and-partition estimates are projections until matched workflow runs confirm them;-successful test results are never cached.+partition estimates are projections until matched workflow runs confirm them.### E2E selection@@ -1270,7 +1269,7 @@ there even though they pass on Linux and macOS.### CI vs local: intentionally divergent file sets-- **CI matrix** (`.github/workflows/test.yml`) runs `scripts/test-shard.sh` across 18 shards split by weight-aware LPT bin-packing (`scripts/sharding.ts`; unweighted files get the p75 weight) and includes `*.slow.test.ts` files without a dedicated job, plus keyless-allowlisted `evals/**/*.test.ts` (`test/scripts/evals-collection.test.ts`). Shards keep planned file order (`test-shard.sh --dry-run-list <i> 18`) and print their predicted weight (`sharding.ts --sum`). Every Bun job activates the PGLite schema snapshot (built in-runner, cached across jobs; the runner's hash check is authoritative). Serial files run across four `serial-tests` workers via `bun run test:serial`; `verify`, `typecheck` and the BrainBench memory-conformance gate (`scripts/ci-brainbench-gate.sh`, compared against `evals/brainbench/baselines/main.json`) have their own jobs, all aggregated by `test-status`. `e2e.yml` aggregates through `e2e-status`, with jsonb-parity gating Tier 2's token spend; scheduled runs also require the full-corpus lanes. Both aggregates reject failures, cancellations and unexpected skips, and successful test results are never reused. CI is the ground truth for "did everything pass."+- **CI matrix** (`.github/workflows/test.yml`) runs `scripts/test-shard.sh` across 18 shards split by weight-aware LPT bin-packing (`scripts/sharding.ts`; unweighted files get the p75 weight) and includes `*.slow.test.ts` files without a dedicated job, plus keyless-allowlisted `evals/**/*.test.ts` (`test/scripts/evals-collection.test.ts`). Shards keep planned file order (`test-shard.sh --dry-run-list <i> 18`) and print their predicted weight (`sharding.ts --sum`). Every Bun job activates the PGLite schema snapshot (built in-runner, cached across jobs; the runner's hash check is authoritative). Serial files run across four `serial-tests` workers via `bun run test:serial`; `verify`, `typecheck` and the BrainBench memory-conformance gate (`scripts/ci-brainbench-gate.sh`, compared against `evals/brainbench/baselines/main.json`) have their own jobs, all aggregated by `test-status`. `e2e.yml` aggregates through `e2e-status`, with jsonb-parity gating Tier 2's token spend; scheduled runs also require the full-corpus lanes. Both aggregates reject failures, cancellations and unexpected skips. Only a master push reuses results: those of a passed full-suite run of its exact tree (`scripts/ci-reuse.ts`). CI is the ground truth for "did everything pass."- **Local fast loop** (`scripts/run-unit-shard.sh` via the parallel wrapper) uses the same weighted partitioner as CI and EXCLUDES `*.slow.test.ts` AND `*.serial.test.ts`. Each shard runs its complete ordered selection with a fresh Bun process per file, without adding workers. Later groups still run after failures; missing summaries or file-completion evidence fail the shard. Local trades coverage for inner-loop speed; CI catches what local skips.`test/scripts/run-unit-shard.test.ts` pins what the local loop includes, and@@ -1352,9 +1351,9 @@ writes it, and `--promote` flips `provisional: false` at graduation.`coverage-report` job merges them, renders `scripts/render-coverage-summary.ts`(with behavioral-vs-structural counts from `scripts/structural-suites.tsv`) tothe step summary, and runs both gates with `COVERAGE_GATE_ENFORCE: '0'`. It is-not in `test-status` needs until the gate graduates. Test results are never-cached. `e2e-status` requires the four `coverage-full-*` execution lanes on-scheduled runs; only the percentages stay advisory.+not in `test-status` needs until the gate graduates. `e2e-status` requires the+four `coverage-full-*` execution lanes on scheduled runs; only the percentages+stay advisory.**Bun caveats.** Bun emits line records only, so function coverage isinformational. There is no subprocess coverage: code reached only through