From 43efc9fdbe3669b96b16e93419069f44e3dade9c Mon Sep 17 00:00:00 2001 From: Omri Katz <9701896+omridevk@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:00:09 +0300 Subject: [PATCH 1/3] fix: cap whiteboard IT vitest forks locally to avoid saturating 12-core Macs CI (dedicated 4-vCPU runner) and explicit VITEST_MAX_FORKS overrides are unaffected. Co-Authored-By: Claude Fable 5 --- packages/extensions/whiteboard/vitest.config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/extensions/whiteboard/vitest.config.ts b/packages/extensions/whiteboard/vitest.config.ts index db982a717..535133eea 100644 --- a/packages/extensions/whiteboard/vitest.config.ts +++ b/packages/extensions/whiteboard/vitest.config.ts @@ -3,9 +3,17 @@ import {playwright} from '@vitest/browser-playwright' import {defineConfig} from 'vitest/config' import {ciTest} from '@conciv/vitest-config' +function localForkCap(): {maxWorkers?: number} { + if (process.env.GITHUB_ACTIONS !== undefined) return {} + const cap = Number(process.env.VITEST_MAX_FORKS) + if (Number.isInteger(cap) && cap >= 1) return {} + return {maxWorkers: 3} +} + export default defineConfig({ test: { ...ciTest(), + ...localForkCap(), projects: [ { test: { @@ -20,6 +28,7 @@ export default defineConfig({ plugins: [solid()], test: { ...ciTest(), + ...localForkCap(), name: 'whiteboard-browser', include: ['test/**/*.browser.test.tsx'], testTimeout: 200_000, From 2b27402583047d30c2f8f8a34e6692fad7d68adb Mon Sep 17 00:00:00 2001 From: Omri Katz <9701896+omridevk@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:11:45 +0300 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20whiteboard=20suite=20safe=20to=20ru?= =?UTF-8?q?n=20locally=20=E2=80=94=20vitest=20config=20self-caps=20forks?= =?UTF-8?q?=20off-CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- AGENTS.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index face4fb7e..04584ed82 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -174,9 +174,11 @@ true` ⇒ `history` required; `slashCommands` ≠ `'none'` ⇒ `commands` requir - Whiteboard (TanStack DB over libSQL): never write to the db inside a collection subscription, effect, or render body: it triggers a re-render storm. Writes go in event handlers only. -- The whiteboard test suite (`packages/extensions/whiteboard/test`) runs in CI only, never locally: - not one test, not `--filter`'d. Local gates for whiteboard changes are typecheck/build/lint; - behavior evidence comes from a green CI run on the PR. +- The whiteboard test suite (`packages/extensions/whiteboard/test`) boots a real Chromium + server + per test. Its vitest config self-caps `maxWorkers` at 3 off-CI (`localForkCap`), which makes local + runs safe: build first (`pnpm turbo run build --filter=@conciv/extension-whiteboard`), then + `pnpm exec vitest run` from the package. Never bypass or remove that cap; uncapped runs have + saturated a workstation before. - The widget bundle must externalize every `@conciv/extension/*` subpath and shared Ark/Solid deps; a second bundled copy splits the Solid/Ark context and extension popovers render at 0,0. Guarded by the mount-externals build test; don't weaken it. From 9631bfe9c80ac6b46a5bc48484597ed5767f7379 Mon Sep 17 00:00:00 2001 From: Omri Katz <9701896+omridevk@users.noreply.github.com> Date: Sun, 23 Aug 2026 13:38:54 +0300 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20apply=20the=20local=20fork=20cap=20t?= =?UTF-8?q?o=20the=20node=20project=20too=20=E2=80=94=20vitest=204=20inlin?= =?UTF-8?q?e=20projects=20do=20not=20inherit=20root=20maxWorkers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- AGENTS.md | 11 ++++++----- packages/extensions/whiteboard/vitest.config.ts | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 04584ed82..4f457e24e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -174,11 +174,12 @@ true` ⇒ `history` required; `slashCommands` ≠ `'none'` ⇒ `commands` requir - Whiteboard (TanStack DB over libSQL): never write to the db inside a collection subscription, effect, or render body: it triggers a re-render storm. Writes go in event handlers only. -- The whiteboard test suite (`packages/extensions/whiteboard/test`) boots a real Chromium + server - per test. Its vitest config self-caps `maxWorkers` at 3 off-CI (`localForkCap`), which makes local - runs safe: build first (`pnpm turbo run build --filter=@conciv/extension-whiteboard`), then - `pnpm exec vitest run` from the package. Never bypass or remove that cap; uncapped runs have - saturated a workstation before. +- The whiteboard integration tests (`packages/extensions/whiteboard/test/*.it.test.ts` and the + browser project) each boot a real Chromium + server; unit tests there are plain node. Its vitest + config self-caps `maxWorkers` at 3 off-CI (`localForkCap`), which makes local runs safe: build + first (`pnpm turbo run build --filter=@conciv/extension-whiteboard`), then `pnpm exec vitest run` + from the package. Never bypass or remove that cap; uncapped runs have saturated a workstation + before. - The widget bundle must externalize every `@conciv/extension/*` subpath and shared Ark/Solid deps; a second bundled copy splits the Solid/Ark context and extension popovers render at 0,0. Guarded by the mount-externals build test; don't weaken it. diff --git a/packages/extensions/whiteboard/vitest.config.ts b/packages/extensions/whiteboard/vitest.config.ts index 535133eea..62e8e6086 100644 --- a/packages/extensions/whiteboard/vitest.config.ts +++ b/packages/extensions/whiteboard/vitest.config.ts @@ -17,6 +17,7 @@ export default defineConfig({ projects: [ { test: { + ...localForkCap(), name: 'whiteboard', environment: 'node', include: ['test/**/*.test.ts', 'test/**/*.it.test.ts'],