Repository navigation
test(core,plugins,ui): remove low-value tests (batch d211) - #165505
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 5, 2026, 6:33 AM ET / 10:33 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch removes redundant tests and unused fixtures across core, plugins, and Control UI, consolidates retained cases, and shrinks test inventories. Merge readiness⛔ Blocked before merge - 2 items remain This remains useful test maintenance that current main has not absorbed. No concrete introduced defect was found in the reviewed hunks, and the sampled security and lifecycle contracts retain stronger coverage. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s test suites exercise runtime contracts through shared fixtures and owner-focused scenarios. Test inventories assign those files to Vitest projects whose results feed the CI merge gate. flowchart LR
A[Test files] --> B[Shared fixtures]
A --> C[Test project routing]
B --> D[Vitest execution]
C --> D
D --> E[Behavior assertions]
E --> F[CI merge gate]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one strong owner-boundary suite per contract, consolidate duplicate fixtures, and preserve distinct security, migration, race, and regression coverage. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reduces and consolidates tests rather than repairing a reported production bug; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes: the sampled consolidations preserve stronger owner-boundary assertions and remove obsolete inventory entries without adding competing runtime implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 583abe2eba27. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…165505) * test(gateway): deslop w0047 tests * test(daemon-cli): deslop w0051 tests * test(telegram): deslop w0046 tests * test(subagents): deslop w0044 tests * test(config): deslop w0054 tests * test(infra): deslop w0055 tests * test(slack): deslop w0059 tests * test(browser): deslop w0056 tests * test(daemon): deslop w0048 tests * test(ui): deslop w0057 tests * test: refresh mock export baseline after replay * test: retain distinct security and lifecycle coverage * test: repair restored pairing and launcher fixtures
What Problem This Solves
The test suite has duplicate behavioral variants, implementation-mirroring checks, and split suites whose useful assertions are already exercised by stronger owner tests. This batch removes those low-value cases and unused test helpers while retaining distinct security, authority, lifecycle, ordering, and regression coverage.
User Impact
No production runtime behavior changes. The changes are limited to tests, test-only support, and shrink-only maintenance of test inventories and the mock-export baseline. The smaller suite is easier to maintain; no CI runtime improvement is claimed from historical single-run timings.
Actual replay diff: production runtime +0/−0; tests +6,268/−15,173; test support +200/−516; test inventories/configuration +0/−12. Total +6,468/−15,701, a net reduction of 9,233 lines across 115 files.
Why This Change Was Made
The original reductions used per-case evidence, source and history review, and aggregate covered-statement/branch comparisons. Coverage-redundant cases were retained when they protected a distinct authority boundary, race, or documented regression. Useful cases consolidated into sibling files keep their original test-project ownership. The historical declaration-reduction target was met only by w0047; the other shards stopped at the meaningful retention boundary.
The replay preserves current main behavior:
schtasks.install.test.tsis kept entirely because main rewrote its unattended-boot behavior.schtasks.test.tskeeps main's new parser cases. Settlement tests retain main's new registration and Node replacement races, with imports merged accordingly.No changed path matches the current CODEOWNERS file.
Evidence
Replay base
0fcf666b5008683775c9a2d7b51628d1cdd0f2fc, head82588349fa92f8729eb31a07d144f2bb897f6d29. All ten source commits applied; no entire commit was skipped. The main-specific adaptations above and review restorations narrow the original deletions.pnpm install --frozen-lockfile --prefer-offline: passed.oxfmt --check, plainoxlint -c .oxlintrc.json, andgit diff --check: passed (exit 0). The mock-export baseline was recomputed with the repository prune tool.CI=1 pnpm test <files>attempt on Blacksmith Testboxtbx_01m45n007200fyy6bmkdkw9xtpnever obtained a runner and was stopped. No tests executed and no test verdict is claimed. An AWS fallback was canceled before execution for the review restorations; its canceled lease creation is absent from the coordinator.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <changed paths>was launched for the restored tree on Blacksmith Testboxtbx_01m45rcq73zgy3ehqnjedkyb2n, which remained queued and was stopped without executing checks. The first hosted CI run found two replay fixture errors: an unavailable Telegram mock binding and VBS-only content supplied to a retained CMD case. Both are repaired in this head using the existing mock getter and original per-kind launcher fixture. Plain lint and a fresh independent review of both repairs pass; the targeted Testbox rerun is awaiting source preparation. Hosted exact-head CI is the merge gate under the campaign infrastructure-gap rule. The previous per-shard test and coverage evidence is listed separately below.The following are historical in-shard measurements, not proof for this replay onto current main. Counts can differ from the final PR because main added or rewrote tests and the replay preserves those changes. Historical test LOC excludes separately reported helper/inventory changes. Covered-unit totals are recorded exactly as the shard comparison produced them; different shards overlap and must not be summed into a repository coverage claim.
Historical caveats: w0046 passed all 198 remaining case bodies and its coverage comparison before the final filename-only consolidation. The final filename-layout rerun lost its lease with exit 255 and its retry remained queued; the final-layout coverage refresh and changed checks were not completed in that shard. w0054's initial report says coverage was pending, but its later completion log closes that gap: all four coverage groups passed, with 2,513 covered statements unchanged and branches decreasing from 1,828 to 1,824. Other historical check gaps or unrelated baseline failures are not substitutes for fresh replay validation. Windows native identity admission was not established by the historical Linux proof.
Historical shard measurements and files touched by this replay
For w0048, the original supplied counter misses the
taskTestalias; its supplemental alias-aware declaration count is 166 → 143 (−23). Historical exclusive helper reductions include another 613 lines for w0047, 10 for w0051, 160 for w0044, and 142 for w0054. The actual replay split above is authoritative for this PR.w0047: Gateway
Removes hook pass-through and template variants, approval persistence/query/clock replays, mention duplicates, and HTTP wrapper cases. Retains security and lifecycle exceptions; the older-reader interoperability case and its frozen helper are retained after review.
Touched files, including deleted files:
src/gateway/hooks-mapping.execution-identity.test.tssrc/gateway/hooks-mapping.fanout.test.tssrc/gateway/hooks-mapping.test.tssrc/gateway/http-utils.model-override.test.tssrc/gateway/http-utils.request-context.test.tssrc/gateway/mention-inbox.compat.test.tssrc/gateway/mention-inbox.test.tssrc/gateway/operator-approval-store.execution-identity.test.tssrc/gateway/operator-approval-store.test.tssrc/gateway/operator-approval-store.worker.test.tsw0051: Daemon CLI
Removes duplicate config/core/output, lifecycle wrapper, and install variants. Surviving output cases move into the core suite; authority, race, and regression cases remain.
Touched files, including deleted files:
src/cli/daemon-cli/install.definition-repair.test.tssrc/cli/daemon-cli/install.integration.test.tssrc/cli/daemon-cli/install.test.tssrc/cli/daemon-cli/install.wrapper.integration.test.tssrc/cli/daemon-cli/lifecycle-core.config-guard.test.tssrc/cli/daemon-cli/lifecycle-core.output.test.tssrc/cli/daemon-cli/lifecycle-core.test.tssrc/cli/daemon-cli/lifecycle.test.tssrc/cli/daemon-cli/test-helpers/lifecycle-core-harness.tsw0046: Telegram
Removes duplicate eligibility, authorization, media, callback, and prompt-context variants. Surviving downloads cases move into stickers and warning-topic suites. The one lost statement/function is a deleted test-only getter.
Touched files, including deleted files:
extensions/telegram/src/bot.create-telegram-bot.channel-post-media.test.tsextensions/telegram/src/bot.create-telegram-bot.history.test.tsextensions/telegram/src/bot.create-telegram-bot.join-intro.test.tsextensions/telegram/src/bot.create-telegram-bot.native-pipeline.test.tsextensions/telegram/src/bot.create-telegram-bot.test-harness.tsextensions/telegram/src/bot.create-telegram-bot.test.tsextensions/telegram/src/bot.media.downloads-media-file-path-no-file-download.e2e.test.tsextensions/telegram/src/bot.media.downloads-media-file-path-no-file-download.test.tsextensions/telegram/src/bot.media.stickers-and-fragments.test.tsextensions/telegram/src/bot.media.warning-topics.e2e.test.tsextensions/telegram/src/bot.test.tsw0044: Subagents
Removes duplicate lifecycle, status, query, archive, and persistence cases plus unused exclusive fixture branches. Retains authority and restart/adoption races; stronger query, topology, native completion, and replacement rollback owner tests remain.
Touched files, including deleted files:
src/agents/subagents/registry/subagent-registry-yield-followup-adoption.test-support.tssrc/agents/subagents/registry/subagent-registry.archive.e2e.test.tssrc/agents/subagents/registry/subagent-registry.completion-authority.test.tssrc/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.tssrc/agents/subagents/registry/subagent-registry.lifecycle-waits.test.tssrc/agents/subagents/registry/subagent-registry.native-settlement.test-support.tssrc/agents/subagents/registry/subagent-registry.nested.e2e.test.tssrc/agents/subagents/registry/subagent-registry.persistence.resume.test.tssrc/agents/subagents/registry/subagent-registry.persistence.retention.test-support.tssrc/agents/subagents/registry/subagent-registry.persistence.test.tssrc/agents/subagents/registry/subagent-registry.restored-settlement.test-support.tssrc/agents/subagents/registry/subagent-registry.session-failure.test.tssrc/agents/subagents/registry/subagent-registry.steer-restart.test.tssrc/agents/subagents/registry/subagent-registry.store-replaced.test.tssrc/agents/subagents/registry/subagent-registry.test.tsw0054: Onboarding and Doctor
Removes duplicate onboarding, Doctor, and helper cases and exclusive test support. Surviving utility and remote-probe cases move to their owner suites; authority, ordering, and regression cases remain.
Touched files, including deleted files:
src/commands/doctor-gateway-service-defaults.test-support.tssrc/commands/doctor-gateway-services.assertions.test-support.tssrc/commands/doctor-gateway-services.authority.test.tssrc/commands/doctor-gateway-services.test.tssrc/commands/doctor-gateway-services.tokens.test-support.tssrc/commands/doctor-gateway-services.writer-order.test.tssrc/commands/onboard-guided.custodian.test.tssrc/commands/onboard-guided.quickstart.test.tssrc/commands/onboard-guided.utility.test.tssrc/commands/onboard-helpers.remote-probe.test.tssrc/commands/onboard-helpers.test.tsw0055: Infrastructure
Removes duplicate diagnostic, heartbeat, SQLite, and canary cases and consolidates split suites. Retains privacy, mutation isolation, drain barriers, target authority, publication ordering, retry interleavings, and the real built canary boundary.
Touched files, including deleted files:
src/infra/diagnostic-events.event-loop.test.tssrc/infra/diagnostic-events.phase.test.tssrc/infra/diagnostic-events.plugin-usage.test.tssrc/infra/diagnostic-events.private-data.test.tssrc/infra/diagnostic-events.test.tssrc/infra/heartbeat-wake.preemption.test.tssrc/infra/heartbeat-wake.settlement.test.tssrc/infra/heartbeat-wake.test.tssrc/infra/sqlite-snapshot.file-id.test.tssrc/infra/sqlite-snapshot.fuse.test.tssrc/infra/sqlite-snapshot.test.tssrc/infra/update-candidate-canary.test.tsw0059: Slack
Removes preparation, admission, threading, dispatch, status, and link variants. Retains authority races, workspace isolation, and lost-acknowledgment regressions.
Touched files, including deleted files:
extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.tsextensions/slack/src/monitor/message-handler/dispatch.status-diagnostics.test.tsextensions/slack/src/monitor/message-handler/dispatch.visible-work-links.test.tsextensions/slack/src/monitor/message-handler/prepare.bot-messages.test.tsextensions/slack/src/monitor/message-handler/prepare.bot-threads.test.tsextensions/slack/src/monitor/message-handler/prepare.conversation-link.test.tsextensions/slack/src/monitor/message-handler/prepare.rejection-records.test.tsextensions/slack/src/monitor/message-handler/prepare.test.tsextensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.tsw0056: Browser
Removes Chrome variants/replays and registry duplicates; consolidates snapshot identity, concurrency, and lifecycle retry suites. Retains recycled-process identity authority, uncertain mutation outcomes, late replacement races, scope isolation, retries, and LRU behavior.
Touched files, including deleted files:
extensions/browser/src/browser/chrome-mcp.cleanup.test.tsextensions/browser/src/browser/chrome-mcp.ownership.test.tsextensions/browser/src/browser/chrome-mcp.snapshot-identity.test.tsextensions/browser/src/browser/chrome-mcp.test.tsextensions/browser/src/browser/session-tab-registry.concurrent.test.tsextensions/browser/src/browser/session-tab-registry.extension-cleanup.test.tsextensions/browser/src/browser/session-tab-registry.lifecycle-retry.test.tsextensions/browser/src/browser/session-tab-registry.membership.test.tsextensions/browser/src/browser/session-tab-registry.sqlite.test.tsextensions/browser/src/browser/session-tab-registry.test.tsw0048: Windows daemon
Removes lifecycle/status/native-error replays, parser/launcher/install variants, helper-input cases, and a source-grep workflow guard. Retains independent authority checks, stale process identity, cleanup interleavings, CJK/UTF-16 assertions, and non-detached spawn proof.
Touched files, including deleted files:
src/daemon/schtasks.installed-fingerprint-observer.test.tssrc/daemon/schtasks.installed-package.test.tssrc/daemon/schtasks.redirect-stop.test.tssrc/daemon/schtasks.settlement.test.tssrc/daemon/schtasks.shutdown.test.tssrc/daemon/schtasks.start.test.tssrc/daemon/schtasks.startup-fallback.test.tssrc/daemon/schtasks.startup-launch.test.tssrc/daemon/schtasks.stop.test.tssrc/daemon/schtasks.test.tssrc/daemon/schtasks.update-autostart.test.tsw0057: Control UI
Removes redundant startup, credentials, scope, and preference variants and consolidates split suites. Retains principal-change, reentrant observer and late-response races, read-only profile write boundaries, and documented regressions.
Touched files, including deleted files:
ui/src/app/bootstrap.agent-selection.test.tsui/src/app/bootstrap.gateway-credentials.test.tsui/src/app/bootstrap.nav-visibility.test.tsui/src/app/bootstrap.snapshot-prewarm.test.tsui/src/app/bootstrap.test.tsui/src/app/bootstrap.warm-boot.test.tsui/src/app/gateway-store.auth.test.tsui/src/app/gateway-store.boot-record.test.tsui/src/app/gateway-store.canvas-surface.test.tsui/src/app/gateway-store.observers.test.tsui/src/app/gateway-store.plugins.test.tsui/src/app/server-prefs.profile-write.test.tsui/src/app/server-prefs.profile.test.tsui/src/app/server-prefs.test.tsShared test maintenance
config/test-mock-exports-baseline.txt— w0051, w0044, w0054, and w0048; stale entries recomputed shrink-only after replay.scripts/lib/ci-proof-test-inventory.mts— w0051, w0046, and w0054; deleted split-file inventory entries.test/vitest/vitest.extension-database-workers-paths.mjs— w0046 and w0056; deleted split-file routing entries.Independent review disposition
Eleven coverage concerns were accepted and restored: Telegram unpaired model callbacks, Chrome profile-directory isolation, identity-less HTTP role admission variants, installed-source allowlist edits, approval-store older-reader interoperability, exact Gateway credential URL paths/queries, post-hello rejected-admission retirement, remote stale-build reload suppression, unresolved-profile disconnect cancellation, the theme-reset read race, and reload-required precedence.
Ten concerns were rejected after checking the surviving proof and owning implementation:
install-environment.test.tsstill checks CA preservation and removal of TLS bypass and loader variables on all three platforms.prototype-keys.test.tschecks all three forbidden keys; hook traversal calls that shared predicate and retains a boundary test.bootstrap.warm-document.test.tsretains terminal, approval, and question entry points with zero boot-record reads/publications/retirements.The restoration-only review raised one cleanup concern and it was rejected: the existing later-registered
afterEachawaits the state-database close before the earlier temporary-directory cleanup. The installed Vitest runner defaults tosequence.hooks = "stack"and reversesafterEachhooks. No accepted/actionable review finding remains.