openclaw/test
Peter Steinberger 430eeb8296
fix(test): process-wait helpers race their own wall-clock deadlines; bind them to the test's abort signal (#163321)
test/helpers/process-wait.ts still owned wall-clock deadlines: waitForFile, waitForPidFile, waitForDead, and waitForChildClose each raced the awaited condition against their own timeoutMs, so every caller inherited a hidden race that healthy work could lose on a loaded host. This is the final step of the polling audit from #162274; earlier batches converted the call sites that had an owned signal.

The helpers now take the AbortSignal that bounds them. waitForFile, waitForPidFile, and waitForDead share one private observation loop (the existing 5 ms re-check, one final observation before rejecting on abort, path/PID diagnostics with signal.reason as the cause, timer/listener cleanup on settle; fake-clock callers keep an injectable real delay). waitForChildClose resolves from the child's own close event and rejects only on abort, and documents registering at spawn because exitCode/signalCode cannot recover a missed close. All 35 calls in 17 files moved: test bodies pass the Vitest test signal; cleanup paths that may run after the test signal has aborted use an explicit named AbortSignal.timeout(<old value>) cleanup guard at the call site, keeping each old bound exactly; five readiness waits that cannot reach a test signal keep a named guard as a recorded escape hatch. process-wait.test.ts replaces its deadline-specific cases with signal and real-child contracts. No product source, Vitest timeout, TERM-to-KILL timing, or caller assertion changed.

Proof: process-wait.test.ts 20/20 locally; on Blacksmith Testbox 20/20 standalone runs for six changed files and the Gateway E2E agent-exec plugin test, 10/10 for the other six (Testbox saturation blocked the second ten), the Windows-native file collect-only on Linux and green in CI's Windows shards, five owning-shard replays (failures only in main reds since fixed by #163310); tsgo:test:root, tsgo:core:test, tsgo core boundary, CI lint wrapper, deadcode, base-aware timeout-race ratchet; Codex autoreview and ClawSweeper clean.
2026-10-02 00:48:49 -07:00
..
contracts
e2e fix(test): QA Lab OTEL, hot-reload, node MCP, and exec lifecycle e2e tests fail on loaded hosts when fixture children outlast polling deadlines (#163314) 2026-10-02 00:39:21 -07:00
fixtures fix(test): Telegram skill runtime, runner, and triage tests fail on loaded hosts (#163108) 2026-10-01 23:29:18 -07:00
helpers fix(test): process-wait helpers race their own wall-clock deadlines; bind them to the test's abort signal (#163321) 2026-10-02 00:48:49 -07:00
mocks
plugins fix(cron): keep legacy repair in Doctor (#160448) 2026-10-01 18:24:12 +00:00
scripts fix(test): process-wait helpers race their own wall-clock deadlines; bind them to the test's abort signal (#163321) 2026-10-02 00:48:49 -07:00
tsconfig chore(ci): restore other and infra core type graph headroom (#163102) 2026-10-02 02:39:12 -05:00
type-contracts
types refactor: delete unreferenced production code (#159847) 2026-09-29 21:47:06 -07:00
vitest fix(agents): release model and auth readers when deleting agents (#159013) 2026-10-02 02:30:07 -05:00
agent-exec-code-mode.live.test.ts
AGENTS.md
apns-worker-test-ownership.test.ts
appcast.test.ts
architecture-smells.test.ts
buzz-account-config-mutation.test.ts
canonical-descendant.integration.test.ts refactor(mcp): bind idle cleanup to the lifecycle scheduler (#159481) 2026-09-27 22:54:48 +00:00
channel-message-read-authority.integration.test.ts
clawrouter-managed-gateway.e2e.test.ts
cli-json-stdout.agents.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.automation.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.config.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.gateway.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.hooks.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.models.e2e.test.ts fix(test): align model refresh CLI expectation with live catalog updates 2026-10-01 03:42:53 -07:00
cli-json-stdout.plugins.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.sessions.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.skills.e2e.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
cli-json-stdout.test-support.ts
cli-message-authority.integration.test.ts
cli-state-sqlite.e2e.test.ts
codex-node-cancellation.integration.test.ts
codex-settled-turn-finalization.integration.test.ts
control-ui-import-boundary.test.ts
conversation-tools.codex.integration.test.ts
copilot-tool-policy-handoff.integration.test.ts fix(test): session-store suites fail teardown with ENOTEMPTY while agent-database workers are live (#161871) 2026-10-01 17:10:24 +00:00
copilot-tool-policy-handoff.live.test.ts
cron-conversation-delivery.codex.integration.test.ts
cron-edit-trigger-preservation.e2e.test.ts
cron-message-read.integration.test.ts fix(test): Gateway e2e connect fails with 1006 when another fixture takes the instance port (#163003) 2026-10-01 23:04:05 -07:00
decision-typesafe-admission.integration.test.ts feat: optionally omit tools on conversational turns (#153340) 2026-10-01 09:33:15 -07:00
discord-live-policy.integration.test.ts
discord-metadata-read-authority.integration.test.ts
docker-entrypoint.test.ts
doctor-copied-state-migration.e2e.test.ts
doctor-lease-contention.e2e.test.ts fix(state): keep agent database admission open across transient lease contention (#162750) 2026-10-01 08:16:07 -07:00
doctor-legacy-whatsapp-ack-migration.e2e.test.ts
dreaming-startup-cleanup.e2e.test.ts
embedded-transcript-cursor.e2e.test.ts
extension-import-boundaries.test.ts
extension-test-boundary.test.ts
external-script-modules.d.ts fix(release): release notes abort when a commit body mentions a deleted PR (#160305) 2026-09-28 02:11:49 -07:00
feishu-message-mutations.integration.test.ts
feishu-message-read-authority.integration.test.ts
gateway-a2a.e2e.test.ts
gateway-account-history.e2e.test.ts
gateway-cold-agent-abort.e2e.test.ts fix(test): Gateway e2e connect fails with 1006 when another fixture takes the instance port (#163003) 2026-10-01 23:04:05 -07:00
gateway-completion-replay.e2e.test.ts
gateway-copied-codex-session-resume.e2e.test.ts
gateway-external-state-ownership.e2e.test.ts
gateway-hook-concurrency.e2e.test.ts
gateway-no-op-mutation.e2e.test.ts
gateway-openai-compaction-replay.e2e.test.ts
gateway-queued-session-rotation.e2e.test.ts
gateway-restored-requester-settle.e2e.test.ts fix(agents): finished subagents fail to wake their parent when registry writes overlap (#163195) 2026-10-02 01:12:56 -05:00
gateway-rpc-exporters.test.ts
gateway-session-end-shutdown.e2e.test.ts
gateway-steer-fifo.e2e.test.ts
gateway-subagent-restart.live.test.ts fix(agents): finished subagents fail to wake their parent when registry writes overlap (#163195) 2026-10-02 01:12:56 -05:00
gateway-widget-restart.live.test.ts
gateway.multi.e2e.test.ts
git-hooks-pre-commit-boundaries.test.ts fix(git-hooks): use qualified tooling for missing formatter (#162866) 2026-10-02 04:28:51 +07:00
git-hooks-pre-commit.test-support.ts
git-hooks-pre-commit.test.ts fix(git-hooks): use qualified tooling for missing formatter (#162866) 2026-10-02 04:28:51 +07:00
github-cli-preflight.e2e.test.ts
huggingface-local-app-openclaw.e2e.test.ts
image-generation.infer-cli.live.test.ts
image-generation.runtime.live.test.ts
imessage-reply-alias.integration.test.ts
jsdom-compat.mts fix(test): retire MCP managers between shared test files (#159800) 2026-10-01 16:34:10 -07:00
jsdom-compat.test.ts fix(cli): release plugin resources when help finishes (#160181) 2026-09-30 15:28:57 -07:00
jsdom-custom-elements.test.ts
jsdom-custom-elements.ts
line-question-gateway.test.ts
linux-dashboard-recovery.test.ts
linux-quickchat-stream.test.ts
loopback-ask-user-telegram-channel.test.ts
matrix-channel-read-authority.integration.test.ts
matrix-client-crypto-authority.integration.test.ts
matrix-transport-read-authority.integration.test.ts
mcp-show-redact.e2e.test.ts
model-account-catalog-authority.integration.test.ts refactor(state): resolve Gateway profiles in state workers (#162414) 2026-09-30 23:56:27 -07:00
msteams-read-authority.integration.test.ts
msteams-read-target.integration.test.ts
node-host-launcher.test.ts
non-isolated-runner.agent-reader-fixtures.ts
non-isolated-runner.gateway-lifecycle-fixtures.ts
non-isolated-runner.mcp-fixtures.ts fix(test): retire MCP managers between shared test files (#159800) 2026-10-01 16:34:10 -07:00
non-isolated-runner.mock-resolution-fixtures.ts
non-isolated-runner.skills-watcher-fixtures.ts fix(test): leaked skills watchers flake later fake-timer tests instead of failing their file (#162454) 2026-10-01 06:49:49 -07:00
non-isolated-runner.sqlite-fixtures.ts fix: retain shared-state snapshots through worker failures (#160946) 2026-09-29 07:40:30 -07:00
non-isolated-runner.sqlite.test.ts fix(test): retire subagent sweepers before SQLite owners 2026-09-28 23:38:55 -07:00
non-isolated-runner.test-api-fixtures.ts
non-isolated-runner.test.ts fix(test): retire MCP managers between shared test files (#159800) 2026-10-01 16:34:10 -07:00
non-isolated-runner.ts fix(test): retire MCP managers between shared test files (#159800) 2026-10-01 16:34:10 -07:00
npm-publish-plan.test.ts chore(release): retire the internal Tideclaw alpha release track (#160261) 2026-09-28 10:01:49 -07:00
oauth-refresh-authority-chain.e2e.test.ts test(e2e): seed OAuth authority-chain shared store through its owner 2026-09-28 18:48:40 -07:00
official-channel-catalog.test.ts fix(agentmail): allow official ClawHub channel to load (#155097) 2026-09-28 16:10:33 -07:00
onboard-plugin-warnings.e2e.test.ts
openai-model-discovery-auth-order.test.ts
openai-onboarding.live.test.ts
openclaw-launcher-version.e2e.test.ts
openclaw-launcher.e2e.test.ts
openclaw-npm-postpublish-verify.test.ts fix(release): verify legacy published chunk ownership (#163019) 2026-10-01 15:29:41 -07:00
openclaw-npm-prepublish-verify.test.ts
openclaw-npm-release-check.test.ts test(core,plugins,ui): remove low-value tests (batch d120) (#162222) 2026-10-01 03:24:15 +00:00
openclaw-prepack.test.ts
outbound-sanitize-text-delivery.test.ts
package-manager-config.test.ts
package-scripts.test.ts fix(browser): read Windows browser version via environment data so spaced paths stop breaking the PowerShell probe (#160432) 2026-09-29 02:51:17 +05:30
plugin-clawhub-metadata.test.ts
plugin-clawhub-release.test.ts fix(release): skip pending ClawHub publications and surface recovery for failed ones (#161985) 2026-09-30 09:35:54 -07:00
plugin-cron-registry-owner.e2e.test.ts fix(test): Gateway e2e connect fails with 1006 when another fixture takes the instance port (#163003) 2026-10-01 23:04:05 -07:00
plugin-extension-import-boundary.test.ts
plugin-npm-package-manifest.test.ts fix(scripts): restore failed plugin packaging overlays 2026-09-30 23:57:09 -07:00
plugin-npm-release.test.ts chore(release): retire the internal Tideclaw alpha release track (#160261) 2026-09-28 10:01:49 -07:00
plugin-npm-runtime-build.test.ts fix(test): install isolation and preload probes under Bun (#162496) 2026-10-01 03:05:03 -07:00
pr111899-accepted-run-transport-loss.e2e.test.ts
pr119473-real-runtime-proof.e2e.test.ts
pr126853-heartbeat-visible-lane-proof.e2e.test.ts
pr142176-real-runtime-proof.e2e.test.ts
pr150623-active-context-preflight.e2e.test.ts fix: restore lint for active-context preflight fixture (#162743) 2026-10-01 07:16:25 -07:00
pr154462-real-runtime-proof.e2e.test.ts fix(agents): keep active turns working through configuration reloads (#154462) 2026-09-27 15:50:52 -07:00
progress-card-channel-literals.integration.test.ts
provider-auth-method.openai-siwc.integration.test.ts test(openai): retain SIWC callback port ownership across logins 2026-09-30 18:04:04 -07:00
provider-auth-method.radius.integration.test.ts
qa-channel-message-tool-delivery.test.ts
qa-convex-credential-payload-validation.test.ts
release-check.test.ts fix(release): verify legacy published chunk ownership (#163019) 2026-10-01 15:29:41 -07:00
release-version.test.ts
repository-test-api-publications.ts improve: sessions_send delivers a peer's reply once instead of running automatic agent ping-pong (#162227) 2026-10-01 17:28:00 +00:00
runtime-agent.codex-initialization.integration.test.ts
scripts-update-gateway-build.test.ts fix(update): keep native service identities during discovery (#161238) 2026-09-29 16:05:40 -07:00
scripts-update-gateway-legacy.test.ts test: select Node for maintainer tooling fixtures (#162550) 2026-10-01 02:20:15 -07:00
scripts-update-gateway.test.ts fix(update): prepare source replacements before service stop (#161110) 2026-09-29 03:02:35 -07:00
setup-home-isolation.test.ts
setup-openclaw-runtime.plugin-cache.test.ts fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
setup-openclaw-runtime.ts refactor(plugin-sdk)!: retire deprecated compatibility facades (#162333) 2026-10-01 04:12:01 -07:00
setup.env.ts
setup.extensions.ts fix(runtime): join unbound native workers during shutdown (#161558) 2026-09-29 22:53:01 -07:00
setup.shared.ts
setup.signal.ts
setup.ts
signal-approval-forwarding.integration.test.ts
skill-usage.codex.integration.test.ts
skills-proposal-manual-target.e2e.test.ts
skills-watcher-test-lifecycle.ts fix(test): retire MCP managers between shared test files (#159800) 2026-10-01 16:34:10 -07:00
slack-download-read-authority.integration.test.ts
slack-outbound-permanent-rejection-loopback.test.ts
sqlite-test-lifecycle.ts fix(test): prevent SQLite pathname failures in shared Gateway shards (#160838) 2026-09-29 01:53:26 +00:00
stable-release-closeout.test.ts
status-shared-state-readonly.e2e.test.ts fix(test): keep absent Gateway status fixtures unreachable (#161032) 2026-09-29 00:58:46 -07:00
storage-locations-r2.test.ts feat: back up to external disks and Cloudflare R2 with storage locations (#161913) 2026-10-01 02:05:44 -07:00
subagent-announce-origin.integration.test.ts
subagent-requester-owner.e2e.test.ts fix(agents): finished subagents fail to wake their parent when registry writes overlap (#163195) 2026-10-02 01:12:56 -05:00
system-agent-managed-auth.e2e.test.ts
talk-browser-defaults.test.ts
telegram-history-read.integration.test.ts
telegram-outbound-permanent-rejection-loopback.test.ts
telegram-question-gateway.test.ts refactor(gateway): schedule question deadlines (#160334) 2026-09-28 05:02:09 -07:00
telegram-recovery-notice-send.test.ts
telegram-reply-conversation.test.ts
test-env.state-lifetime.test.ts
test-env.test.ts
test-env.ts
test-helper-extension-import-boundary.test.ts
test-home-context.mts
test-home-policy.mts
transcripts-discord-audio.integration.test.ts
transcripts-tool.discord-lifecycle.integration.test.ts perf(sessions): reduce recovery ownership-check allocations (#160831) 2026-09-29 03:45:31 +00:00
transcripts-tool.discord-provider.integration.test.ts fix: prevent Gateway shutdown failures after in-place updates (#160674) 2026-09-30 19:20:24 -07:00
tsconfig.json
twitch-message-tool-delivery.test.ts
ui.presenter-next-run.test.ts
visitor-access-revocation.test.ts fix: invite GitHub visitors without a public email (#162666) 2026-10-01 17:12:53 +01:00
vitest-boundary-config.test.ts
vitest-cli-ownership.test.ts
vitest-credential-redaction.test.ts
vitest-dependency-resolution.test.ts
vitest-light-paths.test.ts
vitest-performance-config.test.ts
vitest-pr-exempt-retention.test.ts refactor: use fs-safe for file watching and preserve Doctor plugin captures (#159226) 2026-09-29 01:05:11 -07:00
vitest-projects-config.test-support.ts
vitest-projects-config.test.ts fix: preserve owner access after child follow-up results (#160018) 2026-09-28 11:51:36 -04:00
vitest-redacting-reporter.test.ts
vitest-reporters-config.test.ts
vitest-scoped-config.test.ts fix(plugins): enforce SDK alias scope and captured denial on Bun (#163198) 2026-10-01 23:09:00 -05:00
vitest-ui-e2e-config.test.ts fix(qa): Inspector collection fails when a pairing link is reused (#161540) 2026-09-30 01:48:56 -05:00
vitest-ui-e2e-prebuilt.test.ts
vitest-ui-e2e-preflight.test.ts
vitest-ui-package-config.test.ts test: run runtime-neutral GC-retention checks under Bun (#162667) 2026-10-01 05:41:02 -07:00
vitest-unit-config.test.ts
vitest-unit-fast-config.test.ts perf(ci): run qualified unit tests with native Bun (#159988) 2026-10-01 17:28:11 -07:00
vitest-unit-paths.test.ts