Repository navigation
test(agents,plugins,ui): remove low-value tests (batch d042) - #168283
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: needs changes before merge. What this changesThis PR removes and consolidates tests across agents, plugins, packages, tooling, and the Control UI. Example: Enter custom/Model-A when the model catalog contains custom/model-a.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 12 items remain This PR provides useful test cleanup, but six independent contracts still lose coverage; the earlier disclosure-depth finding is resolved. Priority: P3 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherVitest suites pass synthetic inputs through production owners and check their rendering, selection, configuration, and lifecycle outputs. flowchart LR
A[Test fixtures] --> B[Vitest suites]
B --> C[Production owners]
C --> D[Observed outputs]
D --> E[Contract assertions]
E --> F[CI results]
Technical reviewBest possible solution: Keep the duplicate-test reduction while retaining compact coverage of the six independent contracts identified below. Do we have a high-confidence way to reproduce the issue? The pinned diff and remaining suites establish the coverage losses by source inspection; no runtime failure or test run is claimed. Is this the best way to solve the issue? Consolidation is appropriate where remaining tests exercise the same contract, but these six deletions remove distinct protection rather than duplicate assertions. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bdcbb2d88706. TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceTests -1522. Total -1522 across 33 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 11, 2026, 4:01 AM ET / 08:01 UTC (Revision 5). |
bcb64fd to
ae0bd09
Compare
ae0bd09 to
71e716c
Compare
71e716c to
0224e27
Compare
|
Settlement evidence for head
Independent review is now scoped-clean at P1. Settlement retained the complete main coverage in 81 restored/conflict-resolved suites, all of which passed focused Testbox proof. The final reduction is 1,522 test lines; no production code, assertion, timeout, or skip policy was weakened to clear CI. Per the explicitly authorized campaign pre-existing-failure rule, this head is being landed with the pinned admin exception. The QA failure remains red and will be recorded for separate main repair; this is not a claim that the failing hosted check passed. |
…w#168283) * test(agents): deslop x1080 tests * test(agents): deslop x1082 tests * test(openai): deslop x1079 tests * test(test): deslop x1088 tests * test(ui): deslop x1084 tests * test(plugins): deslop x1092 tests * test(agents): deslop x1091 tests * test(qa-lab): deslop x1090 tests * test(config): deslop x1087 tests * test(device-pair): deslop x1085 tests * test: preserve regression contracts in cleanup batch d042 * test(ui): retain the complete WebKit modal contract * test: preserve boundary coverage in cleanup batch d042
First-parent upstream c96fac1..d9eba8a (10 PRs: openclaw#168948 GitHub connection authority to workers, openclaw#168975, openclaw#168772 cron receipt custody removal, openclaw#169012, openclaw#169006, openclaw#169009, openclaw#168283 test batch d042, openclaw#168994, openclaw#168964, openclaw#168855 approval/placement state in workers). Conflicts: - docs/reference/database-schemas/worker-access-inventory.md: took upstream, then regenerated (db:worker-inventory:gen, 633 files / 2449 calls) instead of hand-merging. - src/agents/embedded-agent-runner/compact-reasons.test.ts: upstream openclaw#168283 deleted low-value cases; kept upstream's file plus our own additions only (unknown_model, empty reason, closed-union check and the isCompactionSkipCode block). session-reset-service.ts auto-merged: upstream's awaited placement retirement (assertCurrent) is disjoint from our continuation-cancellation cleanup reason. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Settled scope — supersedes the historical inventory below
The original cleanup removed distinct regression contracts as well as duplicate tests. Settlement restores those contracts and keeps only the independently reviewed smaller cut. Merged candidate:
0224e274d99d1a132beda70f4f7e30e9bbc37b96, tree1a3afc763b8bd2d56d0ac437119d4053281bd794; squash merge6abc55e183899edf8e3abf842d7147d13acfdb28.390f0f0acb98c577d5ccf71cd04201a6c4083c7b: 33 test files, +128/-1,650 lines, net -1,522. Production, shared support, and configuration changes: zero.db6449d3f6091740dbddcf02fdc0e34dc94ca424. The same command passes on clean main and the candidate; architecture passed final-head CI.subagent-completion-direct-fallback/[public:silent]timeout on clean current main, while passing on this PR head. The PR was merged under the explicitly authorized pre-existing-failure admin exception, as recorded in the evidence comment. The QA check and its aggregate were not claimed green; both were recorded for separate main repair. Historical coverage totals below are not a new coverage claim for this settled scope.Final changed-file inventory
extensions/fal/music-generation-provider.test.tsextensions/fal/video-generation-provider.test.tsextensions/openai/embedding-provider.test.tsextensions/qa-lab/src/evidence-environment.test.tsextensions/qa-lab/src/evidence-gallery.test.tsextensions/qa-lab/src/gateway-child-auth-profiles.test.tsextensions/qa-lab/src/gateway-log-sentinel.test.tsextensions/qa-lab/src/gateway-rpc-client.test.tsextensions/qa-lab/src/lab-server-ui.test.tspackages/media-core/src/attachment-classify.test.tspackages/sdk/src/event-hub.test.tssrc/agents/embedded-agent-runner/cache-ttl.test.tssrc/agents/embedded-agent-runner/cli-backend-dispatch-transcript.test.tssrc/agents/embedded-agent-runner/compact-reasons.test.tssrc/agents/embedded-agent-runner/model.static-catalog.snapshot-cache.test.tssrc/agents/sessions-spawn-hooks.test.tssrc/node-host/node-worker-native-inference.test.tssrc/plugins/slots.test.tssrc/plugins/theme-catalog.test.tssrc/plugins/web-provider-public-artifacts.fallback.test.tstest/scripts/clawlog.test.tstest/scripts/cli-startup-bench-spawner.test.tstest/scripts/close-duplicate-prs-after-merge.test.tstest/scripts/codex-app-server-protocol-source.test.tstest/scripts/codex-media-path-client.test.tstest/scripts/control-ui-i18n-sync-plan.test.tstest/scripts/control-ui-i18n-verify.test.tsui/src/components/markdown-code-blocks.test.tsui/src/components/markdown-mermaid.test.tsui/src/components/markdown-tables.test.tsui/src/components/mascot-animator.test.tsui/src/components/mcp-app-theme.test.tsui/src/components/multi-select.test.tsOriginal campaign evidence and inventory — historical, superseded by settled scope above
What Problem This Solves
Reduces duplicate, implementation-mirroring, and low-value tests from the maintainer-requested cleanup campaign, batch d042.
User Impact
No user-visible behavior change. Production code, shared test support, and configuration are unchanged in the final diff. The final reduction is 11,396 test lines across 114 files, with 526 fewer static test declarations. Existing regression, security, authority, lifecycle, and browser contracts take precedence over deletion targets.
Why This Change Was Made
All ten requested commits were applied in order, preserving their subjects; none was skipped. Initial replay base was
6ca61e2b5b78fd3a113ab5d70ce21b9f30e8dd46. Main movement required two rebases; the final base isd54483901779f1acf9cd84f2c902d205d7ae1e5a.Most hunks delete repeated cases or consolidate fixtures. x1079 instead strengthens two embedding error assertions (typed error code/status and exact diagnostics), with no test deletion.
Eight independent-review findings and two hosted-review findings were accepted. A subsequent WebKit CI failure exposed an additional named-test registration contract. Cleanup hunks were dropped completely for the following thirteen files; their current-main tests remain intact:
src/node-host/invoke-system-run-allowlist.test.tssrc/node-host/invoke-system-run.test.tssrc/agents/tool-allowlist-guard.test.tssrc/agents/embedded-agent-runner/google-prompt-cache.failures.test.tsui/src/components/mcp-app-view.test.tssrc/node-host/node-worker-bundle-installer.test.tstest/scripts/clawsweeper-review-gate.test.tssrc/node-host/node-worker-prepared-workspace.test.tstest/scripts/codeql-network-diff-scan.test.tssrc/node-host/invoke-system-run-plan.test.tssrc/node-host/node-worker-turn-store.test.tstest/scripts/control-ui-performance.test.tsui/src/components/modal-dialog.test.tsThis preserves executable-path pinning, fail-closed explicit tool allowlists, writer takeover, MCP sandbox URL validation, bundle integrity, unambiguous review markers, manifest-publication rollback, security-query routing, short native-binary reads, predecessor-writer compatibility, the current performance model, and the complete modal/WebKit matrix.
Conflict decisions preserved current main's async Google cache entries and native-dialog behavior. On the first rebase, main had retired the old retained-asset model, so the performance-file cleanup was dropped entirely. The upstream i18n ordering correction was retained. The modal cleanup was later dropped entirely: the new WebKit lane requires exact named autofocus/reopen cases. No WebKit expectation, skip, or assertion was weakened.
Two TS2339 errors in the initial hosted run were fixed by removing reads of properties absent from every retained fixture row in
tool-surface-plan.test.ts; its message-only allowlist stays explicit. The initial stale max-lines entry repair is now also present in main, so no baseline change remains in this final diff.No final changed path matches CODEOWNERS.
Evidence
ui-componentstypecheck passed. Final correction review is scoped-clean at P1. Final WebKit proof, leasetbx_01m4jg50vwyd8z3b017ahtn6dh, verified tree5460ad9728b4ef1c0502a6114ceef0fe23c92f3f, matching commit71e716cd728933d13d691670a92bf4f877228069.isPollVoteEchoText,PUBLIC_SESSION_ENTRY_SCRIPT,isClaudeLikeLiveAgent) were independently reproduced on clean standalone detached main587a19170f3c333ad94507212e1ea18ec7c52d18with its own frozen install. They are in untouched production files, are recorded for separate main repair, and are not represented as a passing gate. Standalone-main and aggregate proof run. First-rebase proof run.bcb64fd49e161c2a5e908b945371e1bef1ae24c8before main introduced the conflict. The next head exposed the WebKit registration failure and was not merged. Both real CI failures were repaired, not rerun unchanged. Fresh exact-head hostedopenclaw/ci-gateremains the merge gate.Commands included
CI=1 pnpm test <all 127 original paths>, remotenode scripts/check-changed.mjs -- <changed paths>, focused changed-path typechecks, andCI=1 OPENCLAW_UI_WEBKIT=1 pnpm --dir ui test --project=webkit --maxWorkers=3after the standard WebKit install. No production runtime or live Gateway was changed.Diff accounting
Production +0/-0; shared support +0/-0; configuration +0/-0. Tests +918/-12,314, net -11,396. Static declarations in final touched files: 1,805 -> 1,279 (-526); these lexical counts are not expanded runtime counts.
The coverage totals below are historical campaign measurements, not a fresh coverage claim for the rebased aggregate. Additional reviewed tests were retained. x1082 uses its later completion receipt; x1079's excluded-group limitation is explicit.
x1080: test LOC +87 / -1656; declarations 245 -> 176 (-69)
Final files touched:
src/agents/embedded-agent-runner/run/message-tool-terminal.test.tssrc/agents/embedded-agent-runner/run/message-tool-terminal.tool-authored.test.tssrc/agents/embedded-agent-runner/run/model-setup.ownership.test.tssrc/agents/embedded-agent-runner/run/payloads.errors.test.tssrc/agents/embedded-agent-runner/run/prompt-failure.test.tssrc/agents/embedded-agent-runner/run/run-settlement.test.tssrc/agents/embedded-agent-runner/run/runtime-context-prompt.test.tssrc/agents/embedded-agent-runner/run/settled-tool-evidence.test.tssrc/agents/embedded-agent-runner/run/setup.test.tssrc/agents/embedded-agent-runner/run/terminal-outcome.test.tssrc/agents/embedded-agent-runner/run/terminal-preparation.test.tssrc/agents/embedded-agent-runner/run/tool-activity-heartbeat.test.tssrc/agents/embedded-agent-runner/run/tool-error-warning.test.tssrc/agents/embedded-agent-runner/run/tool-media-payloads.test.tsHistorical campaign coverage: covered statements 10538 -> 10538 (0); branches 7211 -> 7210 (-1); functions 1857 -> 1857 (0)
x1082: test LOC +114 / -1523; declarations 222 -> 148 (-74)
Final files touched:
src/agents/sessions-spawn-hooks.test.tssrc/agents/shell-utils.test.tssrc/agents/spawn-requester-origin.test.tssrc/agents/spawned-context.test.tssrc/agents/system-prompt-params.test.tssrc/agents/thinking-runtime.test.tssrc/agents/tool-call-id.test.tssrc/agents/tool-loop-detection.test.tssrc/agents/tool-replay-safety.test.tssrc/agents/tool-search-runtime.output-variants.test.tssrc/agents/tool-surface-plan.test.tssrc/agents/tool-terminal-outcome.test.tssrc/agents/transcript-policy.test.tsHistorical campaign coverage: covered statements 7326 -> 7331 (+5); branches 5130 -> 5130 (0); functions 1287 -> 1289 (+2)
x1079: test LOC +9 / -6; declarations 12 -> 12 (0)
Final files touched:
extensions/openai/embedding-provider.test.tsHistorical campaign coverage: Union comparison: statements 1918 -> 1918; branches 1446 -> 1446. The official comparison excluded the originally failing group; this is not an independently passing aggregate coverage gate. This shard only strengthens two existing assertions.
x1088: test LOC +34 / -1405; declarations 197 -> 140 (-57)
Final files touched:
test/scripts/clawlog.test.tstest/scripts/cli-startup-bench-spawner.test.tstest/scripts/close-duplicate-prs-after-merge.test.tstest/scripts/code-mode-matrix-gateway-fixtures.test.tstest/scripts/codesign-mac-app.test.tstest/scripts/codex-app-server-protocol-source.test.tstest/scripts/codex-install-assertions.test.tstest/scripts/codex-media-path-client.test.tstest/scripts/connect-installer.test.tstest/scripts/control-ui-i18n-sync-plan.test.tstest/scripts/control-ui-i18n-verify.test.tstest/scripts/control-ui-i18n.test.tstest/scripts/crabbox-routing-policy.test.tsHistorical campaign coverage: covered statements 2469 -> 2469 (0); branches 1660 -> 1660 (0); functions 446 -> 446 (0)
x1084: test LOC +71 / -1274; declarations 170 -> 87 (-83)
Final files touched:
ui/src/components/markdown-code-blocks.test.tsui/src/components/markdown-details.test.tsui/src/components/markdown-links.test.tsui/src/components/markdown-mermaid.test.tsui/src/components/markdown-streaming-highlight.test.tsui/src/components/markdown-tables.test.tsui/src/components/mascot-animator.test.tsui/src/components/mcp-app-security.test.tsui/src/components/mcp-app-theme.test.tsui/src/components/multi-select.test.tsHistorical campaign coverage: covered statements 16125 -> 16126 (+1); branches 10160 -> 10159 (-1)
x1092: test LOC +43 / -1804; declarations 219 -> 146 (-73)
Final files touched:
src/plugins/public-surface-runtime.test.tssrc/plugins/registry-refresh.test.tssrc/plugins/runtime-context.test.tssrc/plugins/sdk-alias.test.tssrc/plugins/session-catalog.test.tssrc/plugins/slots.test.tssrc/plugins/stage-bundled-plugin-runtime.test.tssrc/plugins/synthetic-auth.runtime.test.tssrc/plugins/theme-catalog.test.tssrc/plugins/uninstall.test.tssrc/plugins/web-fetch-providers.runtime.test.tssrc/plugins/web-provider-public-artifacts.fallback.test.tssrc/plugins/web-provider-runtime-shared.test.tssrc/plugins/web-search-providers.runtime.test.tsHistorical campaign coverage: covered statements 8080 -> 8075 (-5); branches 5612 -> 5602 (-10); functions 1819 -> 1817 (-2)
x1091: test LOC +95 / -1071; declarations 209 -> 143 (-66)
Final files touched:
src/agents/embedded-agent-runner/cache-ttl.test.tssrc/agents/embedded-agent-runner/cli-backend-dispatch-transcript.test.tssrc/agents/embedded-agent-runner/cli-backend-dispatch.test.tssrc/agents/embedded-agent-runner/compact-reasons.test.tssrc/agents/embedded-agent-runner/compaction-duplicate-user-messages.test.tssrc/agents/embedded-agent-runner/compaction-runtime-context.test.tssrc/agents/embedded-agent-runner/delivery-evidence.test.tssrc/agents/embedded-agent-runner/effective-tool-policy.test.tssrc/agents/embedded-agent-runner/failure-signal.test.tssrc/agents/embedded-agent-runner/google-prompt-cache.test.tssrc/agents/embedded-agent-runner/history.test.tssrc/agents/embedded-agent-runner/model.static-catalog.snapshot-cache.test.tssrc/agents/embedded-agent-runner/openrouter-model-capabilities.test.tsHistorical campaign coverage: covered statements 5581 -> 5579 (-2); branches 3710 -> 3706 (-4)
x1090: test LOC +160 / -1482; declarations 231 -> 187 (-44)
Final files touched:
extensions/qa-lab/src/evidence-environment.test.tsextensions/qa-lab/src/evidence-gallery.test.tsextensions/qa-lab/src/evidence-invocation.test.tsextensions/qa-lab/src/evidence-summary.test.tsextensions/qa-lab/src/gateway-child-artifacts.test.tsextensions/qa-lab/src/gateway-child-auth-profiles.test.tsextensions/qa-lab/src/gateway-child-bootstrap.test.tsextensions/qa-lab/src/gateway-child-lifecycle.test.tsextensions/qa-lab/src/gateway-child.test.tsextensions/qa-lab/src/gateway-log-sentinel.test.tsextensions/qa-lab/src/gateway-rpc-client.test.tsextensions/qa-lab/src/harness-parity.test.tsextensions/qa-lab/src/lab-server-ui.test.tsextensions/qa-lab/src/lab-server.test.tsextensions/qa-lab/src/live-scenario-timeouts.test.tsHistorical campaign coverage: covered statements 4185 -> 4180 (-5); branches 2766 -> 2761 (-5)
x1087: test LOC +95 / -882; declarations 111 -> 93 (-18)
Final files touched:
src/node-host/config.test.tssrc/node-host/desktop-stream-command.test.tssrc/node-host/exec-policy.test.tssrc/node-host/invoke-agent-cli-claude.test.tssrc/node-host/invoke-worker-supervisor.test.tssrc/node-host/mcp.recovery.test.tssrc/node-host/mcp.test.tssrc/node-host/node-worker-native-inference.test.tssrc/node-host/node-worker-workspace-manifest.test.tsHistorical campaign coverage: covered statements 2812 -> 2814 (+2); branches 2082 -> 2083 (+1); functions 490 -> 490 (0)
x1085: test LOC +210 / -1211; declarations 189 -> 147 (-42)
Final files touched:
extensions/device-pair/index.test.tsextensions/device-pair/notify.test.tsextensions/fal/image-generation-provider.test.tsextensions/fal/music-generation-provider.test.tsextensions/fal/video-generation-provider.test.tspackages/media-core/src/attachment-classify.test.tspackages/media-core/src/inline-image-data-url.test.tspackages/media-core/src/mime.test.tspackages/sdk/src/event-hub.test.tspackages/sdk/src/index.test.tspackages/sdk/src/run-event-replay.recovery.test.tspackages/sdk/src/transport.test.tsHistorical campaign coverage: covered statements 3454 -> 3450 (-4); branches 2205 -> 2205 (0); functions 595 -> 595 (0)