diff --git a/test/fixtures/test-memory-hotspots.extensions.json b/test/fixtures/test-memory-hotspots.extensions.json deleted file mode 100644 index edba776902b..00000000000 --- a/test/fixtures/test-memory-hotspots.extensions.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "config": "vitest.extensions.config.ts", - "generatedAt": "2026-04-03T04:18:33.578Z", - "defaultMinDeltaKb": 1048576, - "lane": "extensions, extensions-batch-*", - "files": { - "extensions/feishu/src/bot.test.ts": { - "deltaKb": 2516582, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/nextcloud-talk/src/setup.test.ts": { - "deltaKb": 2474639, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/acpx/src/runtime.test.ts": { - "deltaKb": 1824522, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/browser/src/node-host/invoke-browser.test.ts": { - "deltaKb": 1719665, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/msteams/src/graph-members.test.ts": { - "deltaKb": 1646264, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/msteams/src/token.test.ts": { - "deltaKb": 1625293, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/msteams/src/graph-messages.test.ts": { - "deltaKb": 1625293, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/bluebubbles/src/send.test.ts": { - "deltaKb": 1625293, - "sources": ["gh-job-69804189668:extensions-batch-19-shard-6"] - }, - "extensions/googlechat/src/approval-auth.test.ts": { - "deltaKb": 1614807, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/diffs/src/tool.test.ts": { - "deltaKb": 1604321, - "sources": ["checks-fast-extensions:2026-04-03"] - }, - "extensions/memory-core/src/memory/mmr.test.ts": { - "deltaKb": 1572864, - "sources": ["gh-job-69804189668:extensions-batch-2-shard-6"] - }, - "extensions/diffs/src/config.test.ts": { - "deltaKb": 1572864, - "sources": ["gh-job-69804189668:extensions-batch-20-shard-6"] - }, - "extensions/voice-call/src/webhook-security.test.ts": { - "deltaKb": 1541407, - "sources": ["gh-job-69804189666:extensions-batch-5-shard-1"] - }, - "extensions/nostr/src/nostr-bus.fuzz.test.ts": { - "deltaKb": 1509949, - "sources": ["gh-job-69804189668:extensions-batch-11-shard-6"] - }, - "extensions/memory-lancedb/index.test.ts": { - "deltaKb": 1499464, - "sources": ["gh-job-69804189668:extensions-batch-12-shard-6"] - }, - "extensions/google/provider-models.test.ts": { - "deltaKb": 1478492, - "sources": ["gh-job-69804189681:extensions-batch-11-shard-5"] - }, - "extensions/fal/image-generation-provider.test.ts": { - "deltaKb": 1447035, - "sources": ["gh-job-69804189668:extensions-batch-13-shard-6"] - }, - "extensions/matrix/src/matrix/format.test.ts": { - "deltaKb": 1447035, - "sources": ["gh-job-69804189668:extensions-batch-23-shard-6"] - }, - "extensions/minimax/model-definitions.test.ts": { - "deltaKb": 1447035, - "sources": ["gh-job-69804189676:extensions-batch-15-shard-4"] - } - } -} diff --git a/test/fixtures/test-memory-hotspots.unit.json b/test/fixtures/test-memory-hotspots.unit.json deleted file mode 100644 index 20a96993c6a..00000000000 --- a/test/fixtures/test-memory-hotspots.unit.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "config": "vitest.unit.config.ts", - "generatedAt": "2026-03-24T17:44:58.770Z", - "defaultMinDeltaKb": 262144, - "lane": "unit-fast, unit-*", - "files": { - "src/infra/outbound/channel-resolution.test.ts": { - "deltaKb": 1111491, - "sources": ["openclaw-test-memory-trace:unit-heavy-2"] - }, - "src/cron/isolated-agent/run.skill-filter.test.ts": { - "deltaKb": 1069548, - "sources": ["openclaw-test-memory-trace:unit-run.skill-filter-memory-isolated"] - }, - "src/infra/outbound/deliver.test.ts": { - "deltaKb": 1059062, - "sources": ["openclaw-deliver-mem:unit"] - }, - "src/cron/isolated-agent.uses-last-non-empty-agent-text-as.test.ts": { - "deltaKb": 1048576, - "sources": [ - "openclaw-test-memory-trace:unit-isolated-agent.uses-last-non-empty-agent-text-as-memory-isolated" - ] - }, - "src/cron/isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true.test.ts": { - "deltaKb": 1026355, - "sources": [ - "openclaw-test-memory-trace:unit-isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true-memory-isolated" - ] - }, - "src/cron/isolated-agent/run.cron-model-override.test.ts": { - "deltaKb": 946790, - "sources": ["openclaw-test-memory-trace:unit-run.cron-model-override-memory-isolated"] - }, - "src/channels/plugins/plugins-core.test.ts": { - "deltaKb": 792269, - "sources": ["openclaw-plugins-core-mem:unit"] - }, - "src/plugins/manifest-registry.test.ts": { - "deltaKb": 684749, - "sources": ["openclaw-manifest-registry-mem:unit"] - }, - "src/plugins/install.test.ts": { - "deltaKb": 510874, - "sources": ["openclaw-test-memory-trace:unit-install-memory-isolated"] - }, - "ui/src/ui/views/chat.test.ts": { - "deltaKb": 509338, - "sources": ["openclaw-test-memory-trace:unit-chat-memory-isolated"] - }, - "src/infra/provider-usage.auth.normalizes-keys.test.ts": { - "deltaKb": 494080, - "sources": [ - "openclaw-test-memory-trace:unit-provider-usage.auth.normalizes-keys-memory-isolated" - ] - }, - "src/plugins/conversation-binding.test.ts": { - "deltaKb": 485786, - "sources": ["openclaw-test-memory-trace:unit-conversation-binding-memory-isolated"] - } - } -} diff --git a/test/fixtures/test-parallel.behavior.json b/test/fixtures/test-parallel.behavior.json deleted file mode 100644 index a40f4319452..00000000000 --- a/test/fixtures/test-parallel.behavior.json +++ /dev/null @@ -1,280 +0,0 @@ -{ - "base": { - "threadPinned": [ - { - "file": "src/commands/backup.test.ts", - "reason": "Measured ~16% faster under threads than forks on base config after removing process.chdir() from the test." - }, - { - "file": "src/auto-reply/reply/commands-acp/install-hints.test.ts", - "reason": "Measured ~35% faster under threads than forks on base config after removing process.chdir() from the test." - }, - { - "file": "src/agents/pi-hooks/compaction-safeguard.test.ts", - "reason": "Measured ~27% faster under threads than forks on base config after removing process.chdir() from the test." - }, - { - "file": "src/auto-reply/reply/followup-runner.test.ts", - "reason": "This followup-runner suite is green under direct base-thread runs but can hang when targeted through the wrapper's default base fork lane; pin it to base threads so wrapper-targeted reruns match the stable raw-threads behavior." - } - ] - }, - "channels": { - "isolatedPrefixes": ["extensions/discord/src/monitor/"], - "isolated": [ - { - "file": "extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts", - "reason": "This Discord preflight suite hoists conversation-runtime ACP binding mocks; keep it in its own forked channel lane so shared workers do not reuse monitor modules with incompatible runtime stubs." - }, - { - "file": "extensions/discord/src/monitor/monitor.threading-utils.test.ts", - "reason": "This Discord threading utility suite exercises gateway and presence caches plus auto-thread helpers; keep it in its own forked channel lane so shared workers cannot inherit mutated monitor module state." - }, - { - "file": "extensions/discord/src/monitor/monitor.agent-components.test.ts", - "reason": "This Discord agent-components suite hoists security and conversation runtime mocks for DM component authorization; keep it in its own forked channel lane so shared workers do not inherit incompatible Discord runtime stubs." - }, - { - "file": "extensions/discord/src/monitor/native-command.model-picker.test.ts", - "reason": "This Discord model-picker interaction suite relies on isolated native-command fallback state and DM channel enums; keep it in its own forked channel lane so shared workers do not reuse polluted command runtime modules." - }, - { - "file": "extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts", - "reason": "This Discord native plugin-dispatch suite hoists conversation and reply runtime mocks for slash-command routing; keep it in its own forked channel lane so shared workers do not reuse mismatched native-command modules." - }, - { - "file": "extensions/discord/src/monitor/agent-components.wildcard.test.ts", - "reason": "This Discord wildcard component suite is green alone but can inherit polluted component-registration parser state from the shared channel lane; keep it in its own forked lane for deterministic CI." - }, - { - "file": "extensions/discord/src/send.creates-thread.test.ts", - "reason": "This Discord send/create-thread suite hoists web-media mocks and retries against rate-limit seams; keep it isolated so shared channel workers do not leak send-module state into its retry assertions." - }, - { - "file": "extensions/discord/src/components.test.ts", - "reason": "This Discord component builder suite is green alone but can inherit polluted component constructor state from the shared channel lane; keep it in its own forked lane for deterministic CI." - }, - { - "file": "extensions/discord/src/api.test.ts", - "reason": "This Discord API retry suite is green alone but can inherit timer or fetch retry contamination from the shared channel lane; keep it in its own forked lane for deterministic CI." - }, - { - "file": "extensions/discord/src/monitor/provider.skill-dedupe.test.ts", - "reason": "This Discord provider skill-dedupe suite depends on agent-component classes during provider import; keep it isolated so shared channel workers do not reuse partially mocked component modules." - }, - { - "file": "extensions/discord/src/monitor/monitor.test.ts", - "reason": "This Discord monitor interaction suite imports agent-component classes directly and is green alone but can inherit partially mocked Discord component constructors from the shared channel lane." - }, - { - "file": "extensions/whatsapp/src/inbound.test.ts", - "reason": "This WhatsApp inbound helper suite is green alone but can inherit polluted web-message parsing state from the shared channel lane; keep it in its own forked lane for deterministic CI." - }, - { - "file": "extensions/whatsapp/src/inbound.media.test.ts", - "reason": "This WhatsApp inbound media suite is green alone but can inherit polluted media and inbound parsing state from the shared channel lane; keep it in its own forked lane for deterministic CI." - }, - { - "file": "extensions/whatsapp/src/monitor-inbox.streams-inbound-messages.test.ts", - "reason": "This WhatsApp monitor inbox stream suite is green alone but can fail after the shared channel lane reuses inbound parsing state; keep it in its own forked lane for deterministic reruns and to trim the serial shared channels batch." - }, - { - "file": "extensions/whatsapp/src/monitor-inbox.captures-media-path-image-messages.test.ts", - "reason": "This WhatsApp inbox media-path suite spends about two seconds in assertions and grows worker RSS near 0.9 GiB alone; keep it in its own forked lane so the shared channels batch shrinks and top-level concurrency can overlap the hotspot." - }, - { - "file": "extensions/whatsapp/src/monitor-inbox.blocks-messages-from-unauthorized-senders-not-allowfrom.test.ts", - "reason": "This WhatsApp inbox allow-from rejection suite is a heavy shared hotspot with about two seconds of test work and high worker RSS; keep it in its own forked lane so it can overlap instead of extending the serial shared channels batch." - }, - { - "file": "extensions/whatsapp/src/monitor-inbox.allows-messages-from-senders-allowfrom-list.test.ts", - "reason": "This WhatsApp inbox allow-from acceptance suite is another heavy shared hotspot with about two seconds of test work and high worker RSS; keep it in its own forked lane so it can overlap instead of extending the serial shared channels batch." - }, - { - "file": "src/browser/chrome.test.ts", - "reason": "This Chrome helper suite is green alone but can inherit stale fetch, websocket, or timer state from the shared channel lane; keep it isolated so its CDP timeout assertions stay deterministic." - }, - { - "file": "src/browser/server-context.remote-tab-ops.test.ts", - "reason": "This browser remote-tab aggregate wrapper measured ~1.03 GiB RSS growth locally even after explicit Playwright teardown; keep it in its own forked channel lane so the shared channels worker can recycle immediately after the hotspot file." - }, - { - "file": "extensions/telegram/src/bot.create-telegram-bot.test.ts", - "reason": "This Telegram bot bootstrap suite is green alone but can inherit stale command-registration spies and bot runtime state from the shared channel lane; keep it isolated for deterministic command assertions." - }, - { - "file": "extensions/telegram/src/bot.test.ts", - "reason": "This Telegram bot runtime suite measured ~819.9 MiB RSS growth locally; keep it in its own forked channel lane so the shared channels worker can recycle immediately after the hotspot file." - }, - { - "file": "extensions/telegram/src/sendchataction-401-backoff.test.ts", - "reason": "This Telegram send-chat-action backoff suite hoists infra-runtime sleep mocks and remains a relatively heavy shared hotspot; keep it isolated so top-level concurrency can overlap it instead of extending the shared channels batch." - }, - { - "file": "extensions/telegram/src/monitor.test.ts", - "reason": "This Telegram monitor suite measured ~748.4 MiB RSS growth locally; keep it in its own forked channel lane so the shared channels worker can recycle immediately after the hotspot file." - }, - { - "file": "extensions/telegram/src/webhook.test.ts", - "reason": "This Telegram webhook suite hoists grammY bot and InputFile mocks; keep it in its own forked channel lane so shared workers do not reuse telegram runtime modules with mismatched constructors." - }, - { - "file": "extensions/slack/src/action-runtime.test.ts", - "reason": "This Slack action runtime suite measured ~766.2 MiB RSS growth locally; keep it in its own forked channel lane so the shared channels worker can recycle immediately after the hotspot file." - } - ] - }, - "extensions": { - "isolated": [ - { - "file": "extensions/matrix/src/matrix/sdk.test.ts", - "reason": "This suite hoists a matrix-js-sdk module mock that can leak into later Matrix extension files when they share a non-isolated worker." - }, - { - "file": "extensions/matrix/src/matrix/client/file-sync-store.test.ts", - "reason": "Matrix sdk.test.ts hoists a matrix-js-sdk module mock; keep the sync-store persistence regression in its own forked lane so non-isolated extension workers stay deterministic." - }, - { - "file": "extensions/matrix/src/matrix/client.test.ts", - "reason": "This Matrix client suite measured about 736.9 MiB RSS growth in the shared extensions lane during heapsnapshot tracing; keep it isolated so the shared Matrix extension worker can recycle instead of retaining Matrix runtime state." - }, - { - "file": "extensions/matrix/src/matrix/monitor/startup.test.ts", - "reason": "This Matrix startup suite was missing from the extension timing snapshot and repeated heapsnapshots in the shared extensions lane retained large Vite SSR transform strings plus system / Context growth; keep it isolated so the shared Matrix extension worker can recycle immediately after startup coverage." - }, - { - "file": "extensions/matrix/src/matrix/monitor/events.test.ts", - "reason": "This Matrix monitor events suite pulls in the verification-routing graph and, when paired in the shared extensions lane, spends ~23s in import time while pushing the worker toward ~1 GiB RSS; keep it isolated so the shared lane can recycle instead of retaining the Matrix monitor runtime graph." - }, - { - "file": "extensions/nextcloud-talk/src/monitor.replay.test.ts", - "reason": "The replay-handling regression is green alone but can inherit disturbed global stream/Response state from the shared extensions lane, so keep it in its own forked lane for deterministic CI." - }, - { - "file": "extensions/duckduckgo/src/ddg-search-provider.test.ts", - "reason": "This provider test hoists a client mock and imports the provider lazily; keep it in its own forked lane so shared extension workers do not reuse a previously cached module under test." - }, - { - "file": "extensions/browser/src/browser/chrome.test.ts", - "reason": "This Chrome CDP helper suite opens mock WebSocket servers and stubs global fetch state; keep it isolated so shared extension workers do not inherit stale browser probe state from neighboring files." - }, - { - "file": "extensions/firecrawl/src/firecrawl-scrape-tool.test.ts", - "reason": "This scrape-tool suite hoists client mocks and imports the tool lazily; keep it in its own forked lane so shared extension workers cannot bypass the mocked client via cached modules." - }, - { - "file": "extensions/firecrawl/src/firecrawl-search-provider.test.ts", - "reason": "This provider suite hoists the Firecrawl client mock and imports lazily; keep it isolated so shared extension workers do not reuse stale provider modules." - }, - { - "file": "extensions/firecrawl/src/firecrawl-search-tool.test.ts", - "reason": "This tool suite hoists the Firecrawl client mock and imports lazily; keep it isolated so shared extension workers cannot leak cached implementations across files." - }, - { - "file": "extensions/feishu/src/monitor.acp-init-failure.lifecycle.test.ts", - "reason": "This Feishu websocket lifecycle suite can stall only in the shared extensions swarm when reconnect state bleeds across files; keep it isolated so ACP init-failure teardown stays deterministic." - }, - { - "file": "extensions/feishu/src/monitor.bot-menu.lifecycle.test.ts", - "reason": "This Feishu websocket lifecycle suite can stall only in the shared extensions swarm when reconnect state bleeds across files; keep it isolated so bot-menu lifecycle teardown stays deterministic." - }, - { - "file": "extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts", - "reason": "This Feishu websocket lifecycle suite can stall only in the shared extensions swarm when reconnect state bleeds across files; keep it isolated so broadcast reply-once teardown stays deterministic." - }, - { - "file": "extensions/feishu/src/monitor.card-action.lifecycle.test.ts", - "reason": "This Feishu websocket lifecycle suite shares the same reconnect helpers and module state; keep it isolated with the other Feishu lifecycle files so card-action runs do not inherit cross-file websocket state." - }, - { - "file": "extensions/feishu/src/monitor.reply-once.lifecycle.test.ts", - "reason": "This Feishu websocket lifecycle suite can stall only in the shared extensions swarm when reconnect state bleeds across files; keep it isolated so reply-once teardown stays deterministic." - }, - { - "file": "extensions/line/src/download.test.ts", - "reason": "This LINE media-download suite depends on hoisted SDK mocks; run it in its own forked lane so shared extension workers do not fall back to the real SDK client." - }, - { - "file": "extensions/line/src/monitor.lifecycle.test.ts", - "reason": "This LINE lifecycle suite hoists runtime and route-registration mocks; keep it isolated so shared extension workers do not reuse cached monitor modules with real dependencies." - }, - { - "file": "extensions/line/src/probe.test.ts", - "reason": "This LINE probe suite depends on hoisted SDK mocks; keep it isolated so shared extension workers do not reuse cached probe modules with the real SDK client." - }, - { - "file": "extensions/line/src/send.test.ts", - "reason": "This LINE send suite hoists SDK and account/token mocks; keep it isolated so shared extension workers do not reuse cached send modules that bypass those mocks." - }, - { - "file": "extensions/telegram/src/fetch.test.ts", - "reason": "This Telegram transport suite is extension-owned and still measures high RSS locally; keep it in its own forked extensions lane so the shared worker can recycle immediately after the hotspot." - }, - { - "file": "extensions/tavily/src/tavily-extract-tool.test.ts", - "reason": "This extract-tool suite hoists the Tavily client mock and imports lazily; keep it isolated so shared extension workers do not reuse cached tool modules and hit real API-key resolution." - }, - { - "file": "extensions/tavily/src/tavily-search-provider.test.ts", - "reason": "This provider suite hoists the Tavily client mock and imports lazily; keep it isolated so shared extension workers do not reuse stale provider modules." - }, - { - "file": "extensions/tavily/src/tavily-search-tool.test.ts", - "reason": "This search-tool suite hoists the Tavily client mock and imports lazily; keep it isolated so shared extension workers do not bypass the mocked client via cached modules." - }, - { - "file": "extensions/xai/provider.contract.test.ts", - "reason": "This xAI provider contract suite validates the bundled provider registration produced by defineSingleProviderPluginEntry; keep it in its own forked extension lane so shared workers cannot poison that registry with hoisted plugin-sdk mocks from unrelated extension files." - }, - { - "file": "extensions/xai/web-search-provider.contract.test.ts", - "reason": "This xAI web-search contract suite validates the bundled Grok web-search registration from the same xAI plugin entry; keep it isolated so shared extension workers do not reuse hoisted plugin-sdk web-search mocks from unrelated extension files." - } - ] - }, - "unit": { - "isolated": [ - { - "file": "src/cli/qr-dashboard.integration.test.ts", - "reason": "This CLI integration suite hoists runtime/config mocks and resets module state between qr and dashboard command imports; keep it in its own forked lane so shared unit-fast workers stay deterministic." - }, - { - "file": "src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts", - "reason": "This config validation hotspot passes when rerun directly but can time out inside the shared unit-fast swarm under local and CI load; keep it in its own forked lane so schema validation stays deterministic." - }, - { - "file": "src/config/plugin-auto-enable.test.ts", - "reason": "This plugin auto-enable suite validates config schema and plugin metadata across many cases; keep it isolated so the shared unit-fast batches do not starve its longer validation loop." - }, - { - "file": "src/infra/matrix-legacy-crypto.test.ts", - "reason": "This Matrix legacy crypto migration suite touches temp-home filesystem fixtures and can time out when it shares the busy unit-fast lane; keep it isolated for deterministic migration timing." - }, - { - "file": "src/infra/state-migrations.test.ts", - "reason": "This legacy state migration suite builds multi-surface fixture trees and passes when rerun directly; keep it isolated so shared unit-fast pressure does not push it past the timeout budget." - }, - { - "file": "src/plugins/commands.test.ts", - "reason": "This plugin command suite contains a broad parameterized binding matrix and can time out only under the congested unit-fast lane; keep it isolated so command binding coverage remains deterministic." - }, - { - "file": "src/plugin-sdk/package-contract-guardrails.test.ts", - "reason": "This packed-artifact contract suite shells out through npm pack/install and passes alone but can overrun the shared unit-fast lane when it competes with other package-heavy unit batches." - }, - { - "file": "src/secrets/runtime.coverage.test.ts", - "reason": "This secrets runtime coverage sweep exercises every active registry target and passes in direct reruns; keep it isolated so the shared unit-fast lane does not starve its filesystem and config setup." - }, - { - "file": "src/secrets/runtime.test.ts", - "reason": "This secrets runtime snapshot suite can time out only inside the shared unit-fast swarm; keep it isolated so secret-resolution setup remains deterministic." - }, - { - "file": "src/security/audit.test.ts", - "reason": "This security audit suite runs a wide config matrix and direct reruns stay green; keep it isolated so shared unit-fast congestion does not push its longest cases past the timeout budget." - } - ], - "threadPinned": [] - } -} diff --git a/test/fixtures/test-timings.channels.json b/test/fixtures/test-timings.channels.json deleted file mode 100644 index cdebe90e3f8..00000000000 --- a/test/fixtures/test-timings.channels.json +++ /dev/null @@ -1,853 +0,0 @@ -{ - "config": "vitest.channels.config.ts", - "generatedAt": "2026-03-31T10:45:00Z", - "defaultDurationMs": 3000, - "files": { - "extensions/discord/src/account-inspect.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/accounts.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/actions/runtime.moderation.authz.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/actions/runtime.presence.test.ts": { - "durationMs": 7 - }, - "extensions/discord/src/actions/runtime.test.ts": { - "durationMs": 14 - }, - "extensions/discord/src/api.test.ts": { - "durationMs": 9 - }, - "extensions/discord/src/audit.test.ts": { - "durationMs": 7 - }, - "extensions/discord/src/channel-actions.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/channel.test.ts": { - "durationMs": 950 - }, - "extensions/discord/src/chunk.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/client.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/components.test.ts": { - "durationMs": 400 - }, - "extensions/discord/src/directory-live.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/draft-chunking.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/draft-stream.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/gateway-logging.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/group-policy.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/mentions.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/monitor.gateway.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/monitor.test.ts": { - "durationMs": 71 - }, - "extensions/discord/src/monitor.tool-result.sends-status-replies-responseprefix.test.ts": { - "durationMs": 701 - }, - "extensions/discord/src/monitor/acp-bind-here.integration.test.ts": { - "durationMs": 15200 - }, - "extensions/discord/src/monitor/agent-components.wildcard.test.ts": { - "durationMs": 547 - }, - "extensions/discord/src/monitor/auto-presence.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/monitor/commands.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/monitor/dm-command-auth.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/monitor/dm-command-decision.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/monitor/exec-approvals.test.ts": { - "durationMs": 11300 - }, - "extensions/discord/src/monitor/gateway-error-guard.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/monitor/inbound-context.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/monitor/inbound-job.test.ts": { - "durationMs": 9 - }, - "extensions/discord/src/monitor/listeners.test.ts": { - "durationMs": 1300 - }, - "extensions/discord/src/monitor/message-handler.bot-self-filter.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/message-handler.inbound-context.test.ts": { - "durationMs": 9 - }, - "extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts": { - "durationMs": 11 - }, - "extensions/discord/src/monitor/message-handler.preflight.test.ts": { - "durationMs": 4100 - }, - "extensions/discord/src/monitor/message-handler.process.test.ts": { - "durationMs": 5700 - }, - "extensions/discord/src/monitor/message-handler.queue.test.ts": { - "durationMs": 3900 - }, - "extensions/discord/src/monitor/message-utils.test.ts": { - "durationMs": 6000 - }, - "extensions/discord/src/monitor/model-picker-preferences.test.ts": { - "durationMs": 14 - }, - "extensions/discord/src/monitor/model-picker.test.ts": { - "durationMs": 16 - }, - "extensions/discord/src/monitor/monitor.agent-components.test.ts": { - "durationMs": 13 - }, - "extensions/discord/src/monitor/monitor.test.ts": { - "durationMs": 19800 - }, - "extensions/discord/src/monitor/monitor.threading-utils.test.ts": { - "durationMs": 10 - }, - "extensions/discord/src/monitor/native-command-context.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/native-command.commands-allowfrom.test.ts": { - "durationMs": 17 - }, - "extensions/discord/src/monitor/native-command.model-picker.test.ts": { - "durationMs": 770 - }, - "extensions/discord/src/monitor/native-command.options.test.ts": { - "durationMs": 1100 - }, - "extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts": { - "durationMs": 2000 - }, - "extensions/discord/src/monitor/presence.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/monitor/provider.allowlist.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/provider.lifecycle.test.ts": { - "durationMs": 39 - }, - "extensions/discord/src/monitor/provider.proxy.test.ts": { - "durationMs": 13 - }, - "extensions/discord/src/monitor/provider.rest-proxy.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/provider.skill-dedupe.test.ts": { - "durationMs": 954 - }, - "extensions/discord/src/monitor/provider.test.ts": { - "durationMs": 5100 - }, - "extensions/discord/src/monitor/reply-delivery.test.ts": { - "durationMs": 6000 - }, - "extensions/discord/src/monitor/route-resolution.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/startup-status.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/thread-bindings.discord-api.test.ts": { - "durationMs": 1100 - }, - "extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts": { - "durationMs": 42 - }, - "extensions/discord/src/monitor/thread-bindings.persona.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/monitor/thread-bindings.shared-state.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/monitor/thread-session-close.test.ts": { - "durationMs": 130 - }, - "extensions/discord/src/monitor/threading.auto-thread.test.ts": { - "durationMs": 7 - }, - "extensions/discord/src/monitor/threading.parent-info.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/monitor/threading.starter.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/normalize.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/outbound-adapter.interactive-order.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/outbound-adapter.test.ts": { - "durationMs": 2300 - }, - "extensions/discord/src/pluralkit.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/probe.intents.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/probe.parse-token.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/resolve-allowlist-common.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/resolve-channels.test.ts": { - "durationMs": 9 - }, - "extensions/discord/src/resolve-users.test.ts": { - "durationMs": 10 - }, - "extensions/discord/src/send.components.test.ts": { - "durationMs": 511 - }, - "extensions/discord/src/send.creates-thread.test.ts": { - "durationMs": 4600 - }, - "extensions/discord/src/send.permissions.authz.test.ts": { - "durationMs": 8 - }, - "extensions/discord/src/send.sends-basic-channel-messages.test.ts": { - "durationMs": 5300 - }, - "extensions/discord/src/send.typing.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/send.webhook-activity.test.ts": { - "durationMs": 19380 - }, - "extensions/discord/src/session-key-normalization.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/setup-account-state.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/shared-interactive.test.ts": { - "durationMs": 3 - }, - "extensions/discord/src/status-issues.test.ts": { - "durationMs": 4 - }, - "extensions/discord/src/subagent-hooks.test.ts": { - "durationMs": 6 - }, - "extensions/discord/src/targets.test.ts": { - "durationMs": 8 - }, - "extensions/discord/src/token.test.ts": { - "durationMs": 5 - }, - "extensions/discord/src/voice-message.test.ts": { - "durationMs": 207 - }, - "extensions/discord/src/voice/command.test.ts": { - "durationMs": 4 - }, - "extensions/imessage/src/channel.outbound.test.ts": { - "durationMs": 10 - }, - "extensions/imessage/src/group-policy.test.ts": { - "durationMs": 3 - }, - "extensions/imessage/src/monitor.gating.test.ts": { - "durationMs": 9 - }, - "extensions/imessage/src/monitor.shutdown.unhandled-rejection.test.ts": { - "durationMs": 4 - }, - "extensions/imessage/src/monitor/deliver.test.ts": { - "durationMs": 220 - }, - "extensions/imessage/src/monitor/inbound-processing.test.ts": { - "durationMs": 10 - }, - "extensions/imessage/src/monitor/loop-rate-limiter.test.ts": { - "durationMs": 5 - }, - "extensions/imessage/src/monitor/monitor-provider.echo-cache.test.ts": { - "durationMs": 4 - }, - "extensions/imessage/src/monitor/reflection-guard.test.ts": { - "durationMs": 5 - }, - "extensions/imessage/src/monitor/sanitize-outbound.test.ts": { - "durationMs": 4 - }, - "extensions/imessage/src/monitor/self-chat-cache.test.ts": { - "durationMs": 6 - }, - "extensions/imessage/src/probe.test.ts": { - "durationMs": 3 - }, - "extensions/imessage/src/send.test.ts": { - "durationMs": 11 - }, - "extensions/imessage/src/setup-allow-from.test.ts": { - "durationMs": 3 - }, - "extensions/imessage/src/targets.test.ts": { - "durationMs": 7 - }, - "extensions/signal/src/channel.outbound.test.ts": { - "durationMs": 4 - }, - "extensions/signal/src/channel.test.ts": { - "durationMs": 4 - }, - "extensions/signal/src/client.test.ts": { - "durationMs": 8 - }, - "extensions/signal/src/format.chunking.test.ts": { - "durationMs": 18 - }, - "extensions/signal/src/format.links.test.ts": { - "durationMs": 10 - }, - "extensions/signal/src/format.test.ts": { - "durationMs": 13 - }, - "extensions/signal/src/format.visual.test.ts": { - "durationMs": 9 - }, - "extensions/signal/src/identity.test.ts": { - "durationMs": 4 - }, - "extensions/signal/src/monitor.test.ts": { - "durationMs": 3 - }, - "extensions/signal/src/monitor.tool-result.autostart.test.ts": { - "durationMs": 7 - }, - "extensions/signal/src/monitor.tool-result.pairs-uuid-only-senders-uuid-allowlist-entry.test.ts": { - "durationMs": 379 - }, - "extensions/signal/src/monitor.tool-result.sends-tool-summaries-responseprefix.test.ts": { - "durationMs": 129 - }, - "extensions/signal/src/monitor/access-policy.test.ts": { - "durationMs": 6 - }, - "extensions/signal/src/monitor/event-handler.inbound-context.test.ts": { - "durationMs": 1300 - }, - "extensions/signal/src/monitor/event-handler.mention-gating.test.ts": { - "durationMs": 1900 - }, - "extensions/signal/src/probe.test.ts": { - "durationMs": 4 - }, - "extensions/signal/src/send-reactions.test.ts": { - "durationMs": 62 - }, - "extensions/signal/src/setup-allow-from.test.ts": { - "durationMs": 5 - }, - "extensions/slack/src/accounts.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/action-runtime.test.ts": { - "durationMs": 15 - }, - "extensions/slack/src/actions.blocks.test.ts": { - "durationMs": 7 - }, - "extensions/slack/src/actions.download-file.test.ts": { - "durationMs": 838 - }, - "extensions/slack/src/actions.read.test.ts": { - "durationMs": 5 - }, - "extensions/slack/src/blocks-fallback.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/blocks-input.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/channel-migration.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/channel.test.ts": { - "durationMs": 12 - }, - "extensions/slack/src/client.test.ts": { - "durationMs": 8 - }, - "extensions/slack/src/draft-stream.test.ts": { - "durationMs": 5 - }, - "extensions/slack/src/format.test.ts": { - "durationMs": 12 - }, - "extensions/slack/src/group-policy.test.ts": { - "durationMs": 5 - }, - "extensions/slack/src/http/registry.test.ts": { - "durationMs": 5 - }, - "extensions/slack/src/interactive-replies.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/message-action-dispatch.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/message-actions.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/modal-metadata.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/monitor.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/monitor.threading.missing-thread-ts.test.ts": { - "durationMs": 570 - }, - "extensions/slack/src/monitor.tool-result.test.ts": { - "durationMs": 4300 - }, - "extensions/slack/src/monitor/allow-list.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/monitor/auth.test.ts": { - "durationMs": 981 - }, - "extensions/slack/src/monitor/context.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/monitor/events/channels.test.ts": { - "durationMs": 504 - }, - "extensions/slack/src/monitor/events/interactions.test.ts": { - "durationMs": 5100 - }, - "extensions/slack/src/monitor/events/members.test.ts": { - "durationMs": 1200 - }, - "extensions/slack/src/monitor/events/message-subtype-handlers.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/monitor/events/messages.test.ts": { - "durationMs": 1700 - }, - "extensions/slack/src/monitor/events/pins.test.ts": { - "durationMs": 1200 - }, - "extensions/slack/src/monitor/events/reactions.test.ts": { - "durationMs": 2200 - }, - "extensions/slack/src/monitor/media.test.ts": { - "durationMs": 74 - }, - "extensions/slack/src/monitor/message-handler.app-mention-race.test.ts": { - "durationMs": 753 - }, - "extensions/slack/src/monitor/message-handler.debounce-key.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/monitor/message-handler.test.ts": { - "durationMs": 967 - }, - "extensions/slack/src/monitor/message-handler/dispatch.streaming.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/monitor/message-handler/prepare.test.ts": { - "durationMs": 68 - }, - "extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts": { - "durationMs": 24 - }, - "extensions/slack/src/monitor/monitor.test.ts": { - "durationMs": 42 - }, - "extensions/slack/src/monitor/provider.auth-errors.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/monitor/provider.interop.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/monitor/provider.reconnect.test.ts": { - "durationMs": 5 - }, - "extensions/slack/src/monitor/replies.test.ts": { - "durationMs": 713 - }, - "extensions/slack/src/monitor/slash.test.ts": { - "durationMs": 12500 - }, - "extensions/slack/src/outbound-adapter.test.ts": { - "durationMs": 4630 - }, - "extensions/slack/src/probe.test.ts": { - "durationMs": 8 - }, - "extensions/slack/src/resolve-allowlist-common.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/resolve-channels.test.ts": { - "durationMs": 3 - }, - "extensions/slack/src/resolve-users.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/send.blocks.test.ts": { - "durationMs": 21 - }, - "extensions/slack/src/send.upload.test.ts": { - "durationMs": 10010 - }, - "extensions/slack/src/sent-thread-cache.test.ts": { - "durationMs": 78 - }, - "extensions/slack/src/shared-interactive.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/stream-mode.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/targets.test.ts": { - "durationMs": 100 - }, - "extensions/slack/src/threading-tool-context.test.ts": { - "durationMs": 4 - }, - "extensions/slack/src/threading.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/accounts.test.ts": { - "durationMs": 3 - }, - "extensions/whatsapp/src/accounts.whatsapp-auth.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/action-runtime.test.ts": { - "durationMs": 6 - }, - "extensions/whatsapp/src/active-listener.test.ts": { - "durationMs": 11 - }, - "extensions/whatsapp/src/auto-reply.broadcast-groups.combined.test.ts": { - "durationMs": 120 - }, - "extensions/whatsapp/src/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts": { - "durationMs": 1500 - }, - "extensions/whatsapp/src/auto-reply.web-auto-reply.last-route.test.ts": { - "durationMs": 434 - }, - "extensions/whatsapp/src/auto-reply/deliver-reply.test.ts": { - "durationMs": 10260 - }, - "extensions/whatsapp/src/auto-reply/heartbeat-runner.test.ts": { - "durationMs": 1700 - }, - "extensions/whatsapp/src/auto-reply/monitor/group-members.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/auto-reply/monitor/process-message.inbound-context.test.ts": { - "durationMs": 2500 - }, - "extensions/whatsapp/src/auto-reply/web-auto-reply-monitor.test.ts": { - "durationMs": 12 - }, - "extensions/whatsapp/src/auto-reply/web-auto-reply-utils.test.ts": { - "durationMs": 12 - }, - "extensions/whatsapp/src/channel.directory.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/channel.outbound.test.ts": { - "durationMs": 335 - }, - "extensions/whatsapp/src/channel.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/group-policy.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/inbound.media.test.ts": { - "durationMs": 627 - }, - "extensions/whatsapp/src/inbound.test.ts": { - "durationMs": 4400 - }, - "extensions/whatsapp/src/inbound/access-control.test.ts": { - "durationMs": 1600 - }, - "extensions/whatsapp/src/inbound/media.node.test.ts": { - "durationMs": 90 - }, - "extensions/whatsapp/src/inbound/send-api.test.ts": { - "durationMs": 732 - }, - "extensions/whatsapp/src/login-qr.test.ts": { - "durationMs": 6 - }, - "extensions/whatsapp/src/login.coverage.test.ts": { - "durationMs": 8 - }, - "extensions/whatsapp/src/login.test.ts": { - "durationMs": 350 - }, - "extensions/whatsapp/src/logout.test.ts": { - "durationMs": 7 - }, - "extensions/whatsapp/src/media.test.ts": { - "durationMs": 4600 - }, - "extensions/whatsapp/src/monitor-inbox.allows-messages-from-senders-allowfrom-list.test.ts": { - "durationMs": 1400 - }, - "extensions/whatsapp/src/monitor-inbox.append-upsert.test.ts": { - "durationMs": 999 - }, - "extensions/whatsapp/src/monitor-inbox.blocks-messages-from-unauthorized-senders-not-allowfrom.test.ts": { - "durationMs": 2100 - }, - "extensions/whatsapp/src/monitor-inbox.captures-media-path-image-messages.test.ts": { - "durationMs": 3200 - }, - "extensions/whatsapp/src/monitor-inbox.streams-inbound-messages.test.ts": { - "durationMs": 1600 - }, - "extensions/whatsapp/src/normalize-target.test.ts": { - "durationMs": 5 - }, - "extensions/whatsapp/src/outbound-adapter.poll.test.ts": { - "durationMs": 17860 - }, - "extensions/whatsapp/src/outbound-adapter.sendpayload.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/reconnect.test.ts": { - "durationMs": 4 - }, - "extensions/whatsapp/src/resolve-outbound-target.test.ts": { - "durationMs": 18 - }, - "extensions/whatsapp/src/resolve-target.test.ts": { - "durationMs": 1600 - }, - "extensions/whatsapp/src/send.test.ts": { - "durationMs": 2700 - }, - "extensions/whatsapp/src/session.test.ts": { - "durationMs": 479 - }, - "extensions/whatsapp/src/setup-surface.test.ts": { - "durationMs": 1400 - }, - "extensions/whatsapp/src/status-issues.test.ts": { - "durationMs": 4 - }, - "src/browser/bridge-server.auth.test.ts": { - "durationMs": 94 - }, - "src/browser/browser-utils.test.ts": { - "durationMs": 7 - }, - "src/browser/cdp-proxy-bypass.test.ts": { - "durationMs": 119 - }, - "src/browser/cdp-timeouts.test.ts": { - "durationMs": 3 - }, - "src/browser/cdp.test.ts": { - "durationMs": 39 - }, - "src/browser/chrome-mcp.snapshot.test.ts": { - "durationMs": 3 - }, - "src/browser/chrome-mcp.test.ts": { - "durationMs": 7 - }, - "src/browser/chrome.default-browser.test.ts": { - "durationMs": 5 - }, - "src/browser/chrome.launch-args.test.ts": { - "durationMs": 3 - }, - "src/browser/chrome.test.ts": { - "durationMs": 324 - }, - "src/browser/client-fetch.loopback-auth.test.ts": { - "durationMs": 101 - }, - "src/browser/client.test.ts": { - "durationMs": 10 - }, - "src/browser/config.test.ts": { - "durationMs": 8 - }, - "src/browser/control-auth.auto-token.test.ts": { - "durationMs": 85 - }, - "src/browser/control-auth.test.ts": { - "durationMs": 4 - }, - "src/browser/navigation-guard.test.ts": { - "durationMs": 16 - }, - "src/browser/paths.test.ts": { - "durationMs": 11 - }, - "src/browser/profiles-service.test.ts": { - "durationMs": 32 - }, - "src/browser/profiles.test.ts": { - "durationMs": 7 - }, - "src/browser/proxy-files.test.ts": { - "durationMs": 11 - }, - "src/browser/pw-role-snapshot.test.ts": { - "durationMs": 5 - }, - "src/browser/pw-session.connections.test.ts": { - "durationMs": 55 - }, - "src/browser/pw-session.create-page.navigation-guard.test.ts": { - "durationMs": 6 - }, - "src/browser/pw-session.get-page-for-targetid.extension-fallback.test.ts": { - "durationMs": 9 - }, - "src/browser/pw-session.page-cdp.test.ts": { - "durationMs": 3 - }, - "src/browser/pw-session.test.ts": { - "durationMs": 6 - }, - "src/browser/pw-tools-core.clamps-timeoutms-scrollintoview.test.ts": { - "durationMs": 610 - }, - "src/browser/pw-tools-core.interactions.batch.test.ts": { - "durationMs": 12 - }, - "src/browser/pw-tools-core.interactions.evaluate.abort.test.ts": { - "durationMs": 122 - }, - "src/browser/pw-tools-core.interactions.set-input-files.test.ts": { - "durationMs": 127 - }, - "src/browser/pw-tools-core.last-file-chooser-arm-wins.test.ts": { - "durationMs": 383 - }, - "src/browser/pw-tools-core.screenshots-element-selector.test.ts": { - "durationMs": 1000 - }, - "src/browser/pw-tools-core.snapshot.navigate-guard.test.ts": { - "durationMs": 11 - }, - "src/browser/pw-tools-core.waits-next-download-saves-it.test.ts": { - "durationMs": 677 - }, - "src/browser/routes/agent.existing-session.test.ts": { - "durationMs": 19 - }, - "src/browser/routes/agent.shared.test.ts": { - "durationMs": 3 - }, - "src/browser/routes/agent.snapshot.plan.test.ts": { - "durationMs": 4 - }, - "src/browser/routes/agent.snapshot.test.ts": { - "durationMs": 1600 - }, - "src/browser/routes/agent.storage.test.ts": { - "durationMs": 3 - }, - "src/browser/routes/basic.existing-session.test.ts": { - "durationMs": 221 - }, - "src/browser/routes/dispatcher.abort.test.ts": { - "durationMs": 8 - }, - "src/browser/screenshot.test.ts": { - "durationMs": 108 - }, - "src/browser/server-context.ensure-browser-available.waits-for-cdp-ready.test.ts": { - "durationMs": 8 - }, - "src/browser/server-context.existing-session.test.ts": { - "durationMs": 67 - }, - "src/browser/server-context.hot-reload-profiles.test.ts": { - "durationMs": 11 - }, - "src/browser/server-context.loopback-direct-ws.test.ts": { - "durationMs": 8 - }, - "src/browser/server-context.remote-profile-tab-ops.test.ts": { - "durationMs": 740 - }, - "src/browser/server-context.remote-tab-ops.test.ts": { - "durationMs": 1500 - }, - "src/browser/server-context.reset.test.ts": { - "durationMs": 14 - }, - "src/browser/server-context.tab-selection-state.test.ts": { - "durationMs": 115 - }, - "src/browser/server-lifecycle.test.ts": { - "durationMs": 9 - }, - "src/browser/server.agent-contract-form-layout-act-commands.test.ts": { - "durationMs": 282 - }, - "src/browser/server.agent-contract-snapshot-endpoints.test.ts": { - "durationMs": 982 - }, - "src/browser/server.auth-fail-closed.test.ts": { - "durationMs": 63 - }, - "src/browser/server.auth-token-gates-http.test.ts": { - "durationMs": 20 - }, - "src/browser/server.evaluate-disabled-does-not-block-storage.test.ts": { - "durationMs": 122 - }, - "src/browser/server.post-tabs-open-profile-unknown-returns-404.test.ts": { - "durationMs": 159 - }, - "src/browser/session-tab-registry.test.ts": { - "durationMs": 4 - }, - "src/browser/url-pattern.test.ts": { - "durationMs": 3 - } - } -} diff --git a/test/fixtures/test-timings.extensions.json b/test/fixtures/test-timings.extensions.json deleted file mode 100644 index d964ce71dba..00000000000 --- a/test/fixtures/test-timings.extensions.json +++ /dev/null @@ -1,1302 +0,0 @@ -{ - "config": "vitest.extensions.config.ts", - "generatedAt": "2026-04-03T10:15:21.663Z", - "defaultDurationMs": 1000, - "files": { - "extensions/acpx/src/config.test.ts": { - "durationMs": 7.31298828125, - "testCount": 13 - }, - "extensions/acpx/src/ensure.test.ts": { - "durationMs": 4.14990234375, - "testCount": 10 - }, - "extensions/acpx/src/runtime-internals/mcp-proxy.test.ts": { - "durationMs": 152.1640625, - "testCount": 1 - }, - "extensions/acpx/src/runtime-internals/process.test.ts": { - "durationMs": 357.69775390625, - "testCount": 16 - }, - "extensions/acpx/src/runtime.test.ts": { - "durationMs": 4928.570556640625, - "testCount": 22 - }, - "extensions/acpx/src/service.test.ts": { - "durationMs": 2.209228515625, - "testCount": 5 - }, - "extensions/bluebubbles/src/actions.test.ts": { - "durationMs": 27.385009765625, - "testCount": 29 - }, - "extensions/bluebubbles/src/attachments.test.ts": { - "durationMs": 11.833984375, - "testCount": 27 - }, - "extensions/bluebubbles/src/chat.test.ts": { - "durationMs": 12.222900390625, - "testCount": 37 - }, - "extensions/bluebubbles/src/media-send.test.ts": { - "durationMs": 19.399658203125, - "testCount": 10 - }, - "extensions/bluebubbles/src/monitor-self-chat-cache.test.ts": { - "durationMs": 7.2880859375, - "testCount": 6 - }, - "extensions/bluebubbles/src/monitor.test.ts": { - "durationMs": 453.485595703125, - "testCount": 64 - }, - "extensions/bluebubbles/src/monitor.webhook-auth.test.ts": { - "durationMs": 93900, - "testCount": 19 - }, - "extensions/bluebubbles/src/participant-contact-names.test.ts": { - "durationMs": 3.0771484375, - "testCount": 8 - }, - "extensions/bluebubbles/src/reactions.test.ts": { - "durationMs": 10.1005859375, - "testCount": 46 - }, - "extensions/bluebubbles/src/send.test.ts": { - "durationMs": 13.150146484375, - "testCount": 47 - }, - "extensions/bluebubbles/src/setup-surface.test.ts": { - "durationMs": 14.174560546875, - "testCount": 43 - }, - "extensions/device-pair/index.test.ts": { - "durationMs": 50.2451171875, - "testCount": 15 - }, - "extensions/diagnostics-otel/src/service.test.ts": { - "durationMs": 5.76513671875, - "testCount": 8 - }, - "extensions/diffs/src/browser.test.ts": { - "durationMs": 17.973876953125, - "testCount": 6 - }, - "extensions/diffs/src/config.test.ts": { - "durationMs": 187.2568359375, - "testCount": 24 - }, - "extensions/diffs/src/store.test.ts": { - "durationMs": 88.814453125, - "testCount": 20 - }, - "extensions/diffs/src/tool.test.ts": { - "durationMs": 197.076171875, - "testCount": 16 - }, - "extensions/duckduckgo/src/ddg-search-provider.test.ts": { - "durationMs": 2.543701171875, - "testCount": 8 - }, - "extensions/exa/src/exa-web-search-provider.test.ts": { - "durationMs": 2.3779296875, - "testCount": 10 - }, - "extensions/fal/image-generation-provider.test.ts": { - "durationMs": 2.342041015625, - "testCount": 6 - }, - "extensions/feishu/src/accounts.test.ts": { - "durationMs": 2.158447265625, - "testCount": 22 - }, - "extensions/feishu/src/bot.broadcast.test.ts": { - "durationMs": 216.171875, - "testCount": 6 - }, - "extensions/feishu/src/bot.card-action.test.ts": { - "durationMs": 5.676513671875, - "testCount": 12 - }, - "extensions/feishu/src/bot.checkBotMentioned.test.ts": { - "durationMs": 2.40869140625, - "testCount": 15 - }, - "extensions/feishu/src/bot.test.ts": { - "durationMs": 1024.728759765625, - "testCount": 48 - }, - "extensions/feishu/src/card-interaction.test.ts": { - "durationMs": 3.349609375, - "testCount": 6 - }, - "extensions/feishu/src/card-ux-launcher.test.ts": { - "durationMs": 8.009033203125, - "testCount": 4 - }, - "extensions/feishu/src/channel.test.ts": { - "durationMs": 10.119384765625, - "testCount": 43 - }, - "extensions/feishu/src/chat.test.ts": { - "durationMs": 2.409423828125, - "testCount": 2 - }, - "extensions/feishu/src/client.test.ts": { - "durationMs": 231.306884765625, - "testCount": 15 - }, - "extensions/feishu/src/config-schema.test.ts": { - "durationMs": 5.198974609375, - "testCount": 22 - }, - "extensions/feishu/src/docx-batch-insert.test.ts": { - "durationMs": 3.28759765625, - "testCount": 2 - }, - "extensions/feishu/src/docx.account-selection.test.ts": { - "durationMs": 2.19189453125, - "testCount": 2 - }, - "extensions/feishu/src/docx.test.ts": { - "durationMs": 130.966796875, - "testCount": 13 - }, - "extensions/feishu/src/media.test.ts": { - "durationMs": 11.277099609375, - "testCount": 30 - }, - "extensions/feishu/src/monitor.acp-init-failure.lifecycle.test.ts": { - "durationMs": 129.5693359375, - "testCount": 2 - }, - "extensions/feishu/src/monitor.bot-menu.lifecycle.test.ts": { - "durationMs": 56.537353515625, - "testCount": 2 - }, - "extensions/feishu/src/monitor.bot-menu.test.ts": { - "durationMs": 110.828369140625, - "testCount": 4 - }, - "extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts": { - "durationMs": 116.278564453125, - "testCount": 2 - }, - "extensions/feishu/src/monitor.card-action.lifecycle.test.ts": { - "durationMs": 110.7607421875, - "testCount": 2 - }, - "extensions/feishu/src/monitor.cleanup.test.ts": { - "durationMs": 2.2841796875, - "testCount": 3 - }, - "extensions/feishu/src/monitor.reaction.test.ts": { - "durationMs": 22.403564453125, - "testCount": 23 - }, - "extensions/feishu/src/monitor.reply-once.lifecycle.test.ts": { - "durationMs": 129.031005859375, - "testCount": 2 - }, - "extensions/feishu/src/monitor.startup.test.ts": { - "durationMs": 3.647216796875, - "testCount": 4 - }, - "extensions/feishu/src/monitor.webhook-e2e.test.ts": { - "durationMs": 214.897705078125, - "testCount": 8 - }, - "extensions/feishu/src/monitor.webhook-security.test.ts": { - "durationMs": 5187.25, - "testCount": 8 - }, - "extensions/feishu/src/outbound.test.ts": { - "durationMs": 128.026611328125, - "testCount": 13 - }, - "extensions/feishu/src/probe.test.ts": { - "durationMs": 16.581298828125, - "testCount": 16 - }, - "extensions/feishu/src/reply-dispatcher.test.ts": { - "durationMs": 62.144775390625, - "testCount": 29 - }, - "extensions/feishu/src/send.reply-fallback.test.ts": { - "durationMs": 16.70458984375, - "testCount": 10 - }, - "extensions/feishu/src/send.test.ts": { - "durationMs": 3.1298828125, - "testCount": 10 - }, - "extensions/feishu/src/subagent-hooks.test.ts": { - "durationMs": 3.2177734375, - "testCount": 12 - }, - "extensions/feishu/src/tool-account-routing.test.ts": { - "durationMs": 3.581787109375, - "testCount": 5 - }, - "extensions/firecrawl/src/firecrawl-tools.test.ts": { - "durationMs": 4.3115234375, - "testCount": 14 - }, - "extensions/github-copilot/models.test.ts": { - "durationMs": 10.251953125, - "testCount": 20 - }, - "extensions/google/google-shared.test.ts": { - "durationMs": 4.324951171875, - "testCount": 11 - }, - "extensions/google/image-generation-provider.test.ts": { - "durationMs": 23.315185546875, - "testCount": 7 - }, - "extensions/google/oauth.test.ts": { - "durationMs": 127.036376953125, - "testCount": 8 - }, - "extensions/googlechat/src/actions.test.ts": { - "durationMs": 2.63623046875, - "testCount": 3 - }, - "extensions/googlechat/src/channel.test.ts": { - "durationMs": 9.51123046875, - "testCount": 11 - }, - "extensions/googlechat/src/monitor-access.test.ts": { - "durationMs": 4.29150390625, - "testCount": 5 - }, - "extensions/googlechat/src/monitor-webhook.test.ts": { - "durationMs": 2.45458984375, - "testCount": 2 - }, - "extensions/googlechat/src/monitor.webhook-routing.test.ts": { - "durationMs": 2.7568359375, - "testCount": 5 - }, - "extensions/googlechat/src/setup.test.ts": { - "durationMs": 67.10302734375, - "testCount": 11 - }, - "extensions/googlechat/src/targets.test.ts": { - "durationMs": 28.31982421875, - "testCount": 17 - }, - "extensions/irc/src/accounts.test.ts": { - "durationMs": 5.873046875, - "testCount": 9 - }, - "extensions/irc/src/inbound.behavior.test.ts": { - "durationMs": 5.007568359375, - "testCount": 2 - }, - "extensions/irc/src/send.test.ts": { - "durationMs": 3.75048828125, - "testCount": 2 - }, - "extensions/irc/src/setup.test.ts": { - "durationMs": 5.7607421875, - "testCount": 8 - }, - "extensions/line/src/accounts.test.ts": { - "durationMs": 8.2021484375, - "testCount": 13 - }, - "extensions/line/src/auto-reply-delivery.test.ts": { - "durationMs": 2.24951171875, - "testCount": 4 - }, - "extensions/line/src/bot-handlers.test.ts": { - "durationMs": 13272, - "testCount": 23 - }, - "extensions/line/src/bot-message-context.test.ts": { - "durationMs": 9155, - "testCount": 14 - }, - "extensions/line/src/channel.sendPayload.test.ts": { - "durationMs": 5.55517578125, - "testCount": 7 - }, - "extensions/line/src/download.test.ts": { - "durationMs": 7.52587890625, - "testCount": 4 - }, - "extensions/line/src/markdown-to-line.test.ts": { - "durationMs": 158.2265625, - "testCount": 18 - }, - "extensions/line/src/message-cards.test.ts": { - "durationMs": 2.19970703125, - "testCount": 18 - }, - "extensions/line/src/monitor.lifecycle.test.ts": { - "durationMs": 62.67041015625, - "testCount": 5 - }, - "extensions/line/src/rich-menu.test.ts": { - "durationMs": 3.264892578125, - "testCount": 13 - }, - "extensions/line/src/send.test.ts": { - "durationMs": 71.626708984375, - "testCount": 8 - }, - "extensions/line/src/setup-surface.test.ts": { - "durationMs": 12208.14111328125, - "testCount": 8 - }, - "extensions/line/src/webhook-node.test.ts": { - "durationMs": 8.2236328125, - "testCount": 28 - }, - "extensions/llm-task/src/llm-task-tool.test.ts": { - "durationMs": 15.7490234375, - "testCount": 13 - }, - "extensions/lobster/src/lobster-tool.test.ts": { - "durationMs": 31.674560546875, - "testCount": 17 - }, - "extensions/matrix/src/actions.test.ts": { - "durationMs": 2.389404296875, - "testCount": 4 - }, - "extensions/matrix/src/channel.account-paths.test.ts": { - "durationMs": 29.037841796875, - "testCount": 2 - }, - "extensions/matrix/src/channel.directory.test.ts": { - "durationMs": 6.139892578125, - "testCount": 18 - }, - "extensions/matrix/src/channel.setup.test.ts": { - "durationMs": 2.178466796875, - "testCount": 6 - }, - "extensions/matrix/src/cli.test.ts": { - "durationMs": 21762, - "testCount": 25 - }, - "extensions/matrix/src/matrix/accounts.test.ts": { - "durationMs": 18285, - "testCount": 16 - }, - "extensions/matrix/src/matrix/actions/client.test.ts": { - "durationMs": 6.365478515625, - "testCount": 10 - }, - "extensions/matrix/src/matrix/actions/devices.test.ts": { - "durationMs": 27.01171875, - "testCount": 2 - }, - "extensions/matrix/src/matrix/actions/messages.test.ts": { - "durationMs": 4.765869140625, - "testCount": 3 - }, - "extensions/matrix/src/matrix/actions/profile.test.ts": { - "durationMs": 3.1572265625, - "testCount": 2 - }, - "extensions/matrix/src/matrix/actions/verification.test.ts": { - "durationMs": 31.3134765625, - "testCount": 3 - }, - "extensions/matrix/src/matrix/client-bootstrap.test.ts": { - "durationMs": 25.3876953125, - "testCount": 2 - }, - "extensions/matrix/src/matrix/client.test.ts": { - "durationMs": 12.445556640625, - "testCount": 27 - }, - "extensions/matrix/src/matrix/client/file-sync-store.test.ts": { - "durationMs": 104.33837890625, - "testCount": 7 - }, - "extensions/matrix/src/matrix/client/shared.test.ts": { - "durationMs": 2.3037109375, - "testCount": 7 - }, - "extensions/matrix/src/matrix/client/storage.test.ts": { - "durationMs": 17251, - "testCount": 13 - }, - "extensions/matrix/src/matrix/credentials.test.ts": { - "durationMs": 51.688720703125, - "testCount": 6 - }, - "extensions/matrix/src/matrix/direct-management.test.ts": { - "durationMs": 2.3056640625, - "testCount": 5 - }, - "extensions/matrix/src/matrix/draft-stream.test.ts": { - "durationMs": 12308, - "testCount": 13 - }, - "extensions/matrix/src/matrix/format.test.ts": { - "durationMs": 12.230712890625, - "testCount": 7 - }, - "extensions/matrix/src/matrix/monitor/config.test.ts": { - "durationMs": 2.448486328125, - "testCount": 3 - }, - "extensions/matrix/src/matrix/monitor/direct.test.ts": { - "durationMs": 6.345458984375, - "testCount": 10 - }, - "extensions/matrix/src/matrix/monitor/events.test.ts": { - "durationMs": 2489.9775390625, - "testCount": 29 - }, - "extensions/matrix/src/matrix/monitor/handler.media-failure.test.ts": { - "durationMs": 5.376708984375, - "testCount": 3 - }, - "extensions/matrix/src/matrix/monitor/handler.test.ts": { - "durationMs": 16.2109375, - "testCount": 35 - }, - "extensions/matrix/src/matrix/monitor/handler.thread-root-media.test.ts": { - "durationMs": 3.34228515625, - "testCount": 1 - }, - "extensions/matrix/src/matrix/monitor/inbound-dedupe.test.ts": { - "durationMs": 36.56787109375, - "testCount": 5 - }, - "extensions/matrix/src/matrix/monitor/index.test.ts": { - "durationMs": 23302.03173828125, - "testCount": 8 - }, - "extensions/matrix/src/matrix/monitor/legacy-crypto-restore.test.ts": { - "durationMs": 59.12890625, - "testCount": 3 - }, - "extensions/matrix/src/matrix/monitor/media.test.ts": { - "durationMs": 3.75048828125, - "testCount": 3 - }, - "extensions/matrix/src/matrix/monitor/replies.test.ts": { - "durationMs": 16.81591796875, - "testCount": 5 - }, - "extensions/matrix/src/matrix/monitor/room-info.test.ts": { - "durationMs": 4.869384765625, - "testCount": 2 - }, - "extensions/matrix/src/matrix/monitor/rooms.test.ts": { - "durationMs": 3.2021484375, - "testCount": 8 - }, - "extensions/matrix/src/matrix/monitor/route.test.ts": { - "durationMs": 3.331298828125, - "testCount": 4 - }, - "extensions/matrix/src/matrix/monitor/startup-verification.test.ts": { - "durationMs": 109.208984375, - "testCount": 9 - }, - "extensions/matrix/src/matrix/poll-types.test.ts": { - "durationMs": 2.288818359375, - "testCount": 9 - }, - "extensions/matrix/src/matrix/probe.test.ts": { - "durationMs": 45.84521484375, - "testCount": 4 - }, - "extensions/matrix/src/matrix/profile.test.ts": { - "durationMs": 2.194091796875, - "testCount": 7 - }, - "extensions/matrix/src/matrix/sdk.test.ts": { - "durationMs": 131.332275390625, - "testCount": 53 - }, - "extensions/matrix/src/matrix/sdk/crypto-bootstrap.test.ts": { - "durationMs": 16.513427734375, - "testCount": 14 - }, - "extensions/matrix/src/matrix/sdk/http-client.test.ts": { - "durationMs": 2.269287109375, - "testCount": 4 - }, - "extensions/matrix/src/matrix/sdk/idb-persistence.test.ts": { - "durationMs": 11.326416015625, - "testCount": 3 - }, - "extensions/matrix/src/matrix/sdk/recovery-key-store.test.ts": { - "durationMs": 16.29443359375, - "testCount": 10 - }, - "extensions/matrix/src/matrix/sdk/transport.test.ts": { - "durationMs": 2.64013671875, - "testCount": 3 - }, - "extensions/matrix/src/matrix/sdk/verification-manager.test.ts": { - "durationMs": 5.420654296875, - "testCount": 12 - }, - "extensions/matrix/src/matrix/send.test.ts": { - "durationMs": 15471, - "testCount": 17 - }, - "extensions/matrix/src/matrix/send/client.test.ts": { - "durationMs": 3.352294921875, - "testCount": 5 - }, - "extensions/matrix/src/matrix/send/targets.test.ts": { - "durationMs": 3.356689453125, - "testCount": 9 - }, - "extensions/matrix/src/matrix/thread-bindings.test.ts": { - "durationMs": 14053, - "testCount": 11 - }, - "extensions/matrix/src/onboarding.resolve.test.ts": { - "durationMs": 4.39111328125, - "testCount": 1 - }, - "extensions/matrix/src/onboarding.test.ts": { - "durationMs": 6.2275390625, - "testCount": 9 - }, - "extensions/matrix/src/plugin-entry.runtime.test.ts": { - "durationMs": 6500, - "testCount": 1 - }, - "extensions/matrix/src/tool-actions.test.ts": { - "durationMs": 6.29541015625, - "testCount": 15 - }, - "extensions/mattermost/src/channel.test.ts": { - "durationMs": 5.1962890625, - "testCount": 21 - }, - "extensions/mattermost/src/config-schema.test.ts": { - "durationMs": 3.12548828125, - "testCount": 5 - }, - "extensions/mattermost/src/dm-policy.contract.test.ts": { - "durationMs": 15349, - "testCount": 2 - }, - "extensions/mattermost/src/mattermost/client.retry.test.ts": { - "durationMs": 9816, - "testCount": 17 - }, - "extensions/mattermost/src/mattermost/client.test.ts": { - "durationMs": 3.18212890625, - "testCount": 19 - }, - "extensions/mattermost/src/mattermost/directory.test.ts": { - "durationMs": 14.81591796875, - "testCount": 3 - }, - "extensions/mattermost/src/mattermost/interactions.test.ts": { - "durationMs": 7.303466796875, - "testCount": 48 - }, - "extensions/mattermost/src/mattermost/model-picker.test.ts": { - "durationMs": 5.98388671875, - "testCount": 8 - }, - "extensions/mattermost/src/mattermost/monitor-slash.test.ts": { - "durationMs": 3.272216796875, - "testCount": 3 - }, - "extensions/mattermost/src/mattermost/monitor-websocket.test.ts": { - "durationMs": 2.91259765625, - "testCount": 3 - }, - "extensions/mattermost/src/mattermost/probe.test.ts": { - "durationMs": 2.155517578125, - "testCount": 5 - }, - "extensions/mattermost/src/mattermost/reconnect.test.ts": { - "durationMs": 81.615478515625, - "testCount": 9 - }, - "extensions/mattermost/src/mattermost/reply-delivery.test.ts": { - "durationMs": 2.433349609375, - "testCount": 2 - }, - "extensions/mattermost/src/mattermost/send.test.ts": { - "durationMs": 102.6015625, - "testCount": 30 - }, - "extensions/mattermost/src/mattermost/slash-commands.test.ts": { - "durationMs": 3.384765625, - "testCount": 9 - }, - "extensions/mattermost/src/mattermost/slash-http.test.ts": { - "durationMs": 5006.665283203125, - "testCount": 5 - }, - "extensions/mattermost/src/mattermost/target-resolution.test.ts": { - "durationMs": 2.23291015625, - "testCount": 4 - }, - "extensions/mattermost/src/normalize.test.ts": { - "durationMs": 2.20361328125, - "testCount": 17 - }, - "extensions/memory-lancedb/index.test.ts": { - "durationMs": 349.611328125, - "testCount": 18 - }, - "extensions/microsoft-foundry/index.test.ts": { - "durationMs": 41.1240234375, - "testCount": 22 - }, - "extensions/msteams/src/attachments.test.ts": { - "durationMs": 62.111083984375, - "testCount": 16 - }, - "extensions/msteams/src/attachments/shared.test.ts": { - "durationMs": 6.132568359375, - "testCount": 30 - }, - "extensions/msteams/src/channel.actions.test.ts": { - "durationMs": 3.152099609375, - "testCount": 9 - }, - "extensions/msteams/src/channel.directory.test.ts": { - "durationMs": 3.23876953125, - "testCount": 8 - }, - "extensions/msteams/src/conversation-store-fs.test.ts": { - "durationMs": 151.787353515625, - "testCount": 4 - }, - "extensions/msteams/src/directory-live.test.ts": { - "durationMs": 37.424560546875, - "testCount": 3 - }, - "extensions/msteams/src/errors.test.ts": { - "durationMs": 2.15673828125, - "testCount": 13 - }, - "extensions/msteams/src/feedback-reflection.test.ts": { - "durationMs": 5.866943359375, - "testCount": 16 - }, - "extensions/msteams/src/file-consent-helpers.test.ts": { - "durationMs": 2.226806640625, - "testCount": 20 - }, - "extensions/msteams/src/graph-messages.test.ts": { - "durationMs": 6.111083984375, - "testCount": 35 - }, - "extensions/msteams/src/graph-thread.test.ts": { - "durationMs": 3.069580078125, - "testCount": 23 - }, - "extensions/msteams/src/graph-upload.test.ts": { - "durationMs": 3.170166015625, - "testCount": 10 - }, - "extensions/msteams/src/graph.test.ts": { - "durationMs": 14.23095703125, - "testCount": 10 - }, - "extensions/msteams/src/inbound.test.ts": { - "durationMs": 2.172607421875, - "testCount": 25 - }, - "extensions/msteams/src/media-helpers.test.ts": { - "durationMs": 6.070556640625, - "testCount": 39 - }, - "extensions/msteams/src/mentions.test.ts": { - "durationMs": 3.082763671875, - "testCount": 20 - }, - "extensions/msteams/src/messenger.test.ts": { - "durationMs": 12.3515625, - "testCount": 19 - }, - "extensions/msteams/src/monitor-handler.feedback-authz.test.ts": { - "durationMs": 11.26171875, - "testCount": 4 - }, - "extensions/msteams/src/monitor-handler.file-consent.test.ts": { - "durationMs": 2.759765625, - "testCount": 3 - }, - "extensions/msteams/src/monitor-handler/message-handler.authz.test.ts": { - "durationMs": 5.469970703125, - "testCount": 3 - }, - "extensions/msteams/src/monitor.lifecycle.test.ts": { - "durationMs": 53.74462890625, - "testCount": 2 - }, - "extensions/msteams/src/monitor.test.ts": { - "durationMs": 424.484130859375, - "testCount": 4 - }, - "extensions/msteams/src/policy.test.ts": { - "durationMs": 3.140625, - "testCount": 17 - }, - "extensions/msteams/src/polls.test.ts": { - "durationMs": 117.5244140625, - "testCount": 6 - }, - "extensions/msteams/src/reply-dispatcher.test.ts": { - "durationMs": 15.24462890625, - "testCount": 5 - }, - "extensions/msteams/src/send.test.ts": { - "durationMs": 4.218017578125, - "testCount": 8 - }, - "extensions/msteams/src/setup-surface.test.ts": { - "durationMs": 259.621337890625, - "testCount": 6 - }, - "extensions/msteams/src/streaming-message.test.ts": { - "durationMs": 4410.16259765625, - "testCount": 10 - }, - "extensions/nextcloud-talk/src/core.test.ts": { - "durationMs": 65.344970703125, - "testCount": 17 - }, - "extensions/nextcloud-talk/src/inbound.behavior.test.ts": { - "durationMs": 4.94482421875, - "testCount": 2 - }, - "extensions/nextcloud-talk/src/monitor.replay.test.ts": { - "durationMs": 11.179931640625, - "testCount": 5 - }, - "extensions/nextcloud-talk/src/setup.test.ts": { - "durationMs": 27.300537109375, - "testCount": 12 - }, - "extensions/nostr/src/channel.outbound.test.ts": { - "durationMs": 2.844970703125, - "testCount": 1 - }, - "extensions/nostr/src/channel.test.ts": { - "durationMs": 8.323486328125, - "testCount": 32 - }, - "extensions/nostr/src/nostr-bus.fuzz.test.ts": { - "durationMs": 13.064208984375, - "testCount": 76 - }, - "extensions/nostr/src/nostr-bus.inbound.test.ts": { - "durationMs": 3.209716796875, - "testCount": 4 - }, - "extensions/nostr/src/nostr-bus.integration.test.ts": { - "durationMs": 6.494140625, - "testCount": 26 - }, - "extensions/nostr/src/nostr-bus.test.ts": { - "durationMs": 20.373046875, - "testCount": 32 - }, - "extensions/nostr/src/nostr-profile-http.test.ts": { - "durationMs": 12.300537109375, - "testCount": 22 - }, - "extensions/nostr/src/nostr-profile.fuzz.test.ts": { - "durationMs": 84.99072265625, - "testCount": 51 - }, - "extensions/nostr/src/nostr-profile.test.ts": { - "durationMs": 28.27978515625, - "testCount": 31 - }, - "extensions/nostr/src/nostr-state-store.test.ts": { - "durationMs": 8.105712890625, - "testCount": 7 - }, - "extensions/openai/index.test.ts": { - "durationMs": 25.549072265625, - "testCount": 9 - }, - "extensions/openai/provider-catalog.contract.test.ts": { - "durationMs": 13306, - "testCount": 3 - }, - "extensions/openshell/src/mirror.test.ts": { - "durationMs": 14.3525390625, - "testCount": 3 - }, - "extensions/openshell/src/openshell-core.test.ts": { - "durationMs": 95.810546875, - "testCount": 14 - }, - "extensions/phone-control/index.test.ts": { - "durationMs": 9.85791015625, - "testCount": 3 - }, - "extensions/synology-chat/src/channel.integration.test.ts": { - "durationMs": 3.148193359375, - "testCount": 2 - }, - "extensions/synology-chat/src/channel.test.ts": { - "durationMs": 276.8447265625, - "testCount": 30 - }, - "extensions/synology-chat/src/client.test.ts": { - "durationMs": 26.11181640625, - "testCount": 11 - }, - "extensions/synology-chat/src/core.test.ts": { - "durationMs": 5.31787109375, - "testCount": 19 - }, - "extensions/synology-chat/src/webhook-handler.test.ts": { - "durationMs": 5038.8330078125, - "testCount": 20 - }, - "extensions/talk-voice/index.test.ts": { - "durationMs": 7.751220703125, - "testCount": 10 - }, - "extensions/tavily/src/tavily-tools.test.ts": { - "durationMs": 4.30224609375, - "testCount": 11 - }, - "extensions/telegram/src/account-inspect.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/accounts.test.ts": { - "durationMs": 9 - }, - "extensions/telegram/src/action-runtime.test.ts": { - "durationMs": 19 - }, - "extensions/telegram/src/allow-from.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/allowed-updates.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/api-fetch.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/approval-buttons.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/audit.test.ts": { - "durationMs": 395 - }, - "extensions/telegram/src/bot-access.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/bot-message-context.acp-bindings.test.ts": { - "durationMs": 18290 - }, - "extensions/telegram/src/bot-message-context.audio-transcript.test.ts": { - "durationMs": 20350 - }, - "extensions/telegram/src/bot-message-context.dm-threads.test.ts": { - "durationMs": 23020 - }, - "extensions/telegram/src/bot-message-context.dm-topic-threadid.test.ts": { - "durationMs": 31390 - }, - "extensions/telegram/src/bot-message-context.implicit-mention.test.ts": { - "durationMs": 21640 - }, - "extensions/telegram/src/bot-message-context.named-account-dm.test.ts": { - "durationMs": 24070 - }, - "extensions/telegram/src/bot-message-context.sender-prefix.test.ts": { - "durationMs": 20090 - }, - "extensions/telegram/src/bot-message-context.thread-binding.test.ts": { - "durationMs": 19150 - }, - "extensions/telegram/src/bot-message-context.topic-agentid.test.ts": { - "durationMs": 26500 - }, - "extensions/telegram/src/bot-message-dispatch.sticker-media.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/bot-message-dispatch.test.ts": { - "durationMs": 12600 - }, - "extensions/telegram/src/bot-message.test.ts": { - "durationMs": 13 - }, - "extensions/telegram/src/bot-native-command-menu.test.ts": { - "durationMs": 359 - }, - "extensions/telegram/src/bot-native-commands.group-auth.test.ts": { - "durationMs": 17 - }, - "extensions/telegram/src/bot-native-commands.plugin-auth.test.ts": { - "durationMs": 19500 - }, - "extensions/telegram/src/bot-native-commands.registry.test.ts": { - "durationMs": 842 - }, - "extensions/telegram/src/bot-native-commands.session-meta.test.ts": { - "durationMs": 18000 - }, - "extensions/telegram/src/bot-native-commands.skills-allowlist.test.ts": { - "durationMs": 103 - }, - "extensions/telegram/src/bot-native-commands.test.ts": { - "durationMs": 17590 - }, - "extensions/telegram/src/bot.create-telegram-bot.channel-post-media.test.ts": { - "durationMs": 13000 - }, - "extensions/telegram/src/bot.create-telegram-bot.test.ts": { - "durationMs": 13900 - }, - "extensions/telegram/src/bot.fetch-abort.test.ts": { - "durationMs": 13 - }, - "extensions/telegram/src/bot.helpers.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/bot.test.ts": { - "durationMs": 8500 - }, - "extensions/telegram/src/bot/delivery.resolve-media-retry.test.ts": { - "durationMs": 2720, - "testCount": 27 - }, - "extensions/telegram/src/bot/delivery.test.ts": { - "durationMs": 33 - }, - "extensions/telegram/src/bot/helpers.test.ts": { - "durationMs": 6 - }, - "extensions/telegram/src/button-types.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/caption.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/channel-actions.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/channel.test.ts": { - "durationMs": 11 - }, - "extensions/telegram/src/conversation-route.base-session-key.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/dm-access.test.ts": { - "durationMs": 704 - }, - "extensions/telegram/src/draft-chunking.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/draft-stream.test.ts": { - "durationMs": 81 - }, - "extensions/telegram/src/exec-approvals-handler.test.ts": { - "durationMs": 6 - }, - "extensions/telegram/src/exec-approvals.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/fetch.env-proxy-runtime.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/fetch.test.ts": { - "durationMs": 269, - "testCount": 23 - }, - "extensions/telegram/src/format.test.ts": { - "durationMs": 20 - }, - "extensions/telegram/src/format.wrap-md.test.ts": { - "durationMs": 28 - }, - "extensions/telegram/src/forum-service-message.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/group-access.base-access.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/group-access.policy-access.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/group-migration.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/group-policy.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/inline-buttons.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/lane-delivery.test.ts": { - "durationMs": 14 - }, - "extensions/telegram/src/model-buttons.test.ts": { - "durationMs": 7 - }, - "extensions/telegram/src/monitor.test.ts": { - "durationMs": 5600 - }, - "extensions/telegram/src/network-config.test.ts": { - "durationMs": 216 - }, - "extensions/telegram/src/network-errors.test.ts": { - "durationMs": 8 - }, - "extensions/telegram/src/normalize.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/polling-session.test.ts": { - "durationMs": 379 - }, - "extensions/telegram/src/probe.test.ts": { - "durationMs": 616 - }, - "extensions/telegram/src/proxy.test.ts": { - "durationMs": 402 - }, - "extensions/telegram/src/reaction-level.test.ts": { - "durationMs": 5 - }, - "extensions/telegram/src/reasoning-lane-coordinator.test.ts": { - "durationMs": 3 - }, - "extensions/telegram/src/send.proxy.test.ts": { - "durationMs": 709 - }, - "extensions/telegram/src/send.test.ts": { - "durationMs": 82 - }, - "extensions/telegram/src/sendchataction-401-backoff.test.ts": { - "durationMs": 10400 - }, - "extensions/telegram/src/sequential-key.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/setup-core.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/setup-surface.test.ts": { - "durationMs": 6 - }, - "extensions/telegram/src/status-issues.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/status-reaction-variants.test.ts": { - "durationMs": 5 - }, - "extensions/telegram/src/sticker-cache.test.ts": { - "durationMs": 71 - }, - "extensions/telegram/src/target-writeback.test.ts": { - "durationMs": 62 - }, - "extensions/telegram/src/targets.test.ts": { - "durationMs": 7 - }, - "extensions/telegram/src/thread-bindings.test.ts": { - "durationMs": 25 - }, - "extensions/telegram/src/token.test.ts": { - "durationMs": 10 - }, - "extensions/telegram/src/update-offset-store.test.ts": { - "durationMs": 8 - }, - "extensions/telegram/src/voice.test.ts": { - "durationMs": 4 - }, - "extensions/telegram/src/webhook.test.ts": { - "durationMs": 2900 - }, - "extensions/thread-ownership/index.test.ts": { - "durationMs": 14.474609375, - "testCount": 9 - }, - "extensions/tlon/src/core.test.ts": { - "durationMs": 87.28759765625, - "testCount": 11 - }, - "extensions/tlon/src/security.test.ts": { - "durationMs": 7.126953125, - "testCount": 56 - }, - "extensions/tlon/src/urbit/base-url.test.ts": { - "durationMs": 2.522705078125, - "testCount": 5 - }, - "extensions/tlon/src/urbit/send.test.ts": { - "durationMs": 2.661865234375, - "testCount": 1 - }, - "extensions/tlon/src/urbit/sse-client.test.ts": { - "durationMs": 136.485107421875, - "testCount": 13 - }, - "extensions/tlon/src/urbit/upload.test.ts": { - "durationMs": 26.323974609375, - "testCount": 7 - }, - "extensions/twitch/src/access-control.test.ts": { - "durationMs": 3.05859375, - "testCount": 32 - }, - "extensions/twitch/src/outbound.test.ts": { - "durationMs": 231.44189453125, - "testCount": 22 - }, - "extensions/twitch/src/probe.test.ts": { - "durationMs": 19.66455078125, - "testCount": 10 - }, - "extensions/twitch/src/send.test.ts": { - "durationMs": 70.67431640625, - "testCount": 9 - }, - "extensions/twitch/src/setup-surface.test.ts": { - "durationMs": 15.28662109375, - "testCount": 15 - }, - "extensions/twitch/src/twitch-client.test.ts": { - "durationMs": 88.92333984375, - "testCount": 30 - }, - "extensions/voice-call/src/config.test.ts": { - "durationMs": 3.82763671875, - "testCount": 9 - }, - "extensions/voice-call/src/manager.closed-loop.test.ts": { - "durationMs": 24.541748046875, - "testCount": 5 - }, - "extensions/voice-call/src/manager.inbound-allowlist.test.ts": { - "durationMs": 7.1240234375, - "testCount": 5 - }, - "extensions/voice-call/src/manager.notify.test.ts": { - "durationMs": 27.918212890625, - "testCount": 10 - }, - "extensions/voice-call/src/manager.restore.test.ts": { - "durationMs": 6.91845703125, - "testCount": 6 - }, - "extensions/voice-call/src/manager/events.test.ts": { - "durationMs": 7.883056640625, - "testCount": 10 - }, - "extensions/voice-call/src/manager/outbound.test.ts": { - "durationMs": 6.2216796875, - "testCount": 6 - }, - "extensions/voice-call/src/manager/timers.test.ts": { - "durationMs": 9.802734375, - "testCount": 4 - }, - "extensions/voice-call/src/media-stream.test.ts": { - "durationMs": 142.008544921875, - "testCount": 9 - }, - "extensions/voice-call/src/providers/shared/guarded-json-api.test.ts": { - "durationMs": 2.32666015625, - "testCount": 3 - }, - "extensions/voice-call/src/providers/telnyx.test.ts": { - "durationMs": 4.214599609375, - "testCount": 7 - }, - "extensions/voice-call/src/providers/twilio.test.ts": { - "durationMs": 54.70068359375, - "testCount": 16 - }, - "extensions/voice-call/src/runtime.test.ts": { - "durationMs": 4.73291015625, - "testCount": 2 - }, - "extensions/voice-call/src/telephony-audio.test.ts": { - "durationMs": 19.759033203125, - "testCount": 4 - }, - "extensions/voice-call/src/webhook-security.test.ts": { - "durationMs": 9.156494140625, - "testCount": 21 - }, - "extensions/voice-call/src/webhook.hangup-once.lifecycle.test.ts": { - "durationMs": 11.766357421875, - "testCount": 2 - }, - "extensions/voice-call/src/webhook.test.ts": { - "durationMs": 49.31201171875, - "testCount": 17 - }, - "extensions/voice-call/src/webhook/tailscale.test.ts": { - "durationMs": 57.841552734375, - "testCount": 5 - }, - "extensions/xai/web-search.test.ts": { - "durationMs": 3.056396484375, - "testCount": 21 - }, - "extensions/zai/plugin-registration.contract.test.ts": { - "durationMs": 10292, - "testCount": 2 - }, - "extensions/zalo/src/channel.startup.test.ts": { - "durationMs": 62.13134765625, - "testCount": 1 - }, - "extensions/zalo/src/monitor.image.polling.test.ts": { - "durationMs": 56.554443359375, - "testCount": 1 - }, - "extensions/zalo/src/monitor.lifecycle.test.ts": { - "durationMs": 156.505615234375, - "testCount": 4 - }, - "extensions/zalo/src/monitor.pairing.lifecycle.test.ts": { - "durationMs": 166.725830078125, - "testCount": 2 - }, - "extensions/zalo/src/monitor.reply-once.lifecycle.test.ts": { - "durationMs": 157.7900390625, - "testCount": 2 - }, - "extensions/zalo/src/monitor.webhook.test.ts": { - "durationMs": 205.934326171875, - "testCount": 13 - }, - "extensions/zalouser/src/accounts.test.ts": { - "durationMs": 4.146728515625, - "testCount": 13 - }, - "extensions/zalouser/src/channel.test.ts": { - "durationMs": 2.692138671875, - "testCount": 7 - }, - "extensions/zalouser/src/monitor.group-gating.test.ts": { - "durationMs": 11.812744140625, - "testCount": 18 - }, - "extensions/zalouser/src/send.test.ts": { - "durationMs": 4.2861328125, - "testCount": 13 - }, - "extensions/zalouser/src/setup-surface.test.ts": { - "durationMs": 3.376953125, - "testCount": 6 - } - } -} diff --git a/test/fixtures/test-timings.unit.json b/test/fixtures/test-timings.unit.json deleted file mode 100644 index 1ed80ae49f0..00000000000 --- a/test/fixtures/test-timings.unit.json +++ /dev/null @@ -1,1023 +0,0 @@ -{ - "config": "vitest.unit.config.ts", - "generatedAt": "2026-03-23T05:11:36.071Z", - "defaultDurationMs": 250, - "files": { - "src/cron/service.issue-regressions.test.ts": { - "durationMs": 4524.16552734375, - "testCount": 39 - }, - "src/plugin-sdk/subpaths.test.ts": { - "durationMs": 3613.611328125, - "testCount": 5 - }, - "src/plugins/install.test.ts": { - "durationMs": 3357.946533203125, - "testCount": 29 - }, - "test/web-search-provider-boundary.test.ts": { - "durationMs": 2897.3154296875, - "testCount": 1 - }, - "src/plugin-sdk/index.bundle.test.ts": { - "durationMs": 2524.4013671875, - "testCount": 1 - }, - "src/plugin-sdk/channel-import-guardrails.test.ts": { - "durationMs": 1464.13232421875, - "testCount": 9 - }, - "src/cron/isolated-agent.uses-last-non-empty-agent-text-as.test.ts": { - "durationMs": 1299.1962890625, - "testCount": 13 - }, - "test/extension-plugin-sdk-boundary.test.ts": { - "durationMs": 1296.1044921875, - "testCount": 3 - }, - "src/hooks/install.test.ts": { - "durationMs": 1294.3115234375, - "testCount": 13 - }, - "src/cron/isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true.test.ts": { - "durationMs": 1233.8681640625, - "testCount": 15 - }, - "src/secrets/apply.test.ts": { - "durationMs": 1185.137939453125, - "testCount": 15 - }, - "test/scripts/committer.test.ts": { - "durationMs": 1018.4521484375, - "testCount": 2 - }, - "test/plugin-extension-import-boundary.test.ts": { - "durationMs": 1014.2353515625, - "testCount": 5 - }, - "src/infra/fs-safe.test.ts": { - "durationMs": 941.44287109375, - "testCount": 22 - }, - "src/hooks/bundled/session-memory/handler.test.ts": { - "durationMs": 893.841064453125, - "testCount": 17 - }, - "src/cron/isolated-agent/delivery-dispatch.named-agent.test.ts": { - "durationMs": 871.858642578125, - "testCount": 11 - }, - "test/architecture-smells.test.ts": { - "durationMs": 853.270263671875, - "testCount": 2 - }, - "src/memory/embeddings-ollama.test.ts": { - "durationMs": 841.48876953125, - "testCount": 4 - }, - "src/secrets/audit.test.ts": { - "durationMs": 828.3154296875, - "testCount": 18 - }, - "src/plugins/loader.test.ts": { - "durationMs": 790.62646484375, - "testCount": 56 - }, - "src/media-understanding/runner.proxy.test.ts": { - "durationMs": 755.4365234375, - "testCount": 3 - }, - "src/config/sessions/sessions.test.ts": { - "durationMs": 745.67529296875, - "testCount": 23 - }, - "src/config/schema.base.generated.test.ts": { - "durationMs": 729.758056640625, - "testCount": 1 - }, - "src/tui/gateway-chat.test.ts": { - "durationMs": 698.404296875, - "testCount": 14 - }, - "src/infra/provider-usage.auth.normalizes-keys.test.ts": { - "durationMs": 636.830078125, - "testCount": 19 - }, - "src/security/audit.test.ts": { - "durationMs": 586.11669921875, - "testCount": 71 - }, - "src/memory/index.test.ts": { - "durationMs": 579.9091796875, - "testCount": 21 - }, - "src/memory/qmd-manager.test.ts": { - "durationMs": 573.174072265625, - "testCount": 57 - }, - "src/infra/host-env-security.test.ts": { - "durationMs": 555.42041015625, - "testCount": 18 - }, - "src/memory/manager.get-concurrency.test.ts": { - "durationMs": 546.220947265625, - "testCount": 3 - }, - "src/config/config.identity-defaults.test.ts": { - "durationMs": 481.40673828125, - "testCount": 7 - }, - "src/hooks/loader.test.ts": { - "durationMs": 479.452880859375, - "testCount": 14 - }, - "src/config/config.nix-integration-u3-u5-u9.test.ts": { - "durationMs": 451.165771484375, - "testCount": 19 - }, - "src/node-host/invoke-system-run-plan.test.ts": { - "durationMs": 437.455810546875, - "testCount": 41 - }, - "src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts": { - "durationMs": 406.56201171875, - "testCount": 6 - }, - "src/infra/archive.test.ts": { - "durationMs": 388.169677734375, - "testCount": 15 - }, - "src/infra/provider-usage.test.ts": { - "durationMs": 384.38671875, - "testCount": 11 - }, - "src/infra/fs-pinned-write-helper.test.ts": { - "durationMs": 381.91845703125, - "testCount": 3 - }, - "src/secrets/resolve.test.ts": { - "durationMs": 379.8876953125, - "testCount": 17 - }, - "src/plugins/bundled-plugin-metadata.test.ts": { - "durationMs": 349.606689453125, - "testCount": 4 - }, - "src/infra/transport-ready.test.ts": { - "durationMs": 349.38427734375, - "testCount": 6 - }, - "src/pairing/pairing-store.test.ts": { - "durationMs": 326.400390625, - "testCount": 17 - }, - "src/daemon/schtasks.startup-fallback.test.ts": { - "durationMs": 322.14453125, - "testCount": 6 - }, - "src/config/config.plugin-validation.test.ts": { - "durationMs": 321.5458984375, - "testCount": 15 - }, - "src/plugins/commands.test.ts": { - "durationMs": 305.874267578125, - "testCount": 12 - }, - "src/infra/git-commit.test.ts": { - "durationMs": 305.805908203125, - "testCount": 13 - }, - "src/security/temp-path-guard.test.ts": { - "durationMs": 304.04638671875, - "testCount": 3 - }, - "src/acp/control-plane/manager.test.ts": { - "durationMs": 298.658447265625, - "testCount": 36 - }, - "src/install-sh-version.test.ts": { - "durationMs": 297.4970703125, - "testCount": 3 - }, - "test/scripts/test-extension.test.ts": { - "durationMs": 293.929443359375, - "testCount": 9 - }, - "src/memory/embeddings-gemini.test.ts": { - "durationMs": 293.704345703125, - "testCount": 31 - }, - "src/infra/archive-staging.test.ts": { - "durationMs": 292.599853515625, - "testCount": 7 - }, - "src/cron/isolated-agent.subagent-model.test.ts": { - "durationMs": 292.16796875, - "testCount": 4 - }, - "src/cli/program/preaction.test.ts": { - "durationMs": 291.583251953125, - "testCount": 8 - }, - "src/infra/heartbeat-runner.returns-default-unset.test.ts": { - "durationMs": 289.12646484375, - "testCount": 25 - }, - "src/infra/run-node.test.ts": { - "durationMs": 276.7587890625, - "testCount": 12 - }, - "src/cli/daemon-cli/install.integration.test.ts": { - "durationMs": 275.413330078125, - "testCount": 2 - }, - "src/plugins/manifest-registry.test.ts": { - "durationMs": 266.66015625, - "testCount": 26 - }, - "src/memory/embeddings.test.ts": { - "durationMs": 264.777099609375, - "testCount": 19 - }, - "src/infra/system-presence.version.test.ts": { - "durationMs": 252.56787109375, - "testCount": 6 - }, - "src/media/store.test.ts": { - "durationMs": 250.561279296875, - "testCount": 24 - }, - "src/plugins/bundle-mcp.test.ts": { - "durationMs": 239.72216796875, - "testCount": 3 - }, - "src/infra/heartbeat-runner.respects-ackmaxchars-heartbeat-acks.test.ts": { - "durationMs": 235.425537109375, - "testCount": 12 - }, - "src/cron/isolated-agent.direct-delivery-core-channels.test.ts": { - "durationMs": 233.672607421875, - "testCount": 4 - }, - "src/cli/daemon-cli/restart-health.test.ts": { - "durationMs": 231.465087890625, - "testCount": 10 - }, - "src/tts/tts.test.ts": { - "durationMs": 229.763427734375, - "testCount": 27 - }, - "src/plugins/loader.git-path-regression.test.ts": { - "durationMs": 224.001953125, - "testCount": 1 - }, - "src/cron/isolated-agent.lane.test.ts": { - "durationMs": 217.71826171875, - "testCount": 3 - }, - "src/secrets/runtime.integration.test.ts": { - "durationMs": 216.497314453125, - "testCount": 5 - }, - "ui/src/ui/views/chat.test.ts": { - "durationMs": 215.544921875, - "testCount": 32 - }, - "src/config/io.write-config.test.ts": { - "durationMs": 213.6318359375, - "testCount": 17 - }, - "src/infra/device-bootstrap.test.ts": { - "durationMs": 213.50048828125, - "testCount": 10 - }, - "src/channels/plugins/plugins-core.test.ts": { - "durationMs": 210.02392578125, - "testCount": 39 - }, - "src/config/sessions/store.pruning.integration.test.ts": { - "durationMs": 204.234130859375, - "testCount": 10 - }, - "src/node-host/invoke-system-run.test.ts": { - "durationMs": 197.60498046875, - "testCount": 39 - }, - "src/plugins/sdk-alias.test.ts": { - "durationMs": 193.329345703125, - "testCount": 24 - }, - "src/config/sessions.test.ts": { - "durationMs": 191.794189453125, - "testCount": 37 - }, - "src/infra/update-runner.test.ts": { - "durationMs": 185.320556640625, - "testCount": 22 - }, - "src/media-understanding/apply.test.ts": { - "durationMs": 180.3095703125, - "testCount": 32 - }, - "src/channels/channels-misc.test.ts": { - "durationMs": 176.197509765625, - "testCount": 10 - }, - "src/channels/plugins/contracts/registry-backed.contract.test.ts": { - "durationMs": 165.671875, - "testCount": 167 - }, - "src/infra/device-pairing.test.ts": { - "durationMs": 165.583740234375, - "testCount": 19 - }, - "src/acp/server.startup.test.ts": { - "durationMs": 156.636474609375, - "testCount": 4 - }, - "test/scripts/ios-team-id.test.ts": { - "durationMs": 155.50732421875, - "testCount": 3 - }, - "src/hooks/plugin-hooks.test.ts": { - "durationMs": 151.358642578125, - "testCount": 4 - }, - "src/memory/manager.readonly-recovery.test.ts": { - "durationMs": 150.2568359375, - "testCount": 4 - }, - "src/cron/service.delivery-plan.test.ts": { - "durationMs": 149.01416015625, - "testCount": 3 - }, - "src/plugins/contracts/auth-choice.contract.test.ts": { - "durationMs": 148.492431640625, - "testCount": 3 - }, - "ui/src/ui/app-chat.test.ts": { - "durationMs": 143.6455078125, - "testCount": 3 - }, - "src/wizard/setup.gateway-config.test.ts": { - "durationMs": 142.656494140625, - "testCount": 7 - }, - "src/entry.version-fast-path.test.ts": { - "durationMs": 141.65087890625, - "testCount": 2 - }, - "src/context-engine/context-engine.test.ts": { - "durationMs": 140.483642578125, - "testCount": 30 - }, - "src/config/sessions/targets.test.ts": { - "durationMs": 136.714111328125, - "testCount": 13 - }, - "src/config/schema.hints.test.ts": { - "durationMs": 136.534423828125, - "testCount": 7 - }, - "test/git-hooks-pre-commit.test.ts": { - "durationMs": 134.720458984375, - "testCount": 1 - }, - "src/infra/matrix-legacy-crypto.test.ts": { - "durationMs": 134.415771484375, - "testCount": 8 - }, - "src/memory/manager.batch.test.ts": { - "durationMs": 132.914306640625, - "testCount": 3 - }, - "src/routing/resolve-route.test.ts": { - "durationMs": 131.9150390625, - "testCount": 41 - }, - "src/canvas-host/server.test.ts": { - "durationMs": 131.867919921875, - "testCount": 6 - }, - "src/plugins/config-state.test.ts": { - "durationMs": 127.486083984375, - "testCount": 22 - }, - "src/infra/provider-usage.auth.plugin.test.ts": { - "durationMs": 127.301513671875, - "testCount": 1 - }, - "src/config/config.legacy-config-detection.accepts-imessage-dmpolicy.test.ts": { - "durationMs": 127.07763671875, - "testCount": 30 - }, - "src/cli/config-cli.integration.test.ts": { - "durationMs": 126.407470703125, - "testCount": 4 - }, - "src/security/windows-acl.test.ts": { - "durationMs": 123.772705078125, - "testCount": 48 - }, - "src/infra/heartbeat-runner.model-override.test.ts": { - "durationMs": 121.20263671875, - "testCount": 8 - }, - "src/secrets/runtime.test.ts": { - "durationMs": 119.88818359375, - "testCount": 55 - }, - "src/cron/service.failure-alert.test.ts": { - "durationMs": 118.9111328125, - "testCount": 4 - }, - "src/config/plugin-auto-enable.test.ts": { - "durationMs": 118.829833984375, - "testCount": 25 - }, - "src/cron/isolated-agent/delivery-dispatch.double-announce.test.ts": { - "durationMs": 117.264404296875, - "testCount": 15 - }, - "src/config/includes.test.ts": { - "durationMs": 115.695068359375, - "testCount": 26 - }, - "src/memory/internal.test.ts": { - "durationMs": 114.050048828125, - "testCount": 18 - }, - "src/memory/manager.embedding-batches.test.ts": { - "durationMs": 113.791259765625, - "testCount": 5 - }, - "src/infra/gateway-lock.test.ts": { - "durationMs": 113.197021484375, - "testCount": 9 - }, - "src/infra/outbound/message-action-runner.media.test.ts": { - "durationMs": 111.97216796875, - "testCount": 7 - }, - "src/cron/service.persists-delivered-status.test.ts": { - "durationMs": 108.559814453125, - "testCount": 6 - }, - "src/plugins/discovery.test.ts": { - "durationMs": 107.716064453125, - "testCount": 25 - }, - "src/cron/run-log.test.ts": { - "durationMs": 107.50634765625, - "testCount": 11 - }, - "src/cron/service.session-reaper-in-finally.test.ts": { - "durationMs": 103.7470703125, - "testCount": 3 - }, - "src/cron/isolated-agent.direct-delivery-forum-topics.test.ts": { - "durationMs": 103.40283203125, - "testCount": 2 - }, - "src/pairing/setup-code.test.ts": { - "durationMs": 102.3203125, - "testCount": 16 - }, - "src/cron/isolated-agent/run.owner-auth.test.ts": { - "durationMs": 100.48779296875, - "testCount": 1 - }, - "src/cli/update-cli/restart-helper.test.ts": { - "durationMs": 99.556640625, - "testCount": 20 - }, - "src/infra/boundary-path.test.ts": { - "durationMs": 98.96142578125, - "testCount": 5 - }, - "src/config/schema.test.ts": { - "durationMs": 98.1875, - "testCount": 22 - }, - "src/plugins/conversation-binding.test.ts": { - "durationMs": 96.423095703125, - "testCount": 15 - }, - "src/plugins/web-search-providers.runtime.test.ts": { - "durationMs": 95.8154296875, - "testCount": 9 - }, - "src/cron/service.restart-catchup.test.ts": { - "durationMs": 93.3232421875, - "testCount": 8 - }, - "src/infra/heartbeat-runner.ghost-reminder.test.ts": { - "durationMs": 92.972412109375, - "testCount": 6 - }, - "src/media-understanding/runner.skip-tiny-audio.test.ts": { - "durationMs": 92.167236328125, - "testCount": 3 - }, - "src/security/fix.test.ts": { - "durationMs": 90.6171875, - "testCount": 5 - }, - "src/hooks/hooks-install.test.ts": { - "durationMs": 89.53759765625, - "testCount": 1 - }, - "src/infra/outbound/delivery-queue.recovery.test.ts": { - "durationMs": 89.47412109375, - "testCount": 11 - }, - "src/infra/install-package-dir.test.ts": { - "durationMs": 86.085693359375, - "testCount": 5 - }, - "src/process/command-queue.test.ts": { - "durationMs": 84.578125, - "testCount": 17 - }, - "src/plugin-sdk/channel-lifecycle.test.ts": { - "durationMs": 82.777099609375, - "testCount": 6 - }, - "src/plugins/stage-bundled-plugin-runtime.test.ts": { - "durationMs": 82.215576171875, - "testCount": 7 - }, - "src/memory/embeddings-voyage.test.ts": { - "durationMs": 82.2119140625, - "testCount": 4 - }, - "src/config/io.runtime-snapshot-write.test.ts": { - "durationMs": 81.617431640625, - "testCount": 6 - }, - "src/config/config.pruning-defaults.test.ts": { - "durationMs": 79.002685546875, - "testCount": 7 - }, - "src/hooks/workspace.test.ts": { - "durationMs": 78.73388671875, - "testCount": 7 - }, - "src/config/config.web-search-provider.test.ts": { - "durationMs": 77.86962890625, - "testCount": 24 - }, - "src/infra/matrix-plugin-helper.test.ts": { - "durationMs": 76.61181640625, - "testCount": 4 - }, - "src/cli/plugins-cli.install.test.ts": { - "durationMs": 76.592529296875, - "testCount": 8 - }, - "src/cron/isolated-agent.auth-profile-propagation.test.ts": { - "durationMs": 75.08984375, - "testCount": 1 - }, - "src/cron/service.store.migration.test.ts": { - "durationMs": 73.780517578125, - "testCount": 7 - }, - "test/scripts/check-no-conflict-markers.test.ts": { - "durationMs": 73.209228515625, - "testCount": 4 - }, - "src/cli/pairing-cli.test.ts": { - "durationMs": 72.9013671875, - "testCount": 12 - }, - "src/infra/matrix-migration-snapshot.test.ts": { - "durationMs": 72.4443359375, - "testCount": 7 - }, - "src/config/plugins-runtime-boundary.test.ts": { - "durationMs": 71.692138671875, - "testCount": 3 - }, - "src/cron/service.read-ops-nonblocking.test.ts": { - "durationMs": 70.1806640625, - "testCount": 3 - }, - "src/cli/program.smoke.test.ts": { - "durationMs": 69.348388671875, - "testCount": 4 - }, - "src/security/skill-scanner.test.ts": { - "durationMs": 69.302490234375, - "testCount": 27 - }, - "src/plugins/copy-bundled-plugin-metadata.test.ts": { - "durationMs": 68.958740234375, - "testCount": 9 - }, - "src/channels/status-reactions.test.ts": { - "durationMs": 68.4052734375, - "testCount": 37 - }, - "src/plugins/bundle-commands.test.ts": { - "durationMs": 67.466064453125, - "testCount": 1 - }, - "src/media/server.outside-workspace.test.ts": { - "durationMs": 66.935791015625, - "testCount": 1 - }, - "src/cron/service.every-jobs-fire.test.ts": { - "durationMs": 66.443115234375, - "testCount": 3 - }, - "src/daemon/schtasks.test.ts": { - "durationMs": 66.254638671875, - "testCount": 23 - }, - "src/config/sessions.cache.test.ts": { - "durationMs": 65.659423828125, - "testCount": 9 - }, - "src/infra/state-migrations.test.ts": { - "durationMs": 65.61279296875, - "testCount": 2 - }, - "src/config/config.talk-validation.test.ts": { - "durationMs": 65.213134765625, - "testCount": 5 - }, - "src/cli/daemon-cli/status.gather.test.ts": { - "durationMs": 65.18212890625, - "testCount": 12 - }, - "src/plugins/runtime/index.test.ts": { - "durationMs": 64.8515625, - "testCount": 12 - }, - "src/cron/isolated-agent/run.skill-filter.test.ts": { - "durationMs": 64.020751953125, - "testCount": 13 - }, - "src/config/config-misc.test.ts": { - "durationMs": 63.940185546875, - "testCount": 38 - }, - "src/plugin-sdk/persistent-dedupe.test.ts": { - "durationMs": 63.2900390625, - "testCount": 6 - }, - "src/media-understanding/apply.echo-transcript.test.ts": { - "durationMs": 63.254150390625, - "testCount": 10 - }, - "src/infra/matrix-migration-config.test.ts": { - "durationMs": 63.236572265625, - "testCount": 7 - }, - "src/config/env-preserve-io.test.ts": { - "durationMs": 61.69921875, - "testCount": 4 - }, - "src/daemon/service-audit.test.ts": { - "durationMs": 60.855224609375, - "testCount": 16 - }, - "src/infra/infra-runtime.test.ts": { - "durationMs": 60.0595703125, - "testCount": 11 - }, - "src/infra/matrix-legacy-state.test.ts": { - "durationMs": 59.89404296875, - "testCount": 6 - }, - "src/infra/install-source-utils.test.ts": { - "durationMs": 59.5400390625, - "testCount": 16 - }, - "src/cron/service.heartbeat-ok-summary-suppressed.test.ts": { - "durationMs": 59.4853515625, - "testCount": 2 - }, - "src/infra/outbound/deliver.test.ts": { - "durationMs": 58.823974609375, - "testCount": 44 - }, - "src/plugins/contracts/discovery.contract.test.ts": { - "durationMs": 58.736572265625, - "testCount": 15 - }, - "src/config/doc-baseline.integration.test.ts": { - "durationMs": 58.551025390625, - "testCount": 8 - }, - "src/daemon/systemd.test.ts": { - "durationMs": 57.96435546875, - "testCount": 43 - }, - "src/infra/jsonl-socket.test.ts": { - "durationMs": 57.662841796875, - "testCount": 2 - }, - "src/cron/store.test.ts": { - "durationMs": 57.3974609375, - "testCount": 12 - }, - "src/infra/session-cost-usage.test.ts": { - "durationMs": 55.66796875, - "testCount": 9 - }, - "src/infra/exec-approvals-safe-bins.test.ts": { - "durationMs": 55.111572265625, - "testCount": 48 - }, - "src/infra/push-apns.store.test.ts": { - "durationMs": 54.936767578125, - "testCount": 7 - }, - "src/infra/restart-sentinel.test.ts": { - "durationMs": 54.8037109375, - "testCount": 13 - }, - "src/plugin-sdk/keyed-async-queue.test.ts": { - "durationMs": 54.710693359375, - "testCount": 4 - }, - "src/cli/memory-cli.test.ts": { - "durationMs": 54.0625, - "testCount": 24 - }, - "src/channels/plugins/setup-wizard-helpers.test.ts": { - "durationMs": 53.711669921875, - "testCount": 88 - }, - "src/plugins/status.test.ts": { - "durationMs": 52.908935546875, - "testCount": 9 - }, - "src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts": { - "durationMs": 52.880615234375, - "testCount": 28 - }, - "src/infra/system-events.test.ts": { - "durationMs": 52.455078125, - "testCount": 15 - }, - "src/memory/manager.async-search.test.ts": { - "durationMs": 52.367431640625, - "testCount": 2 - }, - "src/config/config.backup-rotation.test.ts": { - "durationMs": 52.273681640625, - "testCount": 4 - }, - "src/cron/service.issue-16156-list-skips-cron.test.ts": { - "durationMs": 51.369140625, - "testCount": 3 - }, - "src/media-understanding/runner.auto-audio.test.ts": { - "durationMs": 51.368408203125, - "testCount": 4 - }, - "src/infra/restart-stale-pids.test.ts": { - "durationMs": 51.15234375, - "testCount": 37 - }, - "src/cron/service.runs-one-shot-main-job-disables-it.test.ts": { - "durationMs": 51.140869140625, - "testCount": 11 - }, - "src/infra/update-startup.test.ts": { - "durationMs": 50.162841796875, - "testCount": 10 - }, - "src/infra/json-files.test.ts": { - "durationMs": 49.891845703125, - "testCount": 5 - }, - "src/logging/log-file-size-cap.test.ts": { - "durationMs": 49.63330078125, - "testCount": 3 - }, - "src/memory/manager.atomic-reindex.test.ts": { - "durationMs": 49.58642578125, - "testCount": 1 - }, - "src/cli/nodes-camera.test.ts": { - "durationMs": 48.5517578125, - "testCount": 17 - }, - "src/infra/secret-file.test.ts": { - "durationMs": 47.966796875, - "testCount": 11 - }, - "src/media/server.test.ts": { - "durationMs": 47.458740234375, - "testCount": 9 - }, - "src/config/config.compaction-settings.test.ts": { - "durationMs": 47.290771484375, - "testCount": 5 - }, - "src/cron/session-reaper.test.ts": { - "durationMs": 47.266357421875, - "testCount": 16 - }, - "src/media/mime.test.ts": { - "durationMs": 46.57568359375, - "testCount": 44 - }, - "src/cron/service.store-migration.test.ts": { - "durationMs": 45.800048828125, - "testCount": 5 - }, - "src/media-understanding/runner.deepgram.test.ts": { - "durationMs": 45.664794921875, - "testCount": 1 - }, - "src/infra/outbound/delivery-queue.storage.test.ts": { - "durationMs": 45.38427734375, - "testCount": 10 - }, - "src/memory/manager.mistral-provider.test.ts": { - "durationMs": 44.930908203125, - "testCount": 3 - }, - "src/config/sessions/store.session-key-normalization.test.ts": { - "durationMs": 44.8798828125, - "testCount": 4 - }, - "src/infra/machine-name.test.ts": { - "durationMs": 44.325439453125, - "testCount": 2 - }, - "src/config/io.compat.test.ts": { - "durationMs": 43.653564453125, - "testCount": 7 - }, - "src/cron/isolated-agent/run.interim-retry.test.ts": { - "durationMs": 43.59423828125, - "testCount": 3 - }, - "src/plugins/uninstall.test.ts": { - "durationMs": 43.580322265625, - "testCount": 23 - }, - "src/infra/heartbeat-runner.transcript-prune.test.ts": { - "durationMs": 43.103759765625, - "testCount": 2 - }, - "src/channels/plugins/whatsapp-heartbeat.test.ts": { - "durationMs": 42.790771484375, - "testCount": 8 - }, - "src/version.test.ts": { - "durationMs": 42.5732421875, - "testCount": 10 - }, - "src/infra/system-presence.test.ts": { - "durationMs": 42.49365234375, - "testCount": 5 - }, - "src/cron/isolated-agent/run.cron-model-override.test.ts": { - "durationMs": 42.2236328125, - "testCount": 6 - }, - "src/plugins/web-search-providers.test.ts": { - "durationMs": 42.105224609375, - "testCount": 7 - }, - "src/infra/heartbeat-runner.sender-prefers-delivery-target.test.ts": { - "durationMs": 41.898193359375, - "testCount": 1 - }, - "src/plugins/contracts/registry.contract.test.ts": { - "durationMs": 41.73974609375, - "testCount": 19 - }, - "src/infra/openclaw-root.test.ts": { - "durationMs": 41.5361328125, - "testCount": 10 - }, - "src/acp/client.test.ts": { - "durationMs": 41.49267578125, - "testCount": 44 - }, - "src/cron/isolated-agent/run.fast-mode.test.ts": { - "durationMs": 41.228759765625, - "testCount": 3 - }, - "src/infra/exec-approvals-store.test.ts": { - "durationMs": 40.9560546875, - "testCount": 8 - }, - "src/cli/mcp-cli.test.ts": { - "durationMs": 40.920166015625, - "testCount": 2 - }, - "src/config/config.identity-avatar.test.ts": { - "durationMs": 40.639892578125, - "testCount": 3 - }, - "src/infra/outbound/targets.test.ts": { - "durationMs": 40.48193359375, - "testCount": 49 - }, - "src/infra/outbound/message-action-runner.plugin-dispatch.test.ts": { - "durationMs": 39.700927734375, - "testCount": 11 - }, - "src/security/dm-policy-shared.test.ts": { - "durationMs": 38.9951171875, - "testCount": 66 - }, - "src/tui/tui-formatters.test.ts": { - "durationMs": 38.393798828125, - "testCount": 26 - }, - "src/channels/plugins/actions/actions.test.ts": { - "durationMs": 38.15234375, - "testCount": 25 - }, - "src/cron/isolated-agent/run.message-tool-policy.test.ts": { - "durationMs": 38.073486328125, - "testCount": 3 - }, - "src/infra/session-maintenance-warning.test.ts": { - "durationMs": 37.757568359375, - "testCount": 5 - }, - "src/memory/qmd-process.test.ts": { - "durationMs": 37.728759765625, - "testCount": 3 - }, - "src/plugins/contracts/runtime.contract.test.ts": { - "durationMs": 37.444091796875, - "testCount": 27 - }, - "src/memory/manager.watcher-config.test.ts": { - "durationMs": 37.2939453125, - "testCount": 2 - }, - "src/plugins/interactive.test.ts": { - "durationMs": 37.029541015625, - "testCount": 10 - }, - "src/tui/theme/theme.test.ts": { - "durationMs": 36.656982421875, - "testCount": 25 - }, - "src/plugins/bundled-plugin-naming.test.ts": { - "durationMs": 36.5302734375, - "testCount": 4 - }, - "src/infra/node-pairing.test.ts": { - "durationMs": 35.856689453125, - "testCount": 4 - }, - "src/infra/outbound/target-normalization.test.ts": { - "durationMs": 35.790283203125, - "testCount": 7 - }, - "src/config/redact-snapshot.test.ts": { - "durationMs": 35.75, - "testCount": 28 - }, - "src/plugins/contracts/provider.contract.test.ts": { - "durationMs": 35.133056640625, - "testCount": 38 - }, - "src/infra/outbound/session-binding-service.test.ts": { - "durationMs": 34.947509765625, - "testCount": 8 - }, - "src/plugins/bundled-web-search.test.ts": { - "durationMs": 34.859130859375, - "testCount": 4 - }, - "src/node-host/invoke-browser.test.ts": { - "durationMs": 34.781982421875, - "testCount": 4 - }, - "src/plugins/marketplace.test.ts": { - "durationMs": 34.758544921875, - "testCount": 3 - }, - "src/plugins/wired-hooks-compaction.test.ts": { - "durationMs": 34.751220703125, - "testCount": 8 - }, - "src/media-understanding/runner.video.test.ts": { - "durationMs": 33.72509765625, - "testCount": 2 - }, - "src/media-understanding/provider-registry.test.ts": { - "durationMs": 33.62744140625, - "testCount": 3 - }, - "src/cli/update-cli.test.ts": { - "durationMs": 33.624267578125, - "testCount": 20 - } - } -} diff --git a/test/scripts/ci-write-manifest-outputs.test.ts b/test/scripts/ci-write-manifest-outputs.test.ts new file mode 100644 index 00000000000..731cca73e7c --- /dev/null +++ b/test/scripts/ci-write-manifest-outputs.test.ts @@ -0,0 +1,99 @@ +import { describe, expect, it } from "vitest"; +import { buildWorkflowManifest } from "../../scripts/ci-write-manifest-outputs.mjs"; + +describe("buildWorkflowManifest", () => { + it("builds static CI matrices from scope env", () => { + const manifest = buildWorkflowManifest({ + GITHUB_EVENT_NAME: "pull_request", + OPENCLAW_CI_DOCS_ONLY: "false", + OPENCLAW_CI_DOCS_CHANGED: "false", + OPENCLAW_CI_RUN_NODE: "true", + OPENCLAW_CI_RUN_MACOS: "true", + OPENCLAW_CI_RUN_ANDROID: "true", + OPENCLAW_CI_RUN_WINDOWS: "true", + OPENCLAW_CI_RUN_SKILLS_PYTHON: "false", + OPENCLAW_CI_HAS_CHANGED_EXTENSIONS: "true", + OPENCLAW_CI_CHANGED_EXTENSIONS_MATRIX: '{"include":[{"extension":"discord"}]}', + }); + + expect(manifest.run_checks).toBe(true); + expect(manifest.checks_fast_matrix).toEqual({ + include: [ + { check_name: "checks-fast-bundled", runtime: "node", task: "bundled" }, + { check_name: "checks-fast-extensions", runtime: "node", task: "extensions" }, + { + check_name: "checks-fast-contracts-protocol", + runtime: "node", + task: "contracts-protocol", + }, + ], + }); + expect(manifest.checks_matrix).toEqual({ + include: [ + { check_name: "checks-node-test", runtime: "node", task: "test" }, + { check_name: "checks-node-channels", runtime: "node", task: "channels" }, + ], + }); + expect(manifest.checks_windows_matrix).toEqual({ + include: [{ check_name: "checks-windows-node-test", runtime: "node", task: "test" }], + }); + expect(manifest.extension_fast_matrix).toEqual({ + include: [{ check_name: "extension-fast-discord", extension: "discord" }], + }); + expect(manifest.android_matrix).toHaveProperty("include"); + expect(manifest.macos_node_matrix).toEqual({ + include: [{ check_name: "macos-node", runtime: "node", task: "test" }], + }); + }); + + it("includes the push-only compat lane on pushes", () => { + const manifest = buildWorkflowManifest({ + GITHUB_EVENT_NAME: "push", + OPENCLAW_CI_DOCS_ONLY: "false", + OPENCLAW_CI_DOCS_CHANGED: "false", + OPENCLAW_CI_RUN_NODE: "true", + }); + + expect(manifest.checks_matrix).toEqual({ + include: [ + { check_name: "checks-node-test", runtime: "node", task: "test" }, + { check_name: "checks-node-channels", runtime: "node", task: "channels" }, + { + check_name: "checks-node-compat-node22", + runtime: "node", + task: "compat-node22", + node_version: "22.x", + cache_key_suffix: "node22", + }, + ], + }); + }); + + it("suppresses heavy jobs for docs-only changes", () => { + const manifest = buildWorkflowManifest({ + OPENCLAW_CI_DOCS_ONLY: "true", + OPENCLAW_CI_DOCS_CHANGED: "true", + OPENCLAW_CI_RUN_NODE: "true", + OPENCLAW_CI_RUN_WINDOWS: "true", + }); + + expect(manifest.run_checks).toBe(false); + expect(manifest.run_checks_windows).toBe(false); + expect(manifest.run_check_docs).toBe(true); + }); + + it("builds install-smoke outputs separately", () => { + const manifest = buildWorkflowManifest( + { + OPENCLAW_CI_DOCS_ONLY: "false", + OPENCLAW_CI_RUN_CHANGED_SMOKE: "true", + }, + "install-smoke", + ); + + expect(manifest).toEqual({ + docs_only: false, + run_install_smoke: true, + }); + }); +}); diff --git a/test/scripts/test-extension.test.ts b/test/scripts/test-extension.test.ts index 5208cc23f3a..867790e0629 100644 --- a/test/scripts/test-extension.test.ts +++ b/test/scripts/test-extension.test.ts @@ -5,7 +5,6 @@ import { detectChangedExtensionIds, listAvailableExtensionIds, listChangedExtensionIds, - partitionExtensionTestFiles, resolveExtensionTestPlan, } from "../../scripts/test-extension.mjs"; import { bundledPluginFile, bundledPluginRoot } from "../helpers/bundled-plugin-paths.js"; @@ -49,19 +48,6 @@ describe("scripts/test-extension.mjs", () => { ); }); - it("splits channel monitor files into isolated runs", () => { - const plan = resolveExtensionTestPlan({ targetArg: "discord", cwd: process.cwd() }); - - expect(plan.config).toBe("vitest.channels.config.ts"); - expect(plan.isolatedTestFiles).toContain( - bundledPluginFile("discord", "src/monitor/provider.test.ts"), - ); - expect(plan.sharedTestFiles).toContain(bundledPluginFile("discord", "src/channel.test.ts")); - expect(plan.sharedTestFiles).not.toContain( - bundledPluginFile("discord", "src/monitor/provider.test.ts"), - ); - }); - it("resolves provider extensions onto the extensions vitest config", () => { const plan = resolveExtensionTestPlan({ targetArg: "firecrawl", cwd: process.cwd() }); @@ -72,21 +58,6 @@ describe("scripts/test-extension.mjs", () => { ).toBe(true); }); - it("applies exact isolated files for non-channel extensions", () => { - const { isolatedTestFiles, sharedTestFiles } = partitionExtensionTestFiles({ - config: "vitest.extensions.config.ts", - testFiles: [ - bundledPluginFile("firecrawl", "src/firecrawl-scrape-tool.test.ts"), - bundledPluginFile("firecrawl", "src/index.test.ts"), - ], - }); - - expect(isolatedTestFiles).toEqual([ - bundledPluginFile("firecrawl", "src/firecrawl-scrape-tool.test.ts"), - ]); - expect(sharedTestFiles).toEqual([bundledPluginFile("firecrawl", "src/index.test.ts")]); - }); - it("includes paired src roots when they contain tests", () => { const plan = resolveExtensionTestPlan({ targetArg: "line", cwd: process.cwd() }); diff --git a/test/scripts/test-parallel.test.ts b/test/scripts/test-parallel.test.ts deleted file mode 100644 index e906c8dfea7..00000000000 --- a/test/scripts/test-parallel.test.ts +++ /dev/null @@ -1,590 +0,0 @@ -import { execFileSync } from "node:child_process"; -import fs from "node:fs"; -import os from "node:os"; -import path from "node:path"; -import { describe, expect, it } from "vitest"; -import { - parseCompletedTestFileLines, - parseMemoryTraceSummaryLines, - parseMemoryValueKb, -} from "../../scripts/test-parallel-memory.mjs"; -import { - appendCapturedOutput, - hasFatalTestRunOutput, - resolveTestRunExitCode, -} from "../../scripts/test-parallel-utils.mjs"; -import { loadTestCatalog } from "../../scripts/test-planner/catalog.mjs"; -import { bundledPluginFile } from "../helpers/bundled-plugin-paths.js"; - -const clearPlannerShardEnv = (env) => { - const nextEnv = { ...env }; - delete nextEnv.OPENCLAW_TEST_SHARDS; - delete nextEnv.OPENCLAW_TEST_SHARD_INDEX; - delete nextEnv.OPENCLAW_TEST_FORCE_THREADS; - delete nextEnv.OPENCLAW_TEST_FORCE_FORKS; - delete nextEnv.OPENCLAW_TEST_DISABLE_THREAD_EXPANSION; - delete nextEnv.OPENCLAW_TEST_SHOW_POOL_DECISION; - delete nextEnv.OPENCLAW_TEST_PROFILE; - delete nextEnv.OPENCLAW_TEST_WORKERS; - delete nextEnv.OPENCLAW_TEST_SKIP_DEFAULT; - delete nextEnv.OPENCLAW_TEST_INCLUDE_EXTENSIONS; - delete nextEnv.OPENCLAW_TEST_INCLUDE_CHANNELS; - delete nextEnv.OPENCLAW_TEST_INCLUDE_GATEWAY; - delete nextEnv.OPENCLAW_TEST_UNIT_FAST_BATCH_TARGET_MS; - return nextEnv; -}; - -const sharedTargetedChannelProxyFiles = (() => { - const catalog = loadTestCatalog(); - return catalog.allKnownTestFiles - .filter((file) => { - const classification = catalog.classifyTestFile(file); - return classification.surface === "channels" && !classification.isolated; - }) - .slice(0, 100); -})(); - -const sharedTargetedUnitProxyFiles = (() => { - const catalog = loadTestCatalog(); - return catalog.allKnownTestFiles - .filter((file) => { - const classification = catalog.classifyTestFile(file); - return classification.surface === "unit" && !classification.isolated; - }) - .slice(0, 100); -})(); - -const targetedChannelProxyFiles = [ - ...sharedTargetedChannelProxyFiles, - bundledPluginFile("discord", "src/monitor/message-handler.preflight.acp-bindings.test.ts"), - bundledPluginFile("discord", "src/monitor/monitor.agent-components.test.ts"), - bundledPluginFile("whatsapp", "src/monitor-inbox.streams-inbound-messages.test.ts"), -]; - -const targetedUnitProxyFiles = [ - ...sharedTargetedUnitProxyFiles, - "src/cli/qr-dashboard.integration.test.ts", -]; - -const REPO_ROOT = path.resolve(import.meta.dirname, "../.."); -const HIGH_MEMORY_LOCAL_PLANNER_ENV = { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "12", - OPENCLAW_TEST_HOST_MEMORY_GIB: "128", -} as const; - -function createPlannerEnv(overrides: NodeJS.ProcessEnv = {}): NodeJS.ProcessEnv { - return { - ...clearPlannerShardEnv(process.env), - ...overrides, - }; -} - -function createLocalPlannerEnv(overrides: NodeJS.ProcessEnv = {}): NodeJS.ProcessEnv { - return createPlannerEnv({ - CI: "", - GITHUB_ACTIONS: "", - OPENCLAW_TEST_LOAD_AWARE: "0", - ...overrides, - }); -} - -function createHighMemoryLocalPlannerEnv(overrides: NodeJS.ProcessEnv = {}): NodeJS.ProcessEnv { - return createLocalPlannerEnv({ - ...HIGH_MEMORY_LOCAL_PLANNER_ENV, - ...overrides, - }); -} - -function runPlannerPlan(args: string[], envOverrides: NodeJS.ProcessEnv = {}): string { - return execFileSync("node", ["scripts/test-parallel.mjs", ...args], { - cwd: REPO_ROOT, - env: createPlannerEnv(envOverrides), - encoding: "utf8", - stdio: ["pipe", "pipe", "pipe"], - }); -} - -function runHighMemoryLocalMultiSurfacePlan(): string { - return runPlannerPlan( - ["--plan", "--surface", "unit", "--surface", "extensions", "--surface", "channels"], - createHighMemoryLocalPlannerEnv(), - ); -} - -function getPlanLines(output: string, prefix: string): string[] { - return output - .split("\n") - .map((line) => line.trim()) - .filter((line) => line.startsWith(prefix)); -} - -function getTargetedChannelPlanLines(output: string): string[] { - return output - .split("\n") - .map((line) => line.trim()) - .filter( - (line) => - line.startsWith("channels-") && - line.includes("filters=") && - line.includes("surface=channels"), - ); -} - -function parseNumericPlanField(line: string, key: string): number { - const match = line.match(new RegExp(`\\b${key}=(\\d+)\\b`)); - if (!match) { - throw new Error(`missing ${key} in plan line: ${line}`); - } - return Number(match[1]); -} - -function runManifestOutputWriter(workflow: string, envOverrides: NodeJS.ProcessEnv = {}): string { - const outputPath = path.join(os.tmpdir(), `openclaw-${workflow}-output-${Date.now()}.txt`); - try { - execFileSync("node", ["scripts/ci-write-manifest-outputs.mjs", "--workflow", workflow], { - cwd: REPO_ROOT, - env: createPlannerEnv({ - GITHUB_OUTPUT: outputPath, - ...envOverrides, - }), - encoding: "utf8", - }); - return fs.readFileSync(outputPath, "utf8"); - } finally { - fs.rmSync(outputPath, { force: true }); - } -} -describe("scripts/test-parallel fatal output guard", () => { - it("fails a zero exit when V8 reports an out-of-memory fatal", () => { - const output = [ - "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory", - "node::OOMErrorHandler(char const*, v8::OOMDetails const&)", - "[test-parallel] done unit-fast code=0 elapsed=210.9s", - ].join("\n"); - - expect(hasFatalTestRunOutput(output)).toBe(true); - expect(resolveTestRunExitCode({ code: 0, signal: null, output })).toBe(1); - }); - - it("keeps a clean zero exit green", () => { - expect( - resolveTestRunExitCode({ - code: 0, - signal: null, - output: "Test Files 3 passed (3)", - }), - ).toBe(0); - }); - - it("preserves explicit non-zero exits", () => { - expect(resolveTestRunExitCode({ code: 2, signal: null, output: "" })).toBe(2); - }); - - it("fails even when the fatal line scrolls out of the retained tail", () => { - const fatalLine = "FATAL ERROR: Ineffective mark-compacts near heap limit"; - const output = appendCapturedOutput(fatalLine, "x".repeat(250_000), 200_000); - - expect(hasFatalTestRunOutput(output)).toBe(false); - expect(resolveTestRunExitCode({ code: 0, signal: null, output, fatalSeen: true })).toBe(1); - }); - - it("keeps only the tail of captured output", () => { - const output = appendCapturedOutput("", "abc", 5); - expect(appendCapturedOutput(output, "defg", 5)).toBe("cdefg"); - }); -}); - -describe("scripts/test-parallel memory trace parsing", () => { - it("extracts completed test file lines from colored Vitest output", () => { - const output = [ - "\u001B[32m✓\u001B[39m src/config/doc-baseline.test.ts \u001B[2m(\u001B[22m\u001B[2m8 tests\u001B[22m\u001B[2m)\u001B[22m\u001B[33m 46424\u001B[2mms\u001B[22m\u001B[39m", - " \u001B[32m✓\u001B[39m src/infra/restart.test.ts (5 tests) 4.2s", - ].join("\n"); - - expect(parseCompletedTestFileLines(output)).toEqual([ - { - file: "src/config/doc-baseline.test.ts", - durationMs: 46_424, - }, - { - file: "src/infra/restart.test.ts", - durationMs: 4_200, - }, - ]); - }); - - it("ignores non-file summary lines", () => { - expect( - parseCompletedTestFileLines( - [ - " Test Files 2 passed (2)", - " Tests 30 passed (30)", - "[test-parallel] done unit code=0 elapsed=68.8s", - ].join("\n"), - ), - ).toEqual([]); - }); - - it("parses memory trace summary lines and hotspot deltas", () => { - const summaries = parseMemoryTraceSummaryLines( - [ - "2026-03-20T04:32:18.7721466Z [test-parallel][mem] summary unit-fast files=360 peak=13.22GiB totalDelta=6.69GiB peakAt=poll top=src/config/schema.help.quality.test.ts:1.06GiB, src/infra/update-runner.test.ts:+463.6MiB", - ].join("\n"), - ); - - expect(summaries).toHaveLength(1); - expect(summaries[0]).toEqual({ - lane: "unit-fast", - files: 360, - peakRssKb: parseMemoryValueKb("13.22GiB"), - totalDeltaKb: parseMemoryValueKb("6.69GiB"), - peakAt: "poll", - top: [ - { - file: "src/config/schema.help.quality.test.ts", - deltaKb: parseMemoryValueKb("1.06GiB"), - }, - { - file: "src/infra/update-runner.test.ts", - deltaKb: parseMemoryValueKb("+463.6MiB"), - }, - ], - }); - }); - - it("parses memory trace summaries from gh run job logs", () => { - const summaries = parseMemoryTraceSummaryLines( - [ - "checks-fast-extensions-6\tRun extensions (node)\t2026-04-03T04:07:10.5924943Z [test-parallel][mem] summary extensions-batch-22-shard-6 files=15 peak=2.66GiB totalDelta=+470.5MiB peakAt=poll top=extensions/microsoft-foundry/index.test.ts:+1.35GiB, extensions/acpx/src/service.test.ts:+212.1MiB", - ].join("\n"), - ); - - expect(summaries).toEqual([ - { - lane: "extensions-batch-22-shard-6", - files: 15, - peakRssKb: parseMemoryValueKb("2.66GiB"), - totalDeltaKb: parseMemoryValueKb("+470.5MiB"), - peakAt: "poll", - top: [ - { - file: "extensions/microsoft-foundry/index.test.ts", - deltaKb: parseMemoryValueKb("+1.35GiB"), - }, - { - file: "extensions/acpx/src/service.test.ts", - deltaKb: parseMemoryValueKb("+212.1MiB"), - }, - ], - }, - ]); - }); -}); - -describe("scripts/test-parallel lane planning", () => { - it("keeps serial profile on split unit lanes instead of one giant unit worker", () => { - const output = runPlannerPlan(["--plan"], { - OPENCLAW_TEST_PROFILE: "serial", - }); - - expect(output).toContain("unit-fast"); - expect(output).not.toContain("unit filters=all maxWorkers=1"); - }); - - it("recycles default local unit-fast runs into bounded batches", () => { - const output = runPlannerPlan(["--plan"], { - CI: "", - OPENCLAW_TEST_UNIT_FAST_LANES: "1", - OPENCLAW_TEST_UNIT_FAST_BATCH_TARGET_MS: "1", - }); - - expect(output).toContain("unit-fast-batch-"); - expect(output).not.toContain("unit-fast filters=all maxWorkers="); - }); - - it("keeps legacy base-pinned targeted reruns on dedicated forks lanes", () => { - const output = runPlannerPlan([ - "--plan", - "--files", - "src/auto-reply/reply/followup-runner.test.ts", - ]); - - expect(output).toContain("base-pinned-followup-runner"); - expect(output).not.toContain("base-followup-runner"); - }); - - it("reports capability-derived output for mid-memory local macOS hosts", () => { - const output = runPlannerPlan( - ["--plan", "--surface", "unit", "--surface", "extensions"], - createLocalPlannerEnv({ - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - }), - ); - - expect(output).toContain("mode=local intent=normal memoryBand=mid"); - expect(output).toMatch(/unit-fast(?:-batch-\d+)? filters=\d+ maxWorkers=/); - expect(output).toMatch(/extensions(?:-batch-\d+)? filters=\d+ maxWorkers=/); - }); - - it("uses higher shared extension worker counts on high-memory local hosts", () => { - const highMemoryOutput = runPlannerPlan( - ["--plan", "--surface", "extensions"], - createHighMemoryLocalPlannerEnv(), - ); - const midMemoryOutput = runPlannerPlan( - ["--plan", "--surface", "extensions"], - createLocalPlannerEnv({ - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - }), - ); - - const midSharedBatches = getPlanLines(midMemoryOutput, "extensions-batch-"); - const highSharedBatches = getPlanLines(highMemoryOutput, "extensions-batch-"); - - expect(midSharedBatches.length).toBeGreaterThan(0); - expect(highSharedBatches.length).toBeGreaterThan(0); - expect(midSharedBatches.every((line) => /filters=\d+ maxWorkers=3/.test(line))).toBe(true); - expect(highSharedBatches.every((line) => /filters=\d+ maxWorkers=5/.test(line))).toBe(true); - expect(highSharedBatches.length).toBeLessThanOrEqual(midSharedBatches.length); - }); - - it("starts isolated channel lanes before shared extension batches on high-memory local hosts", () => { - const output = runHighMemoryLocalMultiSurfacePlan(); - - const firstChannelIsolated = output.indexOf( - "message-handler.preflight.acp-bindings-channels-isolated", - ); - const firstExtensionBatch = output.indexOf("extensions-batch-1"); - const firstChannelBatch = output.indexOf("channels-batch-1"); - expect(firstChannelIsolated).toBeGreaterThanOrEqual(0); - expect(firstExtensionBatch).toBeGreaterThan(firstChannelIsolated); - expect(firstChannelBatch).toBeGreaterThan(firstExtensionBatch); - expect(output).toMatch(/channels-batch-1 filters=\d+ maxWorkers=5/); - }); - - it("uses coarser unit-fast batching for high-memory local multi-surface runs", () => { - const output = runHighMemoryLocalMultiSurfacePlan(); - - expect(output).toContain("unit-fast-batch-4"); - expect(output).not.toContain("unit-fast-batch-5"); - }); - - it("uses earlier targeted channel batching on high-memory local hosts", () => { - const output = runPlannerPlan( - [ - "--plan", - "--surface", - "channels", - ...targetedChannelProxyFiles.flatMap((file) => ["--files", file]), - ], - createHighMemoryLocalPlannerEnv(), - ); - - const channelBatchLines = getPlanLines(output, "channels-batch-"); - const channelBatchFilterCounts = channelBatchLines.map((line) => - parseNumericPlanField(line, "filters"), - ); - const targetedChannelPlanLines = getTargetedChannelPlanLines(output); - - expect(channelBatchLines.length).toBeGreaterThanOrEqual(4); - expect(channelBatchLines.every((line) => line.includes("maxWorkers=5"))).toBe(true); - expect(Math.max(...channelBatchFilterCounts)).toBeLessThan(30); - expect( - targetedChannelPlanLines.reduce( - (sum, line) => sum + parseNumericPlanField(line, "filters"), - 0, - ), - ).toBe(targetedChannelProxyFiles.length); - }); - - it("uses targeted unit batching on high-memory local hosts", () => { - const output = runPlannerPlan( - [ - "--plan", - "--surface", - "unit", - ...targetedUnitProxyFiles.flatMap((file) => ["--files", file]), - ], - createHighMemoryLocalPlannerEnv(), - ); - - const unitBatchLines = getPlanLines(output, "unit-batch-"); - const unitBatchFilterCounts = unitBatchLines.map((line) => - parseNumericPlanField(line, "filters"), - ); - - expect(unitBatchLines.length).toBeGreaterThanOrEqual(3); - expect(unitBatchLines.every((line) => line.includes("maxWorkers=6"))).toBe(true); - expect(Math.max(...unitBatchFilterCounts)).toBeLessThan(40); - expect(unitBatchFilterCounts.reduce((sum, count) => sum + count, 0)).toBe( - sharedTargetedUnitProxyFiles.length, - ); - expect(output).toContain("unit-qr-dashboard.integration-isolated filters=1 maxWorkers=2"); - }); - - it("explains targeted file ownership and execution policy", () => { - const output = runPlannerPlan(["--explain", "src/auto-reply/reply/followup-runner.test.ts"]); - - expect(output).toContain("surface=base"); - expect(output).toContain("reasons=base-surface,base-pinned-manifest"); - expect(output).toContain("pool=forks"); - }); - - it("routes targeted contract tests through the contracts config", () => { - const output = runPlannerPlan([ - "--explain", - "src/channels/plugins/contracts/registry-backed.contract.test.ts", - ]); - - expect(output).toContain("surface=contracts"); - expect(output).toContain("vitest.contracts.config.ts"); - expect(output).not.toContain("vitest.unit.config.ts"); - }); - - it("routes telegram plugin coverage through the extensions config", () => { - const output = runPlannerPlan([ - "--explain", - bundledPluginFile("telegram", "src/bot.create-telegram-bot.test.ts"), - ]); - - expect(output).toContain("surface=extensions"); - expect(output).toContain("extensions-surface"); - expect(output).toContain("vitest.extensions.config.ts"); - expect(output).not.toContain("vitest.channels.config.ts"); - }); - - it("prints the planner-backed CI manifest as JSON", () => { - const output = runPlannerPlan(["--ci-manifest"], { - GITHUB_EVENT_NAME: "pull_request", - OPENCLAW_CI_DOCS_ONLY: "false", - OPENCLAW_CI_DOCS_CHANGED: "false", - OPENCLAW_CI_RUN_NODE: "true", - OPENCLAW_CI_RUN_MACOS: "true", - OPENCLAW_CI_RUN_ANDROID: "false", - OPENCLAW_CI_RUN_WINDOWS: "true", - OPENCLAW_CI_RUN_SKILLS_PYTHON: "false", - OPENCLAW_CI_HAS_CHANGED_EXTENSIONS: "false", - OPENCLAW_CI_CHANGED_EXTENSIONS_MATRIX: '{"include":[]}', - }); - - const manifest = JSON.parse(output); - expect(manifest.jobs.checks.enabled).toBe(true); - expect(manifest.jobs.macosNode.enabled).toBe(true); - expect(manifest.jobs.checksWindows.enabled).toBe(true); - }); - - it("writes CI workflow outputs in ci mode", () => { - const outputs = runManifestOutputWriter("ci", { - GITHUB_EVENT_NAME: "pull_request", - OPENCLAW_CI_DOCS_ONLY: "false", - OPENCLAW_CI_DOCS_CHANGED: "false", - OPENCLAW_CI_RUN_NODE: "true", - OPENCLAW_CI_RUN_MACOS: "true", - OPENCLAW_CI_RUN_ANDROID: "true", - OPENCLAW_CI_RUN_WINDOWS: "true", - OPENCLAW_CI_RUN_SKILLS_PYTHON: "false", - OPENCLAW_CI_HAS_CHANGED_EXTENSIONS: "false", - OPENCLAW_CI_CHANGED_EXTENSIONS_MATRIX: '{"include":[]}', - }); - expect(outputs).toContain("run_build_artifacts=true"); - expect(outputs).toContain("run_checks_windows=true"); - expect(outputs).toContain("run_macos_node=true"); - expect(outputs).toContain("android_matrix="); - }); - - it("writes install-smoke outputs in install-smoke mode", () => { - const outputs = runManifestOutputWriter("install-smoke", { - OPENCLAW_CI_DOCS_ONLY: "false", - OPENCLAW_CI_RUN_CHANGED_SMOKE: "true", - }); - expect(outputs).toContain("run_install_smoke=true"); - expect(outputs).not.toContain("run_checks="); - }); - - it("passes through vitest --mode values that are not wrapper runtime overrides", () => { - const output = runPlannerPlan( - ["--plan", "--mode", "development", "src/infra/outbound/deliver.test.ts"], - createLocalPlannerEnv({ - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "16", - OPENCLAW_TEST_HOST_MEMORY_GIB: "128", - }), - ); - - expect(output).toContain("mode=local intent=normal memoryBand=high"); - expect(output).toContain("unit-deliver-isolated filters=1"); - }); - - it("prints collect-all failure policy in planner output for wrapper-native flag", () => { - const output = runPlannerPlan(["--plan", "--collect-failures", "--surface", "unit"]); - - expect(output).toContain("failurePolicy=collect-all"); - }); - - it("maps --bail=0 to collect-all failure policy in planner output", () => { - const output = runPlannerPlan(["--plan", "--surface", "unit", "--", "--bail=0"]); - - expect(output).toContain("failurePolicy=collect-all"); - }); - - it("rejects wrapper-level positive --bail values", () => { - expect(() => runPlannerPlan(["--plan", "--surface", "unit", "--", "--bail=2"])).toThrowError( - /Unsupported wrapper-level --bail value/u, - ); - }); - - it("rejects removed machine-name profiles", () => { - expect(() => runPlannerPlan(["--plan", "--profile", "macmini"])).toThrowError( - /Unsupported test profile "macmini"/u, - ); - }); - - it("rejects unknown explicit surface names", () => { - expect(() => runPlannerPlan(["--plan", "--surface", "channel"])).toThrowError( - /Unsupported --surface value\(s\): channel/u, - ); - }); - - it("supports the explicit contracts surface", () => { - const output = runPlannerPlan(["--plan", "--surface", "contracts"]); - - expect(output).toContain("contracts filters=all"); - expect(output).toContain("surface=contracts"); - }); - - it("rejects wrapper --files values that look like options", () => { - expect(() => runPlannerPlan(["--plan", "--files", "--config"])).toThrowError( - /Invalid --files value/u, - ); - }); - - it("rejects missing --profile values", () => { - expect(() => runPlannerPlan(["--plan", "--profile"])).toThrowError(/Invalid --profile value/u); - }); - - it("rejects missing --surface values", () => { - expect(() => runPlannerPlan(["--plan", "--surface"])).toThrowError(/Invalid --surface value/u); - }); - - it("rejects missing --explain values", () => { - expect(() => runPlannerPlan(["--explain"])).toThrowError(/Invalid --explain value/u); - }); - - it("rejects explicit existing files that are not known test files", () => { - const tempFilePath = path.join(os.tmpdir(), `openclaw-non-test-${Date.now()}.ts`); - fs.writeFileSync(tempFilePath, "export const notATest = true;\n", "utf8"); - - try { - expect(() => runPlannerPlan(["--plan", "--files", tempFilePath])).toThrowError( - /is not a known test file/u, - ); - } finally { - fs.rmSync(tempFilePath, { force: true }); - } - }); -}); diff --git a/test/scripts/test-planner.executor-fallback.test.ts b/test/scripts/test-planner.executor-fallback.test.ts deleted file mode 100644 index 00be99b08cf..00000000000 --- a/test/scripts/test-planner.executor-fallback.test.ts +++ /dev/null @@ -1,195 +0,0 @@ -import { EventEmitter } from "node:events"; -import { PassThrough } from "node:stream"; -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { createExecutionArtifacts, executePlan } from "../../scripts/test-planner/executor.mjs"; - -beforeEach(() => { - vi.spyOn(console, "log").mockImplementation(() => {}); - vi.spyOn(console, "error").mockImplementation(() => {}); - vi.spyOn(process.stdout, "write").mockImplementation(() => true); - vi.spyOn(process.stderr, "write").mockImplementation(() => true); -}); - -afterEach(() => { - vi.useRealTimers(); - vi.restoreAllMocks(); -}); - -describe("test planner executor", () => { - it("falls back to child exit when close never arrives", async () => { - vi.useFakeTimers(); - const stdout = new PassThrough(); - const stderr = new PassThrough(); - const fakeChild = Object.assign(new EventEmitter(), { - stdout, - stderr, - pid: 12345, - kill: vi.fn(), - }); - const spawnMock = vi.fn(() => { - setTimeout(() => { - fakeChild.emit("exit", 0, null); - }, 0); - return fakeChild; - }); - const artifacts = createExecutionArtifacts({ OPENCLAW_TEST_CLOSE_GRACE_MS: "10" }); - const executePromise = executePlan( - { - failurePolicy: "fail-fast", - passthroughMetadataOnly: true, - passthroughOptionArgs: [], - runtimeCapabilities: { isWindowsCi: false, isCI: false, isWindows: false }, - }, - { - env: { OPENCLAW_TEST_CLOSE_GRACE_MS: "10" }, - artifacts, - spawn: spawnMock, - }, - ); - - await vi.runAllTimersAsync(); - await expect(executePromise).resolves.toMatchObject({ - exitCode: 0, - summary: { - failedRunCount: 0, - }, - }); - expect(spawnMock).toHaveBeenCalledTimes(1); - - artifacts.cleanupTempArtifacts(); - }); - - it("collects failures across planned units when failure policy is collect-all", async () => { - vi.useFakeTimers(); - const children = [1, 2].map((pid, index) => { - const stdout = new PassThrough(); - const stderr = new PassThrough(); - return Object.assign(new EventEmitter(), { - stdout, - stderr, - pid, - kill: vi.fn(), - index, - }); - }); - let childIndex = 0; - const spawnMock = vi.fn(() => { - const child = children[childIndex]; - childIndex += 1; - setTimeout(() => { - child.stdout.write( - child.index === 0 - ? " ❯ src/alpha.test.ts (1 test | 1 failed)\n" - : " ❯ src/beta.test.ts (1 test | 1 failed)\n", - ); - child.emit("exit", 1, null); - child.emit("close", 1, null); - }, 0); - return child; - }); - const artifacts = createExecutionArtifacts({}); - const reportPromise = executePlan( - { - failurePolicy: "collect-all", - passthroughMetadataOnly: false, - passthroughOptionArgs: [], - targetedUnits: [], - parallelUnits: [ - { id: "unit-a", args: ["vitest", "run", "src/alpha.test.ts"] }, - { id: "unit-b", args: ["vitest", "run", "src/beta.test.ts"] }, - ], - serialUnits: [], - serialPrefixUnits: [], - shardCount: 1, - shardIndexOverride: null, - topLevelSingleShardAssignments: new Map(), - runtimeCapabilities: { isWindowsCi: false, isCI: false, isWindows: false }, - topLevelParallelEnabled: false, - topLevelParallelLimit: 1, - deferredRunConcurrency: 1, - passthroughRequiresSingleRun: false, - }, - { - env: {}, - artifacts, - spawn: spawnMock, - }, - ); - await vi.runAllTimersAsync(); - const report = await reportPromise; - - expect(spawnMock).toHaveBeenCalledTimes(2); - expect(report.exitCode).toBe(1); - expect(report.summary.failedRunCount).toBe(2); - expect(report.summary.failedTestFileCount).toBe(2); - expect(report.results.map((result) => result.classification)).toEqual([ - "test-failure", - "test-failure", - ]); - - artifacts.cleanupTempArtifacts(); - }); - - it("injects a valid localstorage file path into child NODE_OPTIONS", async () => { - vi.useFakeTimers(); - const stdout = new PassThrough(); - const stderr = new PassThrough(); - const fakeChild = Object.assign(new EventEmitter(), { - stdout, - stderr, - pid: 123, - kill: vi.fn(), - }); - let capturedEnv; - const spawnMock = vi.fn((_command, _args, options) => { - capturedEnv = options?.env; - setTimeout(() => { - fakeChild.emit("exit", 0, null); - fakeChild.emit("close", 0, null); - }, 0); - return fakeChild; - }); - const artifacts = createExecutionArtifacts({ - NODE_OPTIONS: "--max_old_space_size=4096 --localstorage-file", - }); - const executePromise = executePlan( - { - failurePolicy: "fail-fast", - passthroughMetadataOnly: false, - passthroughOptionArgs: [], - targetedUnits: [], - parallelUnits: [{ id: "unit-a", args: ["vitest", "run", "src/alpha.test.ts"] }], - serialUnits: [], - serialPrefixUnits: [], - shardCount: 1, - shardIndexOverride: null, - topLevelSingleShardAssignments: new Map(), - runtimeCapabilities: { isWindowsCi: false, isCI: false, isWindows: false }, - topLevelParallelEnabled: false, - topLevelParallelLimit: 1, - deferredRunConcurrency: 1, - passthroughRequiresSingleRun: false, - }, - { - env: { - NODE_OPTIONS: "--max_old_space_size=4096 --localstorage-file", - }, - artifacts, - spawn: spawnMock, - }, - ); - await vi.runAllTimersAsync(); - await expect(executePromise).resolves.toMatchObject({ - exitCode: 0, - }); - - expect(spawnMock).toHaveBeenCalledTimes(1); - expect(capturedEnv?.NODE_OPTIONS).toContain("--max_old_space_size=4096"); - expect(capturedEnv?.NODE_OPTIONS).toMatch( - /--localstorage-file=[^\s]+\.localstorage\.json(?:\s|$)/u, - ); - expect(capturedEnv?.NODE_OPTIONS).not.toMatch(/(^|\s)--localstorage-file(?=\s|$)/u); - - artifacts.cleanupTempArtifacts(); - }); -}); diff --git a/test/scripts/test-planner.test.ts b/test/scripts/test-planner.test.ts deleted file mode 100644 index c7af590918d..00000000000 --- a/test/scripts/test-planner.test.ts +++ /dev/null @@ -1,989 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import { describe, expect, it } from "vitest"; -import { loadTestCatalog } from "../../scripts/test-planner/catalog.mjs"; -import { - createExecutionArtifacts, - createTempArtifactWriteStream, - resolvePnpmCommandInvocation, - resolveVitestFsModuleCachePath, -} from "../../scripts/test-planner/executor.mjs"; -import { - buildCIExecutionManifest, - buildExecutionPlan, - explainExecutionTarget, -} from "../../scripts/test-planner/planner.mjs"; -import { - loadChannelTimingManifest, - selectTimedHeavyFiles, -} from "../../scripts/test-runner-manifest.mjs"; -import { bundledPluginFile } from "../helpers/bundled-plugin-paths.js"; - -const resolveTimedHeavyChannelFixture = () => { - const catalog = loadTestCatalog(); - const timings = loadChannelTimingManifest(); - const candidates = catalog.allKnownTestFiles.filter( - (file) => - catalog.channelTestPrefixes.some((prefix) => file.startsWith(prefix)) && - !catalog.channelIsolatedFileSet.has(file), - ); - const [file] = selectTimedHeavyFiles({ - candidates, - limit: 1, - minDurationMs: 12_000, - timings, - }); - if (!file) { - throw new Error("No timed-heavy channel fixture found"); - } - return file; -}; - -describe("test planner", () => { - it("builds a capability-aware plan for mid-memory local runs", () => { - const artifacts = createExecutionArtifacts({ - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - OPENCLAW_TEST_LOAD_AWARE: "0", - }); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit", "extensions"], - passthroughArgs: [], - }, - { - env: { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - OPENCLAW_TEST_LOAD_AWARE: "0", - }, - platform: "darwin", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.runtimeCapabilities.runtimeProfileName).toBe("local-darwin"); - expect(plan.failurePolicy).toBe("fail-fast"); - expect(plan.runtimeCapabilities.memoryBand).toBe("mid"); - expect(plan.executionBudget.unitSharedWorkers).toBe(4); - expect(plan.executionBudget.topLevelParallelLimitNoIsolate).toBe(8); - expect(plan.executionBudget.topLevelParallelLimitIsolated).toBe(3); - expect(plan.selectedUnits.some((unit) => unit.id.startsWith("unit-fast"))).toBe(true); - expect(plan.selectedUnits.some((unit) => unit.id.startsWith("extensions"))).toBe(true); - expect(plan.topLevelParallelLimit).toBe(8); - artifacts.cleanupTempArtifacts(); - }); - - it("keeps bundled-plugin-dependent core tests off the default unit surface", () => { - const env = { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - OPENCLAW_TEST_LOAD_AWARE: "0", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit", "bundled"], - passthroughArgs: [], - }, - { - env, - platform: "darwin", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.selectedUnits.some((unit) => unit.surface === "bundled")).toBe(true); - expect( - plan.selectedUnits - .filter((unit) => unit.surface === "unit") - .every((unit) => unit.env?.OPENCLAW_DISABLE_BUNDLED_PLUGINS === "1"), - ).toBe(true); - expect(plan.selectedUnits.find((unit) => unit.surface === "bundled")?.args).toContain( - "vitest.bundled.config.ts", - ); - artifacts.cleanupTempArtifacts(); - }); - - it("runs boundary inventory suites on the lean boundary config", () => { - const env = { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - OPENCLAW_TEST_LOAD_AWARE: "0", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit"], - passthroughArgs: [], - }, - { - env, - platform: "darwin", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const boundaryUnit = plan.selectedUnits.find((unit) => unit.id === "unit-boundary"); - - expect(boundaryUnit).toBeTruthy(); - expect(boundaryUnit?.args).toContain("vitest.boundary.config.ts"); - expect(boundaryUnit?.env?.OPENCLAW_DISABLE_BUNDLED_PLUGINS).toBe("1"); - expect( - plan.selectedUnits - .filter((unit) => unit.id.startsWith("unit-fast")) - .every((unit) => !unit.includeFiles?.includes("test/web-search-provider-boundary.test.ts")), - ).toBe(true); - artifacts.cleanupTempArtifacts(); - }); - - it("uses smaller shared extension batches on constrained local hosts", () => { - const env = { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "8", - OPENCLAW_TEST_HOST_MEMORY_GIB: "16", - OPENCLAW_TEST_LOAD_AWARE: "0", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["extensions"], - passthroughArgs: [], - }, - { - env, - platform: "darwin", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const sharedExtensionBatches = plan.selectedUnits.filter((unit) => - unit.id.startsWith("extensions-batch-"), - ); - - expect(plan.runtimeCapabilities.memoryBand).toBe("constrained"); - expect(plan.executionBudget.extensionsBatchTargetMs).toBe(60_000); - expect(sharedExtensionBatches.length).toBeGreaterThan(3); - artifacts.cleanupTempArtifacts(); - }); - - it("caps CI extension batch concurrency when multiple shared batches are scheduled", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "4", - OPENCLAW_TEST_HOST_MEMORY_GIB: "16", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "ci", - surfaces: ["extensions"], - passthroughArgs: [], - }, - { - env, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const sharedExtensionBatches = plan.selectedUnits.filter( - (unit) => unit.surface === "extensions" && !unit.isolate, - ); - - expect(plan.runtimeCapabilities.runtimeProfileName).toBe("ci-linux"); - expect(plan.executionBudget.topLevelParallelLimitNoIsolate).toBe(4); - expect(sharedExtensionBatches.length).toBeGreaterThan(1); - expect(plan.topLevelParallelLimit).toBe(3); - artifacts.cleanupTempArtifacts(); - }); - - it("auto-isolates timed-heavy extension suites in CI", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "4", - OPENCLAW_TEST_HOST_MEMORY_GIB: "16", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "ci", - surfaces: ["extensions"], - passthroughArgs: [], - }, - { - env, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const hotspotUnit = plan.selectedUnits.find((unit) => unit.id === "extensions-cli-isolated"); - - expect(hotspotUnit).toBeTruthy(); - expect(hotspotUnit?.isolate).toBe(true); - expect(hotspotUnit?.reasons).toContain("extensions-timed-heavy"); - artifacts.cleanupTempArtifacts(); - }); - - it("auto-isolates memory-heavy extension suites in CI", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "4", - OPENCLAW_TEST_HOST_MEMORY_GIB: "16", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "ci", - surfaces: ["extensions"], - passthroughArgs: [], - }, - { - env, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const hotspotFile = bundledPluginFile("feishu", "src/bot.test.ts"); - const hotspotUnit = plan.selectedUnits.find((unit) => unit.args.includes(hotspotFile)); - - expect(hotspotUnit).toBeTruthy(); - expect(hotspotUnit?.isolate).toBe(true); - expect(hotspotUnit?.reasons).toContain("extensions-memory-heavy"); - artifacts.cleanupTempArtifacts(); - }); - - it("auto-isolates newly-seeded extension memory survivors in CI", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "4", - OPENCLAW_TEST_HOST_MEMORY_GIB: "16", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "ci", - surfaces: ["extensions"], - passthroughArgs: [], - }, - { - env, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const hotspotFile = bundledPluginFile("bluebubbles", "src/send.test.ts"); - const hotspotUnit = plan.selectedUnits.find((unit) => unit.args.includes(hotspotFile)); - - expect(hotspotUnit).toBeTruthy(); - expect(hotspotUnit?.isolate).toBe(true); - expect(hotspotUnit?.reasons).toContain("extensions-memory-heavy"); - artifacts.cleanupTempArtifacts(); - }); - - it("auto-isolates timed-heavy channel suites in CI", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "4", - OPENCLAW_TEST_HOST_MEMORY_GIB: "16", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "ci", - surfaces: ["channels"], - passthroughArgs: [], - }, - { - env, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const timedHeavyFile = resolveTimedHeavyChannelFixture(); - const hotspotUnit = plan.selectedUnits.find( - (unit) => unit.id === `channels-${path.basename(timedHeavyFile, ".test.ts")}-isolated`, - ); - - expect(hotspotUnit).toBeTruthy(); - expect(hotspotUnit?.isolate).toBe(true); - expect(hotspotUnit?.reasons).toContain("channels-timed-heavy"); - artifacts.cleanupTempArtifacts(); - }); - - it("scales down mid-tier local concurrency under saturated load", () => { - const artifacts = createExecutionArtifacts({ - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - }); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit", "extensions"], - passthroughArgs: [], - }, - { - env: { - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "10", - OPENCLAW_TEST_HOST_MEMORY_GIB: "64", - }, - platform: "linux", - loadAverage: [11.5, 11.5, 11.5], - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.runtimeCapabilities.memoryBand).toBe("mid"); - expect(plan.runtimeCapabilities.loadBand).toBe("saturated"); - expect(plan.executionBudget.unitSharedWorkers).toBe(2); - expect(plan.executionBudget.unitIsolatedWorkers).toBe(1); - expect(plan.executionBudget.topLevelParallelLimitNoIsolate).toBe(4); - expect(plan.executionBudget.topLevelParallelLimitIsolated).toBe(1); - expect(plan.topLevelParallelLimit).toBe(4); - expect(plan.deferredRunConcurrency).toBe(1); - artifacts.cleanupTempArtifacts(); - }); - - it("splits saturated high-memory local unit bursts into smaller shared batches", () => { - const env = { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "16", - OPENCLAW_TEST_HOST_MEMORY_GIB: "128", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit"], - passthroughArgs: [], - }, - { - env, - platform: "darwin", - loadAverage: [18, 18, 18], - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const sharedUnitBatches = plan.selectedUnits.filter( - (unit) => unit.surface === "unit" && !unit.isolate && unit.id.startsWith("unit-fast"), - ); - const baselinePlan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit"], - passthroughArgs: [], - }, - { - env, - platform: "darwin", - loadAverage: [1, 1, 1], - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - const baselineSharedUnitBatches = baselinePlan.selectedUnits.filter( - (unit) => unit.surface === "unit" && !unit.isolate && unit.id.startsWith("unit-fast"), - ); - - expect(plan.runtimeCapabilities.memoryBand).toBe("high"); - expect(plan.runtimeCapabilities.loadBand).toBe("saturated"); - expect(sharedUnitBatches.length).toBeGreaterThan(baselineSharedUnitBatches.length); - expect(plan.executionBudget.unitIsolatedWorkers).toBe(1); - expect(plan.executionBudget.unitFastBatchTargetMs).toBe(22_500); - artifacts.cleanupTempArtifacts(); - }); - - it("keeps full local unit runs phased when isolated and heavy lanes are present", () => { - const env = { - RUNNER_OS: "macOS", - OPENCLAW_TEST_HOST_CPU_COUNT: "16", - OPENCLAW_TEST_HOST_MEMORY_GIB: "128", - OPENCLAW_TEST_LOAD_AWARE: "0", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - profile: null, - mode: "local", - surfaces: ["unit"], - passthroughArgs: [], - }, - { - env, - platform: "darwin", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const sharedUnitBatches = plan.selectedUnits.filter( - (unit) => unit.surface === "unit" && !unit.isolate && unit.id.startsWith("unit-fast"), - ); - - expect(sharedUnitBatches.length).toBeGreaterThanOrEqual(4); - expect(plan.serialPrefixUnits.some((unit) => unit.serialPhase === "unit-fast")).toBe(true); - expect(plan.topLevelParallelLimit).toBe(3); - artifacts.cleanupTempArtifacts(); - }); - - it("honors the max-profile top-level no-isolate cap without adding extra lanes", () => { - const artifacts = createExecutionArtifacts({ - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "16", - OPENCLAW_TEST_HOST_MEMORY_GIB: "128", - OPENCLAW_TEST_LOAD_AWARE: "0", - OPENCLAW_TEST_PROFILE: "max", - }); - const plan = buildExecutionPlan( - { - profile: "max", - mode: "local", - surfaces: ["unit", "extensions"], - passthroughArgs: [], - }, - { - env: { - RUNNER_OS: "Linux", - OPENCLAW_TEST_HOST_CPU_COUNT: "16", - OPENCLAW_TEST_HOST_MEMORY_GIB: "128", - OPENCLAW_TEST_LOAD_AWARE: "0", - OPENCLAW_TEST_PROFILE: "max", - }, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.runtimeCapabilities.intentProfile).toBe("max"); - expect(plan.executionBudget.topLevelParallelLimitNoIsolate).toBe(8); - expect(plan.topLevelParallelLimit).toBe(8); - artifacts.cleanupTempArtifacts(); - }); - - it("splits mixed targeted file selections across surfaces", () => { - const artifacts = createExecutionArtifacts({}); - const plan = buildExecutionPlan( - { - mode: "local", - surfaces: [], - passthroughArgs: [ - "src/auto-reply/reply/followup-runner.test.ts", - bundledPluginFile( - "discord", - "src/monitor/message-handler.preflight.acp-bindings.test.ts", - ), - ], - }, - { - env: {}, - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.targetedUnits).toHaveLength(2); - expect( - plan.targetedUnits - .map((unit) => unit.surface) - .toSorted((left, right) => left.localeCompare(right)), - ).toEqual(["base", "channels"]); - artifacts.cleanupTempArtifacts(); - }); - - it.each(["test/extension-test-boundary.test.ts", "test/web-search-provider-boundary.test.ts"])( - "routes targeted boundary inventories through the lean boundary config: %s", - (file) => { - const artifacts = createExecutionArtifacts({}); - const plan = buildExecutionPlan( - { - mode: "local", - surfaces: [], - passthroughArgs: [file], - }, - { - env: {}, - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.targetedUnits).toHaveLength(1); - expect(plan.targetedUnits[0]?.surface).toBe("unit"); - expect(plan.targetedUnits[0]?.args).toContain("vitest.boundary.config.ts"); - artifacts.cleanupTempArtifacts(); - }, - ); - - it("normalizes --bail=0 into collect-all failure policy", () => { - const artifacts = createExecutionArtifacts({}); - const plan = buildExecutionPlan( - { - mode: "local", - surfaces: ["unit"], - passthroughArgs: ["--bail=0"], - }, - { - env: {}, - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - expect(plan.failurePolicy).toBe("collect-all"); - expect(plan.passthroughOptionArgs).not.toContain("--bail=0"); - artifacts.cleanupTempArtifacts(); - }); - - it("explains runtime truth using the same catalog and worker policy", () => { - const explanation = explainExecutionTarget( - { - mode: "local", - fileFilters: ["src/auto-reply/reply/followup-runner.test.ts"], - }, - { - env: {}, - }, - ); - - expect(explanation.surface).toBe("base"); - expect(explanation.pool).toBe("forks"); - expect(explanation.reasons).toContain("base-pinned-manifest"); - expect(explanation.intentProfile).toBe("normal"); - }); - - it("routes synthetic bundled-plugin fixture tests through the bundled surface", () => { - const explanation = explainExecutionTarget( - { - mode: "local", - fileFilters: ["src/plugin-sdk/facade-runtime.test.ts"], - }, - { - env: {}, - }, - ); - - expect(explanation.surface).toBe("bundled"); - expect(explanation.args).toContain("vitest.bundled.config.ts"); - }); - - it("uses hotspot-backed memory isolation when explaining unit tests", () => { - const explanation = explainExecutionTarget( - { - mode: "local", - fileFilters: ["src/infra/outbound/channel-resolution.test.ts"], - }, - { - env: { - OPENCLAW_TEST_LOAD_AWARE: "0", - }, - }, - ); - - expect(explanation.isolate).toBe(true); - expect(explanation.reasons).toContain("unit-memory-isolated"); - }); - - it("normalizes absolute explain targets before classification", () => { - const relativeExplanation = explainExecutionTarget( - { - mode: "local", - fileFilters: ["src/infra/outbound/channel-resolution.test.ts"], - }, - { - env: { - OPENCLAW_TEST_LOAD_AWARE: "0", - }, - }, - ); - const absoluteExplanation = explainExecutionTarget( - { - mode: "local", - fileFilters: [path.join(process.cwd(), "src/infra/outbound/channel-resolution.test.ts")], - }, - { - env: { - OPENCLAW_TEST_LOAD_AWARE: "0", - }, - }, - ); - - expect(absoluteExplanation.file).toBe(relativeExplanation.file); - expect(absoluteExplanation.surface).toBe(relativeExplanation.surface); - expect(absoluteExplanation.pool).toBe(relativeExplanation.pool); - expect(absoluteExplanation.isolate).toBe(relativeExplanation.isolate); - expect(absoluteExplanation.reasons).toEqual(relativeExplanation.reasons); - }); - - it("explains timed-heavy extension suites as isolated", () => { - const explanation = explainExecutionTarget( - { - mode: "ci", - fileFilters: ["extensions/matrix/src/cli.test.ts"], - }, - { - env: { - CI: "true", - GITHUB_ACTIONS: "true", - }, - }, - ); - - expect(explanation.surface).toBe("extensions"); - expect(explanation.isolate).toBe(true); - expect(explanation.reasons).toContain("extensions-timed-heavy"); - }); - - it("explains timed-heavy channel suites as isolated", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - }; - const timedHeavyFile = resolveTimedHeavyChannelFixture(); - const explanation = explainExecutionTarget( - { - mode: "ci", - fileFilters: [timedHeavyFile], - }, - { - env, - }, - ); - - expect(explanation.surface).toBe("channels"); - expect(explanation.isolate).toBe(true); - expect(explanation.reasons).toContain("channels-timed-heavy"); - }); - - it("does not leak default-plan shard assignments into targeted units with the same id", () => { - const artifacts = createExecutionArtifacts({}); - const plan = buildExecutionPlan( - { - mode: "local", - fileFilters: ["src/cli/qr-dashboard.integration.test.ts"], - passthroughArgs: [], - }, - { - env: { - OPENCLAW_TEST_SHARDS: "4", - OPENCLAW_TEST_SHARD_INDEX: "2", - OPENCLAW_TEST_LOAD_AWARE: "0", - }, - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const targetedUnit = plan.targetedUnits.at(0); - const defaultUnitWithSameId = plan.allUnits.find((unit) => unit.id === targetedUnit?.id); - - expect(targetedUnit).toBeTruthy(); - expect(defaultUnitWithSameId).toBeTruthy(); - const targetedUnitRecord = targetedUnit!; - const defaultUnitRecord = defaultUnitWithSameId as typeof targetedUnitRecord; - - expect(defaultUnitRecord).not.toBe(targetedUnitRecord); - expect(plan.topLevelSingleShardAssignments.get(targetedUnitRecord)).toBeUndefined(); - expect(plan.topLevelSingleShardAssignments.get(defaultUnitRecord)).toBeDefined(); - - artifacts.cleanupTempArtifacts(); - }); - - it("pins the smallest CI include-file batches to fixed shards", () => { - const env = { - CI: "true", - GITHUB_ACTIONS: "true", - OPENCLAW_TEST_SHARDS: "4", - OPENCLAW_TEST_SHARD_INDEX: "1", - OPENCLAW_TEST_LOAD_AWARE: "0", - }; - const artifacts = createExecutionArtifacts(env); - const plan = buildExecutionPlan( - { - mode: "ci", - passthroughArgs: [], - }, - { - env, - platform: "linux", - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const shardableUnits = plan.parallelUnits.filter( - (unit) => - unit.id.startsWith("unit-fast-") && - Array.isArray(unit.includeFiles) && - unit.includeFiles.length > 0, - ); - const smallestIncludeCount = Math.min( - ...shardableUnits.map((unit) => unit.includeFiles.length), - ); - const smallestBatches = shardableUnits.filter( - (unit) => unit.includeFiles.length === smallestIncludeCount, - ); - - expect(smallestBatches.length).toBeGreaterThan(0); - expect(smallestBatches.every((unit) => typeof unit.fixedShardIndex === "number")).toBe(true); - expect( - smallestBatches.every((unit) => plan.topLevelSingleShardAssignments.get(unit) === undefined), - ).toBe(true); - - artifacts.cleanupTempArtifacts(); - }); - - it("removes planner temp artifacts when cleanup runs after planning", () => { - const artifacts = createExecutionArtifacts({}); - buildExecutionPlan( - { - mode: "local", - surfaces: ["unit"], - passthroughArgs: [], - }, - { - env: {}, - writeTempJsonArtifact: artifacts.writeTempJsonArtifact, - }, - ); - - const artifactDir = artifacts.ensureTempArtifactDir(); - expect(fs.existsSync(artifactDir)).toBe(true); - artifacts.cleanupTempArtifacts(); - expect(fs.existsSync(artifactDir)).toBe(false); - }); - - it("keeps fd-backed artifact streams writable after temp cleanup", async () => { - const artifacts = createExecutionArtifacts({}); - const artifactDir = artifacts.ensureTempArtifactDir(); - const logPath = path.join(artifactDir, "lane.log"); - const stream = createTempArtifactWriteStream(logPath); - - stream.write("before cleanup\n"); - artifacts.cleanupTempArtifacts(); - - await expect( - new Promise((resolve, reject) => { - stream.on("error", reject); - stream.write("after cleanup\n"); - stream.end(() => resolve()); - }), - ).resolves.toBeUndefined(); - expect(fs.existsSync(artifactDir)).toBe(false); - }); - - it("builds a CI manifest with planner-owned shard counts and matrices", () => { - const manifest = buildCIExecutionManifest( - { - eventName: "pull_request", - docsOnly: false, - docsChanged: false, - runNode: true, - runMacos: true, - runAndroid: true, - runWindows: true, - runSkillsPython: false, - hasChangedExtensions: true, - changedExtensionsMatrix: { include: [{ extension: "discord" }] }, - }, - { - env: {}, - }, - ); - - expect(manifest.jobs.buildArtifacts.enabled).toBe(true); - expect(manifest.shardCounts.unit).toBe(4); - expect(manifest.shardCounts.channels).toBe(3); - expect(manifest.shardCounts.extensionFast).toBeGreaterThanOrEqual(4); - expect(manifest.shardCounts.extensionFast).toBeLessThanOrEqual(6); - expect(manifest.shardCounts.windows).toBe(6); - expect(manifest.shardCounts.macosNode).toBe(9); - expect(manifest.jobs.checks.matrix.include).toHaveLength(7); - expect(manifest.jobs.checksWindows.matrix.include).toHaveLength(6); - expect(manifest.jobs.macosNode.matrix.include).toHaveLength(9); - expect(manifest.jobs.checksFast.matrix.include).toHaveLength( - manifest.shardCounts.extensionFast + 2, - ); - expect(manifest.requiredCheckNames).toContain("checks-fast-bundled"); - expect(manifest.jobs.checksFast.matrix.include).toEqual( - expect.arrayContaining([ - expect.objectContaining({ - check_name: "checks-fast-bundled", - command: "pnpm test:bundled", - }), - ]), - ); - expect( - manifest.jobs.checksFast.matrix.include - .filter((entry) => entry.task === "extensions") - .every( - (entry) => typeof entry.shard_count === "number" && typeof entry.shard_index === "number", - ), - ).toBe(true); - expect(manifest.jobs.macosSwift.enabled).toBe(true); - expect(manifest.requiredCheckNames).toContain("macos-swift"); - expect(manifest.requiredCheckNames).not.toContain("macos-swift-lint"); - expect(manifest.requiredCheckNames).not.toContain("macos-swift-build"); - expect(manifest.requiredCheckNames).not.toContain("macos-swift-test"); - expect(manifest.jobs.extensionFast.matrix.include).toEqual([ - { check_name: "extension-fast-discord", extension: "discord" }, - ]); - }); - - it("suppresses heavy CI jobs in docs-only manifests", () => { - const manifest = buildCIExecutionManifest( - { - eventName: "pull_request", - docsOnly: true, - docsChanged: true, - runNode: false, - runMacos: false, - runAndroid: false, - runWindows: false, - runSkillsPython: false, - hasChangedExtensions: false, - }, - { - env: {}, - }, - ); - - expect(manifest.jobs.buildArtifacts.enabled).toBe(false); - expect(manifest.jobs.checks.enabled).toBe(false); - expect(manifest.jobs.checksWindows.enabled).toBe(false); - expect(manifest.jobs.macosNode.enabled).toBe(false); - expect(manifest.jobs.checkDocs.enabled).toBe(true); - }); - - it("adds the push-only compat lane to push manifests", () => { - const manifest = buildCIExecutionManifest( - { - eventName: "push", - docsOnly: false, - docsChanged: false, - runNode: true, - runMacos: false, - runAndroid: false, - runWindows: false, - runSkillsPython: false, - hasChangedExtensions: false, - }, - { - env: {}, - }, - ); - - expect( - manifest.jobs.checks.matrix.include.some((entry) => entry.task === "compat-node22"), - ).toBe(true); - }); -}); - -describe("resolvePnpmCommandInvocation", () => { - it("prefers the parent pnpm CLI path when npm_execpath points to pnpm", () => { - expect( - resolvePnpmCommandInvocation({ - npmExecPath: "/opt/homebrew/lib/node_modules/corepack/dist/pnpm.cjs", - nodeExecPath: "/usr/local/bin/node", - platform: "linux", - }), - ).toEqual({ - command: "/usr/local/bin/node", - args: ["/opt/homebrew/lib/node_modules/corepack/dist/pnpm.cjs"], - }); - }); - - it("falls back to cmd.exe mediation on Windows when npm_execpath is unavailable", () => { - expect( - resolvePnpmCommandInvocation({ - npmExecPath: "", - platform: "win32", - comSpec: "C:\\Windows\\System32\\cmd.exe", - }), - ).toEqual({ - command: "C:\\Windows\\System32\\cmd.exe", - args: ["/d", "/s", "/c", "pnpm.cmd"], - }); - }); -}); - -describe("resolveVitestFsModuleCachePath", () => { - it("uses a lane-local cache path by default on non-Windows hosts", () => { - expect( - resolveVitestFsModuleCachePath({ - cwd: "/repo", - env: {}, - platform: "linux", - unitId: "unit-fast-1", - }), - ).toBe("/repo/node_modules/.experimental-vitest-cache/unit-fast-1"); - }); - - it("honors the requested Windows platform when building the cache path", () => { - expect( - resolveVitestFsModuleCachePath({ - cwd: "/repo", - env: { - OPENCLAW_VITEST_FS_MODULE_CACHE: "1", - }, - platform: "win32", - unitId: "unit-fast-1", - }), - ).toBe("\\repo\\node_modules\\.experimental-vitest-cache\\unit-fast-1"); - }); - - it("respects an explicit cache path override", () => { - expect( - resolveVitestFsModuleCachePath({ - cwd: "/repo", - env: { - OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: "/tmp/custom-vitest-cache", - }, - platform: "linux", - unitId: "unit-fast-1", - }), - ).toBe("/tmp/custom-vitest-cache"); - }); - - it("does not force a cache path when the cache is disabled", () => { - expect( - resolveVitestFsModuleCachePath({ - cwd: "/repo", - env: { - OPENCLAW_VITEST_FS_MODULE_CACHE: "0", - }, - platform: "linux", - unitId: "unit-fast-1", - }), - ).toBeUndefined(); - }); -}); diff --git a/test/scripts/test-runner-manifest.test.ts b/test/scripts/test-runner-manifest.test.ts deleted file mode 100644 index 67e2b58e3f5..00000000000 --- a/test/scripts/test-runner-manifest.test.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { - dedupeFilesPreserveOrder, - packFilesByDuration, - packFilesByDurationWithBaseLoads, - selectMemoryHeavyFiles, - selectTimedHeavyFiles, - selectUnitHeavyFileGroups, -} from "../../scripts/test-runner-manifest.mjs"; - -describe("scripts/test-runner-manifest timed selection", () => { - it("only selects known timed heavy files above the minimum", () => { - expect( - selectTimedHeavyFiles({ - candidates: ["a.test.ts", "b.test.ts", "c.test.ts"], - limit: 3, - minDurationMs: 1000, - exclude: new Set(["c.test.ts"]), - timings: { - defaultDurationMs: 250, - files: { - "a.test.ts": { durationMs: 2500 }, - "b.test.ts": { durationMs: 900 }, - "c.test.ts": { durationMs: 5000 }, - }, - }, - }), - ).toEqual(["a.test.ts"]); - }); -}); - -describe("scripts/test-runner-manifest memory selection", () => { - it("selects known memory hotspots above the minimum", () => { - expect( - selectMemoryHeavyFiles({ - candidates: ["a.test.ts", "b.test.ts", "c.test.ts", "d.test.ts"], - limit: 3, - minDeltaKb: 256 * 1024, - exclude: new Set(["c.test.ts"]), - hotspots: { - files: { - "a.test.ts": { deltaKb: 600 * 1024 }, - "b.test.ts": { deltaKb: 120 * 1024 }, - "c.test.ts": { deltaKb: 900 * 1024 }, - }, - }, - }), - ).toEqual(["a.test.ts"]); - }); - - it("orders selected memory hotspots by descending retained heap", () => { - expect( - selectMemoryHeavyFiles({ - candidates: ["a.test.ts", "b.test.ts", "c.test.ts"], - limit: 2, - minDeltaKb: 1, - hotspots: { - files: { - "a.test.ts": { deltaKb: 300 }, - "b.test.ts": { deltaKb: 700 }, - "c.test.ts": { deltaKb: 500 }, - }, - }, - }), - ).toEqual(["b.test.ts", "c.test.ts"]); - }); - - it("gives memory-heavy isolation precedence over timed-heavy buckets", () => { - expect( - selectUnitHeavyFileGroups({ - candidates: ["overlap.test.ts", "memory-only.test.ts", "timed-only.test.ts"], - behaviorOverrides: new Set(), - timedLimit: 3, - timedMinDurationMs: 1000, - memoryLimit: 3, - memoryMinDeltaKb: 256 * 1024, - timings: { - defaultDurationMs: 250, - files: { - "overlap.test.ts": { durationMs: 5000 }, - "timed-only.test.ts": { durationMs: 4200 }, - }, - }, - hotspots: { - files: { - "overlap.test.ts": { deltaKb: 900 * 1024 }, - "memory-only.test.ts": { deltaKb: 700 * 1024 }, - }, - }, - }), - ).toEqual({ - memoryHeavyFiles: ["overlap.test.ts", "memory-only.test.ts"], - timedHeavyFiles: ["timed-only.test.ts"], - }); - }); -}); - -describe("dedupeFilesPreserveOrder", () => { - it("removes duplicates while keeping the first-seen order", () => { - expect( - dedupeFilesPreserveOrder([ - "src/b.test.ts", - "src/a.test.ts", - "src/b.test.ts", - "src/c.test.ts", - "src/a.test.ts", - ]), - ).toEqual(["src/b.test.ts", "src/a.test.ts", "src/c.test.ts"]); - }); - - it("filters excluded files before deduping", () => { - expect( - dedupeFilesPreserveOrder( - ["src/a.test.ts", "src/b.test.ts", "src/c.test.ts", "src/b.test.ts"], - new Set(["src/b.test.ts"]), - ), - ).toEqual(["src/a.test.ts", "src/c.test.ts"]); - }); -}); - -describe("packFilesByDuration", () => { - it("packs heavier files into the lightest remaining bucket", () => { - const durationByFile = { - "src/a.test.ts": 100, - "src/b.test.ts": 90, - "src/c.test.ts": 20, - "src/d.test.ts": 10, - } satisfies Record; - - expect( - packFilesByDuration(Object.keys(durationByFile), 2, (file) => durationByFile[file] ?? 0), - ).toEqual([ - ["src/a.test.ts", "src/d.test.ts"], - ["src/b.test.ts", "src/c.test.ts"], - ]); - }); - - it("accounts for existing shard load when packing new work", () => { - const durationByFile = { - "src/a.test.ts": 100, - "src/b.test.ts": 90, - "src/c.test.ts": 20, - } satisfies Record; - - expect( - packFilesByDurationWithBaseLoads( - Object.keys(durationByFile), - 3, - (file) => durationByFile[file] ?? 0, - [0, 200, 10], - ), - ).toEqual([["src/a.test.ts", "src/c.test.ts"], [], ["src/b.test.ts"]]); - }); -}); diff --git a/test/scripts/test-update-memory-hotspots-sources.test.ts b/test/scripts/test-update-memory-hotspots-sources.test.ts deleted file mode 100644 index b89c430caa5..00000000000 --- a/test/scripts/test-update-memory-hotspots-sources.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import fs from "node:fs"; -import os from "node:os"; -import path from "node:path"; -import { afterEach, describe, expect, it, vi } from "vitest"; -import { loadHotspotInputTexts } from "../../scripts/test-update-memory-hotspots-sources.mjs"; - -const tempFiles = []; - -afterEach(() => { - for (const tempFile of tempFiles.splice(0)) { - try { - fs.unlinkSync(tempFile); - } catch { - // Ignore temp cleanup races in tests. - } - } -}); - -describe("test-update-memory-hotspots source loading", () => { - it("loads local log files with basename-derived source names", () => { - const tempLog = path.join(os.tmpdir(), `openclaw-hotspots-${Date.now()}.log`); - tempFiles.push(tempLog); - fs.writeFileSync(tempLog, "local log"); - - expect(loadHotspotInputTexts({ logPaths: [tempLog] })).toEqual([ - { sourceName: path.basename(tempLog, ".log"), text: "local log" }, - ]); - }); - - it("loads GitHub Actions job logs through gh", () => { - const execFileSyncImpl = vi.fn(() => "remote log"); - - expect( - loadHotspotInputTexts({ - ghJobs: ["69804189668"], - execFileSyncImpl, - }), - ).toEqual([{ sourceName: "gh-job-69804189668", text: "remote log" }]); - expect(execFileSyncImpl).toHaveBeenCalledWith( - "gh", - ["run", "view", "--job", "69804189668", "--log"], - { - encoding: "utf8", - maxBuffer: 64 * 1024 * 1024, - }, - ); - }); - - it("loads GitHub Actions run jobs and filters by job name", () => { - const execFileSyncImpl = vi.fn((command, args) => { - if ( - command === "gh" && - args[0] === "run" && - args[1] === "view" && - args[2] === "23933168654" && - args[3] === "--json" && - args[4] === "jobs" - ) { - return JSON.stringify({ - jobs: [ - { databaseId: 69804189668, name: "checks-fast-extensions-1" }, - { databaseId: 69804189669, name: "build-smoke" }, - ], - }); - } - if (command === "gh" && args[0] === "run" && args[1] === "view" && args[2] === "--job") { - return `job-log-${args[3]}`; - } - throw new Error("unexpected gh call"); - }); - - expect( - loadHotspotInputTexts({ - ghRuns: ["23933168654"], - ghRunJobMatches: ["extensions"], - execFileSyncImpl, - }), - ).toEqual([{ sourceName: "gh-job-69804189668", text: "job-log-69804189668" }]); - expect(execFileSyncImpl).toHaveBeenCalledWith( - "gh", - ["run", "view", "23933168654", "--json", "jobs"], - { - encoding: "utf8", - maxBuffer: 8 * 1024 * 1024, - }, - ); - const jobLogCalls = execFileSyncImpl.mock.calls.filter( - (call) => call[0] === "gh" && call[1][2] === "--job", - ); - expect(jobLogCalls).toEqual([ - [ - "gh", - ["run", "view", "--job", "69804189668", "--log"], - { - encoding: "utf8", - maxBuffer: 64 * 1024 * 1024, - }, - ], - ]); - }); -}); diff --git a/test/scripts/test-update-memory-hotspots-utils.test.ts b/test/scripts/test-update-memory-hotspots-utils.test.ts deleted file mode 100644 index 18c2fe318da..00000000000 --- a/test/scripts/test-update-memory-hotspots-utils.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { matchesHotspotSummaryLane } from "../../scripts/test-update-memory-hotspots-utils.mjs"; - -describe("test-update-memory-hotspots lane matching", () => { - it("matches the exact target lane", () => { - expect(matchesHotspotSummaryLane("unit-fast", "unit-fast")).toBe(true); - }); - - it("matches configured lane prefixes", () => { - expect(matchesHotspotSummaryLane("unit-chat-memory-isolated", "unit-fast", ["unit-"])).toBe( - true, - ); - }); - - it("rejects unrelated lanes", () => { - expect(matchesHotspotSummaryLane("extensions", "unit-fast", ["unit-"])).toBe(false); - }); -}); diff --git a/test/test-runner-manifest.test.ts b/test/test-runner-manifest.test.ts deleted file mode 100644 index aa4e0f09327..00000000000 --- a/test/test-runner-manifest.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { - loadChannelTimingManifest, - loadTestRunnerBehavior, -} from "../scripts/test-runner-manifest.mjs"; -import { bundledPluginDirPrefix, bundledPluginFile } from "./helpers/bundled-plugin-paths.js"; - -describe("loadTestRunnerBehavior", () => { - it("loads channel isolated entries from the behavior manifest", () => { - const behavior = loadTestRunnerBehavior(); - const files = behavior.channels.isolated.map((entry) => entry.file); - - expect(files).toContain( - bundledPluginFile("discord", "src/monitor/message-handler.preflight.acp-bindings.test.ts"), - ); - }); - - it("loads channel isolated prefixes from the behavior manifest", () => { - const behavior = loadTestRunnerBehavior(); - - expect(behavior.channels.isolatedPrefixes).toContain( - bundledPluginDirPrefix("discord", "src/monitor"), - ); - }); - - it("loads channel timing metadata from the timing manifest", () => { - const timings = loadChannelTimingManifest(); - - expect(timings.config).toBe("vitest.channels.config.ts"); - expect(Object.keys(timings.files).length).toBeGreaterThan(0); - }); -}); diff --git a/test/vitest-config.test.ts b/test/vitest-config.test.ts index 0bf35c86b9e..61b33abf1a8 100644 --- a/test/vitest-config.test.ts +++ b/test/vitest-config.test.ts @@ -1,27 +1,8 @@ import { describe, expect, it } from "vitest"; -import { - resolveExecutionBudget, - resolveRuntimeCapabilities, -} from "../scripts/test-planner/runtime-profile.mjs"; import baseConfig, { resolveLocalVitestMaxWorkers } from "../vitest.config.ts"; -function resolveHighMemoryLocalRuntime() { - return resolveRuntimeCapabilities( - { - RUNNER_OS: "macOS", - }, - { - cpuCount: 16, - totalMemoryBytes: 128 * 1024 ** 3, - platform: "darwin", - mode: "local", - loadAverage: [0.2, 0.2, 0.2], - }, - ); -} - describe("resolveLocalVitestMaxWorkers", () => { - it("derives a mid-tier local cap for 64 GiB hosts", () => { + it("derives a moderate local cap for 64 GiB hosts", () => { expect( resolveLocalVitestMaxWorkers( { @@ -30,8 +11,6 @@ describe("resolveLocalVitestMaxWorkers", () => { { cpuCount: 10, totalMemoryBytes: 64 * 1024 ** 3, - platform: "darwin", - loadAverage: [0.1, 0.1, 0.1], }, ), ).toBe(4); @@ -52,165 +31,42 @@ describe("resolveLocalVitestMaxWorkers", () => { ).toBe(2); }); - it("maps the legacy low profile to serial intent for compatibility", () => { - const runtime = resolveRuntimeCapabilities( - { - OPENCLAW_TEST_PROFILE: "low", - RUNNER_OS: "Linux", - }, - { - cpuCount: 8, - totalMemoryBytes: 32 * 1024 ** 3, - platform: "linux", - mode: "local", - }, - ); - - expect(runtime.intentProfile).toBe("serial"); + it("respects the legacy OPENCLAW_TEST_WORKERS override too", () => { + expect( + resolveLocalVitestMaxWorkers( + { + OPENCLAW_TEST_WORKERS: "3", + }, + { + cpuCount: 16, + totalMemoryBytes: 128 * 1024 ** 3, + }, + ), + ).toBe(3); }); - it("classifies 64 GiB local macOS hosts as mid-memory capabilities", () => { - const runtime = resolveRuntimeCapabilities( - { - RUNNER_OS: "macOS", - }, - { - cpuCount: 10, - totalMemoryBytes: 64 * 1024 ** 3, - platform: "darwin", - mode: "local", - loadAverage: [0.2, 0.2, 0.2], - }, - ); - - expect(runtime.runtimeProfileName).toBe("local-darwin"); - expect(runtime.memoryBand).toBe("mid"); - expect(runtime.loadBand).toBe("idle"); + it("keeps memory-constrained hosts conservative", () => { + expect( + resolveLocalVitestMaxWorkers( + {}, + { + cpuCount: 16, + totalMemoryBytes: 16 * 1024 ** 3, + }, + ), + ).toBe(2); }); - it("does not classify 64 GiB non-macOS hosts as constrained locals", () => { - const runtime = resolveRuntimeCapabilities( - { - RUNNER_OS: "Linux", - }, - { - cpuCount: 16, - totalMemoryBytes: 64 * 1024 ** 3, - platform: "linux", - mode: "local", - loadAverage: [0.2, 0.2, 0.2], - }, - ); - - expect(runtime.memoryBand).toBe("mid"); - expect(runtime.runtimeProfileName).toBe("local-linux"); - }); - - it("reduces local budgets when the host is busy", () => { - const runtime = resolveRuntimeCapabilities( - { - RUNNER_OS: "Linux", - }, - { - cpuCount: 10, - totalMemoryBytes: 16 * 1024 ** 3, - platform: "linux", - mode: "local", - loadAverage: [9.5, 9.5, 9.5], - }, - ); - const budget = resolveExecutionBudget(runtime); - - expect(runtime.memoryBand).toBe("constrained"); - expect(runtime.loadBand).toBe("busy"); - expect(budget.vitestMaxWorkers).toBe(1); - expect(budget.topLevelParallelLimit).toBe(1); - }); - - it("keeps 64 GiB hosts mid-tier but scales them down under saturation", () => { - const runtime = resolveRuntimeCapabilities( - { - RUNNER_OS: "Linux", - }, - { - cpuCount: 10, - totalMemoryBytes: 64 * 1024 ** 3, - platform: "linux", - mode: "local", - loadAverage: [11.5, 11.5, 11.5], - }, - ); - const budget = resolveExecutionBudget(runtime); - - expect(runtime.memoryBand).toBe("mid"); - expect(runtime.loadBand).toBe("saturated"); - expect(budget.vitestMaxWorkers).toBe(2); - expect(budget.unitIsolatedWorkers).toBe(1); - expect(budget.deferredRunConcurrency).toBe(1); - }); - - it("backs off isolated workers and shrinks unit batches on saturated high-memory locals", () => { - const runtime = resolveRuntimeCapabilities( - { - RUNNER_OS: "macOS", - }, - { - cpuCount: 16, - totalMemoryBytes: 128 * 1024 ** 3, - platform: "darwin", - mode: "local", - loadAverage: [18, 18, 18], - }, - ); - const budget = resolveExecutionBudget(runtime); - - expect(runtime.memoryBand).toBe("high"); - expect(runtime.loadBand).toBe("saturated"); - expect(budget.unitIsolatedWorkers).toBe(1); - expect(budget.unitFastBatchTargetMs).toBe(22_500); - }); - - it("keeps CI windows policy constrained independently of host load", () => { - const runtime = resolveRuntimeCapabilities( - { - CI: "true", - RUNNER_OS: "Windows", - }, - { - cpuCount: 32, - totalMemoryBytes: 128 * 1024 ** 3, - platform: "win32", - mode: "ci", - loadAverage: [0, 0, 0], - }, - ); - const budget = resolveExecutionBudget(runtime); - - expect(runtime.runtimeProfileName).toBe("ci-windows"); - expect(budget.vitestMaxWorkers).toBe(2); - expect(budget.topLevelParallelLimit).toBe(2); - }); - - it("enables shared channel batching on high-memory local hosts", () => { - const runtime = resolveHighMemoryLocalRuntime(); - const budget = resolveExecutionBudget(runtime); - - expect(runtime.memoryBand).toBe("high"); - expect(runtime.loadBand).toBe("idle"); - expect(budget.channelsBatchTargetMs).toBe(30_000); - expect(budget.channelSharedWorkers).toBe(5); - expect(budget.deferredRunConcurrency).toBe(8); - expect(budget.topLevelParallelLimitNoIsolate).toBe(14); - }); - - it("uses a coarser shared extension batch target on high-memory local hosts", () => { - const runtime = resolveHighMemoryLocalRuntime(); - const budget = resolveExecutionBudget(runtime); - - expect(runtime.memoryBand).toBe("high"); - expect(runtime.loadBand).toBe("idle"); - expect(budget.extensionsBatchTargetMs).toBe(300_000); - expect(budget.extensionWorkers).toBe(5); + it("lets roomy hosts use a higher default cap", () => { + expect( + resolveLocalVitestMaxWorkers( + {}, + { + cpuCount: 16, + totalMemoryBytes: 128 * 1024 ** 3, + }, + ), + ).toBe(6); }); });