Summary
Several CI jobs (contracts, channels, extensions, extension-fast, install-smoke, and all 6 Windows shards) fail on main branch — not just on PRs. This blocks contributors from distinguishing their own CI regressions from pre-existing upstream failures.
Confirmed failing on:
ca132569 (main, CI run 23248003692) — contracts, channels, extensions, windows shards
61728734 (FradSer's mock fix attempt, CI run 23248947024) — same jobs still fail
8e503516 (latest main, CI run 23249588268) — contracts confirmed failed; channels/extensions still running at time of filing
Affected CI Jobs & Root Causes
1. contracts — Plugin registry does not load providers in test environment
Errors:
provider contract entry missing for github-copilot
expected [] to deeply equal [ Array(34) ] (loader expects 34 providers, gets 0)
expected 0 to be greater than 0 (provider registry loads 0 providers)
Affected tests: auth-choice.contract.test.ts, catalog.contract.test.ts, loader.contract.test.ts, provider.contract.test.ts, registry.contract.test.ts, web-search-provider.contract.test.ts
Root cause: The plugin loader/registry that discovers bundled providers at runtime returns an empty array in the CI test environment. The contract tests assert that all 34 bundled providers are loadable, but the loader finds none. This suggests a build step or module resolution issue specific to how test:contracts is invoked.
2. channels — vitest mock factories missing exports
Errors:
No "addRoleDiscord" export is defined on the "./send.js" mock
No "execFile" export is defined on the "node:child_process" mock
No "enqueueSystemEvent" export is defined on the "openclaw/plugin-sdk/infra-runtime" mock
No "resolveStorePath" export is defined on the "openclaw/plugin-sdk/config-runtime" mock
No "dispatchReplyWithBufferedBlockDispatcher" export is defined on the "openclaw/plugin-sdk/reply-runtime" mock
Affected extensions: discord, signal, slack, whatsapp, imessage
Root cause: New exports were added to the plugin-sdk and extension modules, but the vi.mock() factories in the test files don't return them. Vitest strict mock mode rejects calls to unmocked exports. FradSer's commit 8e503516 ("refactor: convert vi.mock to async importoriginal") attempts to fix this by using importOriginal but the fix is incomplete — channels still fails on the latest main.
3. extensions — Ajv import issue + 120s test timeout
Errors:
default.default is not a constructor (llm-task-tool.test.ts — Ajv import)
Timed out after 120000ms (matrix handler.body-for-agent.test.ts)
Root cause: Ajv's ESM/CJS interop changed — import Ajv from "ajv" no longer resolves to a constructor in the test environment. The Matrix test timeout suggests a missing mock or actual network call in tests.
4. extension-fast (discord, signal, slack, whatsapp) — Same mock issues as channels
Same vi.mock missing export errors as category 2 above. These tests run in a separate job but fail for the same reason.
5. install-smoke — Docker build TypeScript errors in extensions
Errors: 27+ TS errors during pnpm build:docker:
TS1360: Type '...' does not satisfy the expected type 'Record<string, ComponentSpec<string>>'
Affected extensions: matrix, msteams, nostr, zalouser
Root cause: Extension build dependencies (@vector-im/matrix-bot-sdk, @matrix-org/matrix-sdk-crypto-nodejs, etc.) are not installed in the Docker build context, causing type errors at build time.
6. Windows shards (all 6) — Combination of above
Windows CI shards run the full test suite and encounter the same mock/import/contract failures as the Linux-specific jobs.
Impact on Contributors
Every PR to this repo currently shows 5+ CI failures that are unrelated to the PR's changes. Contributors cannot tell whether their code caused a regression. For example, PR #49834 (my PR for per-model cooldown) passes all code-specific checks (format:check, build-smoke, changed-scope, protocol:check, secrets, both test shards), but appears to have "failing CI" due to these pre-existing issues.
Multiple contributors have already attempted fixes:
Suggested Fix Priorities
-
channels + extension-fast (highest impact): Update all vi.mock() factories in extension test files to include newly-added exports, or switch to vi.mock() with importOriginal consistently.
-
contracts: Investigate why the plugin loader returns 0 providers in the test environment. Likely a missing build step or module alias configuration in vitest.contracts.config.ts.
-
extensions: Fix Ajv ESM import in llm-task-tool.test.ts (probably needs import Ajv from "ajv/dist/jtd" or a named import). Add timeout/mock for Matrix test.
-
install-smoke: Add missing type declarations to Docker build context, or mark extension-specific types as optional dev dependencies.
Environment
- Node: v22 (CI runner)
- Vitest: v4.1.0
- OS: Ubuntu (Linux CI), Windows Server 2022 (Windows CI) @steipete @vincentkoc
Summary
Several CI jobs (
contracts,channels,extensions,extension-fast,install-smoke, and all 6 Windows shards) fail on main branch — not just on PRs. This blocks contributors from distinguishing their own CI regressions from pre-existing upstream failures.Confirmed failing on:
ca132569(main, CI run23248003692) —contracts,channels,extensions, windows shards61728734(FradSer's mock fix attempt, CI run23248947024) — same jobs still fail8e503516(latest main, CI run23249588268) —contractsconfirmed failed;channels/extensionsstill running at time of filingAffected CI Jobs & Root Causes
1.
contracts— Plugin registry does not load providers in test environmentErrors:
Affected tests:
auth-choice.contract.test.ts,catalog.contract.test.ts,loader.contract.test.ts,provider.contract.test.ts,registry.contract.test.ts,web-search-provider.contract.test.tsRoot cause: The plugin loader/registry that discovers bundled providers at runtime returns an empty array in the CI test environment. The contract tests assert that all 34 bundled providers are loadable, but the loader finds none. This suggests a build step or module resolution issue specific to how
test:contractsis invoked.2.
channels— vitest mock factories missing exportsErrors:
Affected extensions: discord, signal, slack, whatsapp, imessage
Root cause: New exports were added to the plugin-sdk and extension modules, but the
vi.mock()factories in the test files don't return them. Vitest strict mock mode rejects calls to unmocked exports. FradSer's commit8e503516("refactor: convert vi.mock to async importoriginal") attempts to fix this by usingimportOriginalbut the fix is incomplete —channelsstill fails on the latest main.3.
extensions— Ajv import issue + 120s test timeoutErrors:
Root cause: Ajv's ESM/CJS interop changed —
import Ajv from "ajv"no longer resolves to a constructor in the test environment. The Matrix test timeout suggests a missing mock or actual network call in tests.4.
extension-fast(discord, signal, slack, whatsapp) — Same mock issues aschannelsSame
vi.mockmissing export errors as category 2 above. These tests run in a separate job but fail for the same reason.5.
install-smoke— Docker build TypeScript errors in extensionsErrors: 27+ TS errors during
pnpm build:docker:Affected extensions: matrix, msteams, nostr, zalouser
Root cause: Extension build dependencies (
@vector-im/matrix-bot-sdk,@matrix-org/matrix-sdk-crypto-nodejs, etc.) are not installed in the Docker build context, causing type errors at build time.6. Windows shards (all 6) — Combination of above
Windows CI shards run the full test suite and encounter the same mock/import/contract failures as the Linux-specific jobs.
Impact on Contributors
Every PR to this repo currently shows 5+ CI failures that are unrelated to the PR's changes. Contributors cannot tell whether their code caused a regression. For example, PR #49834 (my PR for per-model cooldown) passes all code-specific checks (
format:check,build-smoke,changed-scope,protocol:check,secrets, both test shards), but appears to have "failing CI" due to these pre-existing issues.Multiple contributors have already attempted fixes:
8e503516by @FradSer — "refactor: convert vi.mock to async importoriginal"Suggested Fix Priorities
channels+extension-fast(highest impact): Update allvi.mock()factories in extension test files to include newly-added exports, or switch tovi.mock()withimportOriginalconsistently.contracts: Investigate why the plugin loader returns 0 providers in the test environment. Likely a missing build step or module alias configuration invitest.contracts.config.ts.extensions: Fix Ajv ESM import inllm-task-tool.test.ts(probably needsimport Ajv from "ajv/dist/jtd"or a named import). Add timeout/mock for Matrix test.install-smoke: Add missing type declarations to Docker build context, or mark extension-specific types as optional dev dependencies.Environment