Repository navigation
test(core,plugins,ui): remove low-value tests (batch d024) - #158907
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 September 26, 2026, 9:28 AM ET / 13:28 UTC. ClawSweeper reviewWhat this changesThe branch consolidates fixtures and removes repeated tests across core subsystems, bundled plugins, Buzz, and Control UI test support. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this is a distinct, current test cleanup from a repository member. The inspected high-risk deletions retain stronger boundary checks, and the review found no concrete introduced defect. Priority: P3 Review scores
Verification
How this fits togetherCore and plugin test suites exercise OpenClaw behavior through fixtures and check the results. CI uses those assertions to catch regressions before changes reach users. flowchart LR
A[Core and plugin behavior] --> B[Test fixtures]
B --> C[Core and plugin suites]
C --> D[Behavior assertions]
D --> E[CI results]
F[Test cleanup] --> C
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 test for each distinct security, replay, setup, and delivery contract while accepting the duplicate reductions. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reports test duplication, not a runtime defect. The relevant check is whether retained tests still protect the distinct behavior contracts. Is this the best way to solve the issue? Yes for the inspected high-risk cases: the branch reduces repeated assertions while retaining checks at the worker, provider setup, and stream failure boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 002288fc669c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…158907) * test(trajectory): deslop s167 tests * test(hooks): deslop s166 tests * test(worker): deslop s161 tests * test(openshell): deslop s168 tests * test(amazon-bedrock): deslop s173 tests * test(lmstudio): deslop s172 tests * test(ui): deslop s170 tests * test(github-copilot): deslop s174 tests * test(buzz): deslop s176 tests
What Problem This Solves
Repeated test cases and duplicated fixtures increase maintenance and CI work without adding independent behavior coverage across the selected core and plugin suites.
User Impact
No production behavior, public API, configuration, storage, or dependency changes. This batch changes only tests and preserves the stronger owner-boundary regressions.
Why This Change Was Made
Replay the validated portions of campaign batch d024 onto current main, consolidating fixtures and removing duplicate cases. The final diff contains 82 test files: +1,951/-7,020 lines (net -5,069), with 1,174 -> 1,032 test declarations (net -142). Production and separate test-support LOC are both +0/-0. Parameterized declarations count once here; these are not executed-case counts.
Gateway shard s169 (
119bce0100d) is intentionally omitted: its report records a passing baseline but two after-runs with 393 passed/1 failed, and explicitly marks the coverage comparison invalid because all 51 files were excluded. No Gateway cleanup is included in this PR.Evidence
pnpm install --frozen-lockfile --prefer-offline, targetedoxfmt, andgit diff --check: passed.tbx_01m3eqk8fjrfhr2bagxnk4zpvy:CI=1 pnpm test <82 changed paths>passed 1,509 tests across 83 routed files; 10 Vitest shards in 182.52s. Native command and wrapper exits were both 0. A portal-sync timeout was reported after the successful command.CI=1 OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <82 changed paths>passed all early guards, formatting, UI catalog verification, and all 25 core-test type shards. It then caught a missingRuntimeEnvtype import in the Buzz fixture consolidation. The existing import was restored.tbx_01m3ew5fkff6ysm5ms2rm1sqfm, corrected head6a073955368d6c915bbbe617079fcdf44f96c858: the affected Buzz setup suite passed all 19 cases. Resumed the exact remaining commands from the check-changed plan:pnpm tsgo:extensions:test, coercion/deprecated-API guards, all three dead-export scans (zero entries), and all 82 files' core/plugin lint batches. All passed; remote exit 0. The earlier passing core checks were reused because the only correction is a type-only import in a plugin test.The coverage figures below are the original in-shard comparisons, not newly measured current-main coverage. The replay receives fresh focused Testbox tests and changed-file gates. Independent autoreview against the pinned base completed scoped-clean at the default P0 threshold; no findings were accepted or rejected. The only later adjustment restores an existing type-only import identified by the extension type check. GitHub's required
openclaw/ci-gateremains the merge gate.No changed path matches
.github/CODEOWNERSat the reviewed base.Replay decisions and preserved current-main behavior
install.test.tshunk; kept newer hook dispatch tests and existing transcript fixture extraction.Per-shard replay metrics, files, and original coverage evidence
s167 (trajectory)
covered statements 790 -> 790 (0); branches 678 -> 678 (0); functions 153 -> 153 (0)
Files:
src/trajectory/cleanup.test.ts,src/trajectory/export.test.ts,src/trajectory/metadata.test.ts,src/trajectory/runtime-store.sqlite.test.ts,src/trajectory/runtime.test.ts.s166 (hooks)
covered statements 1565 -> 1565 (0); branches 1235 -> 1235 (0); functions 274 -> 274 (0)
Files:
src/hooks/bundled/boot-md/handler.test.ts,src/hooks/bundled/session-memory/handler.test.ts,src/hooks/bundled/session-memory/transcript.test.ts,src/hooks/frontmatter.test.ts,src/hooks/gmail-ops.test.ts,src/hooks/gmail-setup-utils.test.ts,src/hooks/gmail-watcher.test.ts,src/hooks/gmail.test.ts,src/hooks/internal-hooks.test.ts,src/hooks/loader.test.ts,src/hooks/message-hook-mappers.test.ts,src/hooks/message-hooks.test.ts,src/hooks/plugin-hooks.test.ts,src/hooks/policy.test.ts,src/hooks/workspace.test.ts.s161 (worker)
covered statements 1819 -> 1820 (1); branches 1442 -> 1443 (1); functions 373 -> 373 (0)
Files:
src/worker/browser-runtime.test.ts,src/worker/computer-observation.runtime.test.ts,src/worker/inference-stream.runtime.test.ts,src/worker/launch-descriptor.test.ts,src/worker/node-workspace-retain-protocol.test.ts,src/worker/transcript-message.test.ts,src/worker/worker-command.runtime.test.ts,src/worker/worker-connection-endpoint.test.ts,src/worker/worker-connection.test.ts,src/worker/worker-rpc-clients.test.ts,src/worker/worker.fault-injection.test.ts,src/worker/worker.runtime.test.ts.s168 (openshell)
covered statements 721 -> 721 (0); branches 452 -> 452 (0); functions 169 -> 169 (0)
Files:
extensions/openshell/index.test.ts,extensions/openshell/src/backend.exec-workdir.test.ts,extensions/openshell/src/config.test.ts,extensions/openshell/src/mirror.test.ts,extensions/openshell/src/openshell-core.test.ts.s173 (amazon-bedrock)
covered statements 1090 -> 1090 (0); branches 893 -> 893 (0); functions 203 -> 203 (0)
Files:
extensions/amazon-bedrock/control-plane.test.ts,extensions/amazon-bedrock/discovery.test.ts,extensions/amazon-bedrock/embedding-provider.test.ts,extensions/amazon-bedrock/index.test.ts,extensions/amazon-bedrock/memory-embedding-adapter.test.ts,extensions/amazon-bedrock/stream.runtime.accounting-replay.test.ts,extensions/amazon-bedrock/stream.runtime.lifecycle.test.ts,extensions/amazon-bedrock/stream.runtime.preview.test.ts,extensions/amazon-bedrock/stream.runtime.test.ts.s172 (lmstudio)
setup.tsdropped coverage (−1 statement, −2 branches); both gates pass. No excluded groups.Files:
extensions/lmstudio/index.test.ts,extensions/lmstudio/provider-policy-api.test.ts,extensions/lmstudio/src/embedding-provider.integration.test.ts,extensions/lmstudio/src/embedding-provider.test.ts,extensions/lmstudio/src/models.fetch.test.ts,extensions/lmstudio/src/models.test.ts,extensions/lmstudio/src/runtime.test.ts,extensions/lmstudio/src/setup.test.ts,extensions/lmstudio/src/stream.test.ts,extensions/lmstudio/tool-capabilities.test.ts.s170 (ui)
covered statements 3 -> 3 (0); branches 0 -> 0 (0); functions 0 -> 0 (0)
Files:
ui/src/e2e/phone-stale-build-recovery.test-support.test.ts.s174 (github-copilot)
Files:
extensions/github-copilot/auth.test.ts,extensions/github-copilot/embeddings.test.ts,extensions/github-copilot/index.test.ts,extensions/github-copilot/login.test.ts,extensions/github-copilot/models.test.ts,extensions/github-copilot/provider-policy-api.test.ts,extensions/github-copilot/stream.test.ts,extensions/github-copilot/usage.test.ts.s176 (buzz)
profile.tslost one statement/six branches;buzz-bus.tslost one branch. No excluded groups.Files:
extensions/buzz/src/buzz-bus.archived-rooms.test.ts,extensions/buzz/src/buzz-bus.history-catchup.test.ts,extensions/buzz/src/buzz-bus.lifecycle.test.ts,extensions/buzz/src/buzz-bus.mentions.test.ts,extensions/buzz/src/config-schema.test.ts,extensions/buzz/src/directory-relay.test.ts,extensions/buzz/src/directory.test.ts,extensions/buzz/src/event-order.test.ts,extensions/buzz/src/gateway.lifecycle.test.ts,extensions/buzz/src/inbound.test.ts,extensions/buzz/src/mentions.test.ts,extensions/buzz/src/qa/adapter.runtime.test.ts,extensions/buzz/src/qa/credentials.test.ts,extensions/buzz/src/setup-core.test.ts,extensions/buzz/src/setup-surface.test.ts,extensions/buzz/src/setup-verify.test.ts,extensions/buzz/src/target.test.ts.