diff --git a/docs/help/testing.md b/docs/help/testing.md index 2be59360b47..6cf3ae14246 100644 --- a/docs/help/testing.md +++ b/docs/help/testing.md @@ -56,6 +56,7 @@ Think of the suites as “increasing realism” (and increasing flakiness/cost): - `pnpm test` now keeps a small checked-in behavioral manifest for true pool/isolation overrides and a separate timing snapshot for the slowest unit files. - Shared unit coverage now defaults to `threads`, while the manifest keeps the measured fork-only exceptions and heavy singleton lanes explicit. - The extension suite (`vitest.extensions.config.ts`) also now defaults to `threads`; the March 22, 2026 direct full-suite control run passed clean without extension-specific fork exceptions. + - The channel suite (`vitest.channels.config.ts`) now also defaults to `threads`; the March 22, 2026 direct full-suite control run passed clean without channel-specific fork exceptions. - The wrapper peels the heaviest measured files into dedicated lanes instead of relying on a growing hand-maintained exclusion list. - Refresh the timing snapshot with `pnpm test:perf:update-timings` after major suite shape changes. - Embedded runner note: @@ -73,6 +74,7 @@ Think of the suites as “increasing realism” (and increasing flakiness/cost): - Base Vitest config still defaults to `forks`. - Unit wrapper lanes default to `threads`, with explicit manifest fork-only exceptions. - Extension scoped config defaults to `threads`. + - Channel scoped config defaults to `threads`. - Unit, channel, and extension configs default to `isolate: false` for faster file startup. - `pnpm test` also passes `--isolate=false` at the wrapper level. - Opt back into Vitest file isolation with `OPENCLAW_TEST_ISOLATE=1 pnpm test`. diff --git a/docs/plugins/sdk-entrypoints.md b/docs/plugins/sdk-entrypoints.md index 25ebc050e2e..b75ab31fd46 100644 --- a/docs/plugins/sdk-entrypoints.md +++ b/docs/plugins/sdk-entrypoints.md @@ -43,7 +43,7 @@ export default definePluginEntry({ }); ``` -### Options +### Channel Options | Field | Type | Required | Default | | -------------- | ---------------------------------------------------------------- | -------- | ------------------- | diff --git a/docs/reference/test.md b/docs/reference/test.md index 8c724f99580..81f2c674344 100644 --- a/docs/reference/test.md +++ b/docs/reference/test.md @@ -13,8 +13,8 @@ title: "Tests" - `pnpm test:coverage`: Runs the unit suite with V8 coverage (via `vitest.unit.config.ts`). Global thresholds are 70% lines/branches/functions/statements. Coverage excludes integration-heavy entrypoints (CLI wiring, gateway/telegram bridges, webchat static server) to keep the target focused on unit-testable logic. - `pnpm test`: runs the full wrapper. It keeps only a small behavioral override manifest in git, then uses a checked-in timing snapshot to peel the heaviest measured unit files into dedicated lanes. - Unit files default to `threads` in the wrapper; keep fork-only exceptions documented in `test/fixtures/test-parallel.behavior.json`. +- `pnpm test:channels` now defaults to `threads` via `vitest.channels.config.ts`; the March 22, 2026 direct full-suite control run passed clean without channel-specific fork exceptions. - `pnpm test:extensions` now defaults to `threads` via `vitest.extensions.config.ts`; the March 22, 2026 direct full-suite control run passed clean without extension-specific fork exceptions. -- `pnpm test:channels`: runs channel-heavy suites. - `pnpm test:extensions`: runs extension/plugin suites. - `pnpm test:perf:update-timings`: refreshes the checked-in slow-file timing snapshot used by `scripts/test-parallel.mjs`. - Gateway integration: opt-in via `OPENCLAW_TEST_INCLUDE_GATEWAY=1 pnpm test` or `pnpm test:gateway`. diff --git a/vitest.channels.config.ts b/vitest.channels.config.ts index 7526c945d79..1d239acf22a 100644 --- a/vitest.channels.config.ts +++ b/vitest.channels.config.ts @@ -2,5 +2,6 @@ import { channelTestInclude } from "./vitest.channel-paths.mjs"; import { createScopedVitestConfig } from "./vitest.scoped-config.ts"; export default createScopedVitestConfig(channelTestInclude, { + pool: "threads", exclude: ["src/gateway/**"], });