Skip to content

fix(test): bound local full-suite RAM#100437

Merged
steipete merged 1 commit into
mainfrom
codex/reduce-test-ram
Jul 5, 2026
Merged

fix(test): bound local full-suite RAM#100437
steipete merged 1 commit into
mainfrom
codex/reduce-test-ram

Conversation

@steipete

@steipete steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Closes #100429

What Problem This Solves

Fixes an issue where developers running the full local test suite on roomy machines could experience excessive RAM pressure or OOM failures because the automatic profile multiplied its host-aware worker budget across nested Vitest processes.

Why This Change Was Made

The full-suite scheduler now spends the inferred host worker budget once across shard processes and keeps each shard to one Vitest worker. This removes the separate large/small nested profiles while preserving the ten-process ceiling, explicit operator overrides, memory/load throttling, and serial CI behavior.

User Impact

Default local full-suite runs use substantially less peak aggregate RAM and interfere less with other workstation workloads. Targeted tests, explicit concurrency overrides, and CI execution retain their existing contracts.

Evidence

  • Focused scheduling regression tests: node scripts/run-vitest.mjs test/scripts/vitest-local-scheduling.test.ts test/scripts/test-projects.test.ts
  • Fresh Blacksmith Testbox isolated inventory: Actions run, tbx_01kwsr7r7b5kpech5rd6vtp2ak; individual two-worker leaves reached 2.69 GB RSS.
  • Paired 250-shard full-suite aggregate RSS on Actions run, tbx_01kwss62hrm0qvyzrkvdde29aj: 22,907.4 MiB at 10 shards × 2 workers versus 13,722.1 MiB at 6 × 1, a 40.1% reduction. The final run passed and improved from 9m05s to 7m25s.
  • Exact-head changed gate on the same Testbox: passed typecheck, core-test lint, script lint, dependency/patch guards, and boundary checks in 1m55s.
  • Fresh Codex autoreview against origin/main: clean, no accepted or actionable findings (0.95 confidence).

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Jul 5, 2026
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready at exact PR head 32d25c1c6b7ba0ffbb22c36c1a66b8996801071d.

Work completed:

  • Replaced the nested 10-shard × 2-worker automatic profile with one global host-aware budget and one Vitest worker per shard.
  • Deleted the obsolete large/small profile selector and kept explicit overrides, memory/load throttling, CI serialization, and the ten-process ceiling.

Proof:

  • node scripts/run-vitest.mjs test/scripts/vitest-local-scheduling.test.ts test/scripts/test-projects.test.ts src/scripts/test-projects.test.ts — 274 tests passed.
  • Blacksmith Testbox tbx_01kwss62hrm0qvyzrkvdde29aj, Actions run — paired 250-shard full-suite peak aggregate RSS fell from 22,907.4 MiB at 10×2 to 13,722.1 MiB at 6×1 (40.1%); final run passed in 7m25s.
  • Same Testbox exact-head check:changed — typecheck, core-test lint, all script lint, dependency/patch guards, and boundary checks passed in 1m55s.
  • Exact-head hosted CI — all required jobs passed.
  • Fresh Codex autoreview against origin/main — clean; no accepted/actionable findings (0.95 confidence).

Known proof note: the separate serial per-leaf inventory connection expired after 38m48s, after capturing individual leaves up to 2.69 GiB RSS. The complete paired full-suite run above covers all 250 shards and is the landing proof.

@steipete
steipete merged commit f141408 into main Jul 5, 2026
118 of 122 checks passed
@steipete
steipete deleted the codex/reduce-test-ram branch July 5, 2026 19:16
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: keep local full-suite RAM within the host budget

1 participant