From f20e089840098d43ee9d2e3ef798961e4bc92dd2 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 02:55:58 +0000 Subject: [PATCH 1/2] fix(devx): cap `pnpm test` concurrency at 100% of the host's own cores `pnpm test` (`turbo run test`, no `--concurrency`) fell through to turbo's flat default of 10 parallel tasks. On a 4-CPU/~15GB box (confirmed via `nproc`/`free -h`; cgroup carries no lower limit than host RAM), that fan-out -- each `test` task additionally forking its own vitest worker pool, since only 1 of 41 vitest.config.ts files in the repo declares poolOptions/maxWorkers -- gets the process OOM-killed (exit 137) before all tasks run (#11938). Root `test` script now runs `turbo run test --concurrency=100%`. `100%` is turbo's own percentage syntax, resolved against the host's detected core count AT INVOCATION TIME -- environment-derived, not a hard low constant: scales with whatever box actually runs it. Zero CI behaviour change: every `turbo run test` invocation in .github/workflows/*.yml already passes its own explicit --concurrency=4 (a CLI flag always wins over the script default), and none of them call the root `pnpm test` script at all. The only invocation this touches is the bare `pnpm test` with no flag -- the local/agent-container path #11938 is about. Part of #11938 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f598d2839..dbf20ae866 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dev:crm": "node scripts/check-dev-prereqs.mjs && pnpm check:console-sha && pnpm --filter @objectstack/example-crm dev", "dev:todo": "node scripts/check-dev-prereqs.mjs && pnpm check:console-sha && pnpm --filter @objectstack/example-todo dev", "spec:rebuild": "turbo run build --filter=...@objectstack/spec", - "test": "turbo run test", + "test": "turbo run test --concurrency=100%", "test:e2e": "turbo run test:e2e", "typecheck": "turbo run typecheck", "clean": "turbo run clean && rm -rf dist", From 90daa7fc9035474a3fa2f276190667d702ab1685 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 03:01:56 +0000 Subject: [PATCH 2/2] fix(devx): 100% -> 50% -- turbo's outer concurrency isn't the only lever that scales with host cores Live evidence while measuring the 100% (=4 on this box) value: 4 concurrent turbo test tasks were running 10 total vitest worker OS processes (~2.5 workers/task average) -- vitest's own default pool sizing ALSO scales with the host's own core count, independently of turbo's --concurrency. That means turbo's outer fan-out and vitest's inner fan-out compound: on a hypothetical bigger box, 100% is not a proportional, safe scale-up -- it is BOTH factors growing with core count at once, which grows memory pressure worse than linearly. And since turbo's OLD flat default was 10 regardless of box size, "100%" on any box with more than 10 cores is a real INCREASE in outer fan-out over today's behaviour, in the opposite direction from the defect this fixes. 50% avoids that: on THIS box (4 cores) it resolves to 2, which is the exact value the original card itself measured directly (135/136 tasks, 30m39s, peak ~7.6GB, real headroom) -- so the small-box side of this change has direct proof, not extrapolation. And 50% never exceeds turbo's old flat default of 10 until a box has 20+ cores, so on every runner shape this repo or a typical contributor machine actually has today, this change is a decrease or a wash relative to current behaviour, never an increase -- closing the gap the 100% value left open. Part of #11938 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dbf20ae866..7c6b2d7673 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dev:crm": "node scripts/check-dev-prereqs.mjs && pnpm check:console-sha && pnpm --filter @objectstack/example-crm dev", "dev:todo": "node scripts/check-dev-prereqs.mjs && pnpm check:console-sha && pnpm --filter @objectstack/example-todo dev", "spec:rebuild": "turbo run build --filter=...@objectstack/spec", - "test": "turbo run test --concurrency=100%", + "test": "turbo run test --concurrency=50%", "test:e2e": "turbo run test:e2e", "typecheck": "turbo run typecheck", "clean": "turbo run clean && rm -rf dist",