Repository navigation
test(config, plugins, ui): remove low-value tests (batch d055) - #169372
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 consolidates and removes tests across core, plugins, tooling, and the Control UI, and removes an unused checker export. Example: Check a plugin importing @openclaw/normalization-core directly.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 6 items remain Keep this PR open: the maintainer-directed cleanup is useful, but three removals discard independent contract coverage that should survive. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherThe affected tests exercise runtime owners and repository tooling with fixtures, then feed assertions into CI; deployed runtime production code is unchanged. flowchart LR
A[Test fixtures] --> B[Core and plugin owners]
A --> C[Repository boundary checker]
B --> D[Contract assertions]
C --> D
D --> E[CI results]
Technical reviewBest possible solution: Keep the simplifications while retaining one focused regression for each distinct architecture, backup-failure, and credential-mode contract. Do we have a high-confidence way to reproduce the issue? There is no runtime defect to reproduce; the coverage losses are visible in the introduced deletions and retained sibling suites. Is this the best way to solve the issue? Removing duplicate tests is appropriate, but statement coverage totals do not establish that distinct failure contracts remain protected. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 939f740219d9. TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel 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 Reviewed October 11, 2026, 5:21 PM ET / 21:21 UTC. |
…law#169372) * test(config): deslop x1198 tests * test(qa-lab): deslop x1214 tests * test(ui): deslop x1213 tests * test(daemon): deslop x1219 tests * test(plugins): deslop x1217 tests * test(config): deslop x1221 tests * test(scripts): deslop x1222 tests * test(codex): deslop x1215 tests * test(cli): deslop x1216 tests * test(mattermost): deslop x1224 tests * test: retain independent boundary coverage in d055
What Problem This Solves
Redundant variants, metadata/wiring replays, and implementation-mirroring tests add maintenance and execution cost without independent behavioral proof.
User Impact
No user-visible behavior or public SDK change. This batch retains distinct security, authority, lifecycle, persistence, and regression contracts. Final test LOC: +885/−10926 (net -10041). Runtime production LOC is unchanged; other/tooling LOC: +2/−7, removing a test-only checker export/root override, one dead routing target, and four mock-baseline lines.
Why This Change Was Made
Replay all ten authorized campaign commits on base 97662b4. No commits skipped and no manual conflict resolutions; Git cleanly combined the mock baseline and routing edits with current main. No new non-test caller needs the removed checker factory export. Deleted-path classification entries intentionally remain where routing tests require them.
Independent review identified twelve retained-contract concerns. The affected files were restored byte-for-byte from the base: pre-aborted remote reads, localhost/IPv4 OAuth callback compatibility, architecture scanner and extension-boundary guards, bootstrap endpoint matching, native session authorization, expired-approval filtering, distinct Feishu read actions, cross-session suggestion isolation, unsafe CSS inputs, failure/revocation lease release, and appcast artifact contracts. The architecture routing entry was restored too. This intentionally preserves some redundant cases beside those contracts rather than widening the cleanup. The base64url catalog finding was rejected: the retained signing helper defaults to base64url, retained threshold tests exercise it, and the hosted catalog suite verifies the same encoding.
Historical per-shard coverage below is campaign evidence, not a fresh coverage measurement on current main. Several original reports had infrastructure or unrelated baseline-check gaps; current replay validation is listed separately. The x1222 report was stale: its later successful after-artifact was recovered and compared, with raw totals and provenance qualifications below.
CODEOWNERS visibility: none of this diff matches the current explicit CODEOWNERS patterns. The SDK and plugin test paths remain listed below for review visibility.
Evidence
Local
pnpm install --frozen-lockfile --prefer-offline, targetedoxfmt, plainoxlint -c .oxlintrc.json, andgit diff --checkpassed. The changed-file planner selected core/extension tests, scripts, root tests, and tooling.Current-head remote validation has an infrastructure gap, not a passing test result. Blacksmith Testbox
tbx_01m4paaxzarcgbactyfqd1crtmremained queued for more than 15 minutes and was stopped; no focused tests executed. The separately requestedOPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <paths>was canceled during source preparation before remote execution when review required retaining contract tests. AWS fallbackcbx_7995e24fc0e4provisioned, but the wrapper's readiness check failed because the Crabbox broker/v1/whoamirequest timed out before command execution. No failed product test is being classified as infrastructure. Hostedopenclaw/ci-gateremains the required current-head merge gate under the campaign's explicit infrastructure-gap policy.The suggested AWS broker diagnostic then passed, but the single retry stalled before remote command execution for ten minutes and was canceled. No current-head focused tests or changed-file checks completed remotely. The AWS lease was submitted for stop. This is the explicit infrastructure-only publication exception, not an assertion that tests passed.
The complete original diff received independent review. Twelve coverage-loss findings were addressed by retaining the affected baseline files and routing; one encoding finding was rejected with source evidence. The incremental restoration review finished scoped-clean through P2. No new tests, test retries, timing changes, skips, or assertion weakening were added.
Per-shard files, replay counts, and original coverage evidence
x1198
Candidate-file test LOC: 3632 → 2608 (-1024); declarations: 127 → 82; counter-expanded cases: 188 → 89. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 9,056 → 9,048 statements; 5,864 → 5,856 branches. Supplemental passing-group comparison; original full list had seven unchanged baseline failures.
Candidate files:
src/config/sessions/session-participant-identity.test.ts,src/config/sessions/session-snapshot-merge.test.ts,src/config/sessions/session-suggestion-store.test.ts,src/config/sessions/store.pruning.test.ts,src/config/sessions/targets.test.ts,src/config/sessions/transcript-json.test.ts,src/config/sessions/transcript-mirror.test.ts,src/config/sessions/transcript-payload.test.ts.x1214
Candidate-file test LOC: 7992 → 5532 (-2460); declarations: 199 → 98; counter-expanded cases: 297 → 104. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 3,546 → 3,545 statements; 2,512 → 2,508 branches.
Candidate files:
extensions/qa-lab/src/runtime-parity.test.ts,extensions/qa-lab/src/scenario-catalog-channels.test.ts,extensions/qa-lab/src/scenario-catalog-matrix-session-identity-proof.test.ts,extensions/qa-lab/src/scenario-catalog-memory-ranking-proof.test.ts,extensions/qa-lab/src/scenario-catalog-model-switch-follow-up-proof.test.ts,extensions/qa-lab/src/scenario-catalog-model-switch-tool-continuity-proof.test.ts,extensions/qa-lab/src/scenario-flow-runner-character-safety.test.ts,extensions/qa-lab/src/scenario-flow-runner-redaction-proof.test.ts,extensions/qa-lab/src/scenario-generated-image.test.ts,extensions/qa-lab/src/scenario-lane.test.ts,extensions/qa-lab/src/scenario-module-flow.test.ts,extensions/qa-lab/src/scorecard-evidence.test.ts,extensions/qa-lab/src/scorecard-taxonomy.test.ts,extensions/qa-lab/src/suite-evidence.test.ts,extensions/qa-lab/src/suite-launch.runtime.test.ts,extensions/qa-lab/src/suite-planning.concurrency.test.ts.x1213
Candidate-file test LOC: 5098 → 4640 (-458); declarations: 183 → 157; counter-expanded cases: 269 → 214. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 4,065 → 4,065 statements; 2,338 → 2,338 branches.
Candidate files:
ui/src/app/agent-selection.test.ts,ui/src/app/app-host-native-shell.test.ts,ui/src/app/approval-deep-link.test.ts,ui/src/app/bootstrap-location.test.ts,ui/src/app/browser-auth-recovery.test.ts,ui/src/app/browser-bootstrap.test.ts,ui/src/app/canvas-surface-lease.test.ts,ui/src/app/chat-attachment-handoff.test.ts,ui/src/app/config.test.ts,ui/src/app/connection-bootstrap.test.ts,ui/src/app/control-ui-presentation.test.ts,ui/src/app/custom-theme.test.ts,ui/src/app/exec-approval.test.ts,ui/src/app/gateway-readiness.test.ts.x1219
Candidate-file test LOC: 3708 → 2809 (-899); declarations: 154 → 111; counter-expanded cases: 312 → 152. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 1,659 → 1,659 statements; 1,352 → 1,350 branches.
Candidate files:
src/daemon/constants.test.ts,src/daemon/diagnostics.test.ts,src/daemon/gateway-heap.test.ts,src/daemon/launchd-current-service.test.ts,src/daemon/launchd-foreign-jobs.test.ts,src/daemon/launchd-system.test.ts,src/daemon/program-args.test.ts,src/daemon/restart-logs.test.ts,src/daemon/restart-storm.test.ts,src/daemon/runtime-binary.test.ts,src/daemon/runtime-paths.test.ts,src/daemon/schtasks-runtime-definition.test.ts.x1217
Candidate-file test LOC: 5054 → 4236 (-818); declarations: 136 → 105; counter-expanded cases: 175 → 125. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 9,697 → 9,648 statements; 6,773 → 6,736 branches.
Candidate files:
src/plugins/official-external-plugin-catalog-envelope.test.ts,src/plugins/official-external-plugin-repair-hints.test.ts,src/plugins/one-shot-diagnostics.test.ts,src/plugins/package-compat.test.ts,src/plugins/payload-verification.test.ts,src/plugins/plugin-command-runtime.test.ts,src/plugins/plugin-graceful-init-failure.test.ts,src/plugins/plugin-instance-constructors.test.ts,src/plugins/plugin-instance-reflection.test.ts,src/plugins/plugin-lifecycle-lease.test.ts,src/plugins/plugin-lookup-table.test.ts,src/plugins/plugin-metadata-state-worker.test.ts.x1221
Candidate-file test LOC: 5418 → 4174 (-1244); declarations: 178 → 120; counter-expanded cases: 231 → 135. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 1,270 → 1,270 statements; 992 → 992 branches.
Candidate files:
config/test-mock-exports-baseline.txt,src/plugin-sdk/memory-host-markdown.test.ts,src/plugin-sdk/migration-runtime.test.ts,src/plugin-sdk/pair-loop-guard-runtime.test.ts,src/plugin-sdk/persistent-dedupe.test.ts,src/plugin-sdk/provider-auth-runtime.test.ts,src/plugin-sdk/provider-auth.test.ts,src/plugin-sdk/provider-binary-stream.test.ts,src/plugin-sdk/provider-catalog-live-upstream.test.ts,src/plugin-sdk/provider-catalog-runtime.test.ts,src/plugin-sdk/provider-entry.test.ts,src/plugin-sdk/provider-model-shared.test.ts,src/plugin-sdk/provider-onboard.connection.test.ts,src/plugin-sdk/provider-onboard.test.ts,src/plugin-sdk/provider-openai-chatgpt-auth.test.ts.x1222
Candidate-file test LOC: 4676 → 4051 (-625); declarations: 107 → 84; counter-expanded cases: 193 → 151. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: Original report: 46,547 statements / 27,269 branches before; comparison marked unfinished. Later successful Testbox artifact recovered: 46,547 → 46,888 statements; 27,271 → 27,410 branches when all raw groups are merged, including the deleted boundary group on the before side. All three surviving groups passed. The two-branch discrepancy is retained explicitly rather than rewriting the original report. The artifact source tree matches all shard tests and the changed checker.
Candidate files:
scripts/check-extension-plugin-sdk-boundary.mts,scripts/test-projects.test-support.mts,test/appcast.test.ts,test/architecture-smells.test.ts,test/cli-json-stdout.config.e2e.test.ts,test/extension-import-boundaries.test.ts,test/extension-test-boundary.test.ts,test/feishu-message-read-authority.integration.test.ts,test/jsdom-compat.test.ts,test/linux-dashboard-recovery.test.ts,test/linux-quickchat-stream.test.ts.x1215
Candidate-file test LOC: 6708 → 5830 (-878); declarations: 175 → 133; counter-expanded cases: 242 → 150. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 13,360 → 13,359 statements; 7,725 → 7,722 branches.
Candidate files:
extensions/codex/src/supervision-tools.test.ts,extensions/codex/src/web-search-provider.test.ts,extensions/whatsapp/src/status-issues.test.ts,extensions/whatsapp/src/text-runtime.test.ts,src/commands/doctor/shared/update-phase.test.ts,src/gateway/server-methods/worktrees.test.ts,src/infra/outbound/target-normalization.test.ts,src/infra/outbound/target-resolver.test.ts,src/plugins/wired-hooks-compaction.test.ts,src/plugins/wired-hooks-inbound-claim.test.ts,src/plugins/wired-hooks-reply-dispatch.test.ts,src/plugins/wired-hooks-reply-payload-sending.test.ts,src/plugins/worker-provider-registry.test.ts,test/scripts/write-cli-startup-metadata.test.ts.x1216
Candidate-file test LOC: 9046 → 7922 (-1124); declarations: 167 → 128; counter-expanded cases: 301 → 215. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 5,826 → 5,821 statements; 4,946 → 4,939 branches.
Candidate files:
src/cli/update-cli/schema-preflight.test.ts,src/cli/update-cli/update-command-admission-schema.test.ts,src/cli/update-cli/update-command-doctor-delegation.test.ts,src/cli/update-cli/update-command-execution.test.ts,src/cli/update-cli/update-command-executor.test.ts,src/cli/update-cli/update-command-freebsd-pkg.test.ts,src/cli/update-cli/update-command-initialization.test.ts,src/cli/update-cli/update-command-lease.test.ts,src/cli/update-cli/update-command-pending-recovery.test.ts,src/cli/update-cli/update-command-post-update-recovery.test.ts,src/cli/update-cli/update-command-post-update.test.ts,src/cli/update-cli/update-command-recovery.test.ts,src/cli/update-cli/update-command-report.test.ts,src/cli/update-cli/update-command-resume-completion.test.ts.x1224
Candidate-file test LOC: 5325 → 4814 (-511); declarations: 174 → 146; counter-expanded cases: 232 → 191. Counts compare the replay against its pinned base, not the older whole-shard inventories, and include files restored during review.
In-shard coverage evidence: 8,536 → 8,534 statements; 3,642 → 3,640 branches.
Candidate files:
extensions/mattermost/src/mattermost/reply-delivery.test.ts,extensions/mattermost/src/mattermost/slash-commands.test.ts,extensions/mattermost/src/mattermost/slash-state.test.ts,extensions/mattermost/src/mattermost/target-resolution.test.ts,src/agents/auth-profiles/upsert-with-lock.sqlite.test.ts,src/daemon/systemd-unavailable.test.ts,src/daemon/systemd-user-transport.test.ts,src/logging/logger-file-transport.test.ts,src/logging/logger-redaction-behavior.test.ts,src/logging/redact-token-ordering.test.ts,src/logging/timestamps.test.ts,src/media/remote-workspace-file.test.ts,src/tui/tui-stream-assembler.test.ts,src/tui/tui-submit-state.test.ts,src/tui/tui-task-suggestions.test.ts.