Repository navigation
test(core, plugins): remove low-value tests (batch d039) - #159090
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, 2:18 PM ET / 18:18 UTC. ClawSweeper reviewWhat this changesThe branch removes repeated tests across core status, MCP, plugins, and release tooling, consolidates retained fixtures, and makes an internal plugin pack-check helper private. Merge readiness⛔ Blocked before merge - 2 items remain Keep open. Current main has not absorbed this coherent test cleanup, and the verified test merge still carries its changes. The sampled removals retain stronger coverage at shared or owning boundaries; exact-head CI remains pending. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's core and plugin tests check behavior before changes land. Vitest and CI run those suites and report regressions, including failures in the plugin release pack-check path. flowchart LR
A[Core and plugin behavior] --> B[Owned test suites]
C[Plugin release helper] --> D[Pack-check suite]
B --> E[Vitest and CI]
D --> E
E --> F[Regression signal]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep each distinct authorization, lifecycle, provider, and release contract at its strongest test boundary, then land the cleanup through the required exact-head CI gate. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR does not report a runtime defect. Its test removals and retained checks can be compared against current main. Is this the best way to solve the issue? Likely yes: sampled duplicate cases move coverage toward shared or owning boundaries without a concrete lost contract found. The combined head still needs its required CI validation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against df50212501d1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
121 upstream commits, including nine low-value test batches (d027, d039 to d047) and the msteams webhook move to Gateway routes (openclaw#158939). Two files outside the generated set changed on both sides and auto-merged. presentation-card.test.ts loses upstream's own "accepts cards without markdown tables" test (openclaw#159090), which this branch never edited, and keeps the branch's additions. The database-workers routing list takes upstream's new ingress entries (openclaw#159073, openclaw#158848) and keeps the branch's outbound.handoff.test.ts. Two conflicts, both generated: docs/.generated/config-baseline.sha256 and src/config/bundled-channel-config-metadata.generated.ts. Both came from upstream and were regenerated. config-baseline.counts.json auto-merged to 3746 because each side independently took the channel count from 3744 to 3746 (the branch's Feishu entries, upstream's msteams entries), and the real count with both is 3748. build:docker ran in a separate detached checkout of this commit outside the nested node_modules install. Regenerating there changed those three files and nothing else, giving core 2463, channel 3748, plugin 4349 as predicted, a channel hash neither side had, and upstream's core and plugin lines. The three generated-file checks pass there. The lockfile did not move. No test this branch moved was deleted upstream in this range, and the 15 test files upstream deleted outright are ones this branch never touched. Upstream removed 28 Feishu test declarations and this merge removes the same 28. Feishu: 105 files and 1850 tests in the extension project, 17 files and 319 tests in the database-workers project, all 122 Feishu test files on disk. The forwarder test and the routing guards pass, 1955 tests. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines and assertion-safety ratchets against upstream/main, oxlint and oxfmt on the 42 changed code files all pass.
…9090) * test(status): deslop s223 tests * test(onepassword): deslop s225 tests * test(mcp): deslop s224 tests * test(scripts): deslop s215 tests * test(fal): deslop s226 tests * test(feishu): deslop s227 tests * test(amazon-bedrock-mantle): deslop s229 tests * test(lobster): deslop s234 tests * test(comfy): deslop s228 tests * test(irc): deslop s230 tests
What Problem This Solves
Batch d039 removes repeated test scenarios, implementation-specific assertions, and helper replays already covered at their owning boundaries. Repeated fixtures obscure the distinct regressions these suites need to protect and add maintenance cost.
User Impact
No runtime behavior change is intended. The batch retains distinct authorization, protocol, lifecycle, platform, and regression coverage. The source batch's only production/tooling change makes an internal release-check helper private; its Comfy baseline edit removes one obsolete entry.
Why This Change Was Made
The ten original shard audits stopped at defensible deletions, including where that fell below their reduction targets. They retained independently useful contracts and consolidated fixtures without weakening the assertions that remain. This PR replays that work onto current main.
.github/CODEOWNERSrules. The already-deleted security-sensitive workflow test remains deleted.Replay conflict decisions
limitcontract. Dropped history-fallback hunks retired in3e4ab6bed8c; retained the direct attachment-content test because the proposed replacement depended on that retired fallback. Kept the newer persisted-subagent ACP denial regression.c2b84506a93; the live CLI backend Docker test already matches the campaign’s intent and has no final diff.comment-shared.test.tsandmonitor.vc-meeting-invited-handler.test.tsexactly as main because their boundary/lifecycle coverage was rewritten. Preserved newer SQLite, account-restriction, listener, untrusted-content, and forwarded-order regressions in the other files.fakeCtx()and its type import because newer main tests use them. Cancellation consolidation retains the resume checkpoint and persistence boundary.Evidence
7d4c4ae4000de48e1da133fce101ded2a4d86768, replay baseba43505a2cb78c3b2f3b4e69f36b373e6d2de7be.node scripts/crabbox-wrapper.mjs run --id tbx_01m3fcccjsehharn3bcxfacf65 --timing-json --shell -- "CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <95 files>", with a SHA-256 source check before tests. No test dispatched: cold local source-capsule preparation exceeded 30 minutes and the lease idle window; cancellation reportedsource capsule could not refresh its Git index. This is unrun proof, not a passing test result.OPENCLAW_TESTBOX=1 CRABBOX_PROVIDER=blacksmith-testbox node scripts/check-changed.mjs -- <97 changed paths>was started and had reached Blacksmith source preparation when this evidence was prepared. An initial attempt using the pinned SHA as--basewas rejected before execution because this wrapper requiresorigin/<branch>; the corrected attempt uses its supported default. No checks had executed at publication preparation. Heavy local fallback is disabled by the supervising task.oxfmt --write, plainoxlint -c .oxlintrc.jsonbefore each replay commit, andgit diff --checkpassed. Two existing.sort()calls in the touched browser-CDP test were updated to.toSorted()for the current lint rule.tbx_01m3fcccjsehharn3bcxfacf65is stopped/completed (run). Source staging prevented fresh focused proof; the changed gate was still preparing source. No executed test failure is being waived. Published under the campaign’s explicit infrastructure-gap rule; requiredopenclaw/ci-gateremains the merge gate and independent review runs during CI.Final replay measurements compare base
ba43505a2cb78c3b2f3b4e69f36b373e6d2de7bewith clean head7d4c4ae4000de48e1da133fce101ded2a4d86768. Counts cover only paths changed by this replay; current validation is recorded above.The original shard file lists below are historical. These five original paths have no final diff and are excluded from the final touched-file counts:
test/scripts/security-sensitive-guard-workflow.test.ts,test/scripts/test-live-cli-backend-docker.test.ts,extensions/feishu/src/comment-shared.test.ts,extensions/feishu/src/monitor.vc-meeting-invited-handler.test.ts, andextensions/irc/src/client.surrogate.test.ts. The additional final non-test paths arescripts/plugin-release-pretag-pack-check.ts(+1/−1) andconfig/max-lines-baseline.txt(+0/−1).Historical in-shard evidence: scope, reductions, coverage, and limitations
These measurements belong to the original shard runs, before replay onto current main. They do not establish current-head validation. Static declaration counts come from the supplied source commits versus their respective parents, across the test files each commit touched. Each
it/testregistration counts once, including.each,.for,.runIf, and.skipIfchains; matrix rows are not expanded. Executed-case totals and coverage come from the original shard reports.The supplied source commits total −140 static declarations, test +2,591/−7,567 lines (net −4,976), production/tooling +1/−1 lines, and config −1 line. These source totals may differ from the final replay totals above.
s223 — status
Files:
src/status/{agent-runtime-label,codex-synthetic-usage,status-message,status-plugin-health.installed,status-plugin-health.runtime,status-plugin-health,status-text}.test.ts.Removed redundant health/runtime-label cases, rendered-status predicate repeats, duplicate cache/cost rows, and a renderer self-comparison. Retained storage non-creation/deduplication, bounded hydration, heartbeat-roster performance, quarantine liveness/PID reuse, installed-health contracts, and context-window/pin regressions.
Both coverage groups were included. Baseline 117/117 and final 98/98 tests, formatting, whitespace, and the full changed gate passed.
s225 — 1Password
Files:
extensions/onepassword/src/{broker,cli,op-client,secret-ref-cli,secret-ref-resolver}.test.ts.Removed shared CLI helper replays, duplicate numeric/error variants, a redundant cache-deny case, and the fake Commander implementation. Retained authorization, expiry, redaction, executable trust, configuration, Unicode, and subprocess cleanup. Equivalent target-validation and alias-selection coverage remains an integration requirement at the Vault CLI owner.
One
secret-ref-cli.tsbranch was lost (0.27% overall); no statements or coverage groups were dropped. Final 97 tests, coverage, formatting, whitespace, and the full changed gate passed; the existing platform skip was unchanged.s224 — MCP
Files:
src/mcp/{channel-bridge,channel-server,openclaw-tools-serve,plugin-tools-handlers.cancel,plugin-tools-registration.stdio,plugin-tools-serve}.test.ts.Removed duplicate routing/payload, permission/sweeper, image/error/alias, cancellation, and plain-stdio cases, plus list-only smoke cases and ineffective probes. Retained authorization, cancellation phases, registration ownership, TTL, TLS/reconnect, and shutdown regressions.
Both coverage groups were included. All 80 tests and the remaining selected checks passed. The original full changed gate failed on a pre-existing stale
extensions/openrouter/index.test.tsentry inconfig/max-lines-baseline.txt; neither file was changed by this shard.s215 — scripts
Files:
scripts/plugin-release-pretag-pack-check.ts;test/scripts/{audit-control-ui-dead-css,browser-cdp-snapshot,canonical-json,check-deadcode-reporting,check-no-random-messaging-tmp,check-script-erasability,control-ui-mock-channels,control-ui-proof-args,copy-export-html-templates,embedded-run-abort-leak,extension-source-classifier,gateway-bench-runtime,ios-release-prepare,ios-release-signing,numeric-options,openclaw-cross-os-release-checks-lanes,parallels-exec,parallels-runtime-setup,plugin-release-pretag-pack-check,plugin-sdk-declaration-budget,print-cli-backend-live-metadata,protocol-schema-artifact,qa-lab-up,sanitize-bundler-helper-dts-exports,security-sensitive-guard-workflow,sleep,test-live-cli-backend-docker,ts-guard-utils,upgrade-survivor-plugin-dependencies,verify-full-release-producer-job,vitest-shard-timings,write-package-dist-inventory}.test.ts.Removed 42 repeated cases/rows, eight checks duplicated by stronger owner proof, and two implementation-specific JSON checks. Retained security, release, protocol, platform, and lifecycle regressions. The production/tooling change makes the release-check helper private.
The 131-file tooling coverage group remained excluded after retry. The 31 reduction candidates separately retained 948 statements, 554 branches, and 149 functions, with no per-file drops. Final focused proof had 181 passing tests; the changed gate, formatting, and whitespace checks passed. The full run retained five unchanged timing failures; two task-update failures subsequently passed all 15 isolated rerun cases. The report's test LOC reduction is 329, whereas the supplied source commit is net −331. A Docker-tracing fix described by that report was committed separately and is outside this batch.
s226 — fal
Files:
extensions/fal/{image-generation-provider.gpt-image-25,image-generation-provider,video-generation-provider}.test.ts.Removed redundant geometry/resolution, copied capability/model-inventory, duplicate generation, and shared binary-reader checks. Retained geometry bounds, model routing, SSRF, deadlines, cleanup, queue failures, and malformed-under-cap coverage; music and onboarding cases remain unchanged.
The lost branch handles filename-extension fallback for a rejected MIME type; no statements were lost. All 86 tests, coverage, formatting, whitespace, and the full changed gate passed.
s227 — Feishu
Files:
extensions/feishu/src/{bot-group-name,bot.checkBotMentioned,bot.helpers,bot.stripBotMention,card-interaction,card-ux-launcher,comment-reaction,comment-shared,dedup,doctor-contract,docx-batch-insert,external-keys,monitor.vc-meeting-invited-handler,policy,post,presentation-card,reasoning-preview,send-result,send-target,send.retry,sequential-key,tool-account,tool-result,typing-backoff}.test.ts.Removed repeated URL/style/Unicode/empty-input variants, retry/backoff cases, duplicate helper/boundary checks, and an iterator self-assertion. Retained auth/defaults, SDK schemas, replay protection, pagination, concurrency, identity recovery, and media teardown.
No coverage groups were excluded. The sole statement drop is the trivial unknown-action formatter in
tool-result.ts; no source file lost more than five statements. All 60 shard files, coverage, formatting, whitespace, and the full changed gate passed.s229 — Bedrock Mantle
Files:
extensions/amazon-bedrock-mantle/{discovery,index,mantle-anthropic.runtime}.test.ts.Removed redundant auth/cache/network/cache-retention cases and metadata-only registration checks. Retained public token-expiry coverage, both IAM race orders, distinct refresh failures, response bounds, pricing transitions, and model-specific reasoning rules.
All 62 tests, coverage, formatting, whitespace, and the full changed gate passed. An unsupported Promise helper introduced during refactoring was corrected before that successful rerun.
s234 — Lobster
Files:
extensions/lobster/src/{lobster-runner,lobster-taskflow,lobster-tool}.test.ts.Removed duplicate matrix/boundary cases, implementation-specific error-precedence checks, and a copied sandbox-factory test. Retained distinct validation, approval-ID regressions, cancellation persistence/failures, cyclic approvals, output bounds, paths, timeout behavior, and real-package loading.
No per-file drops or excluded coverage groups. Baseline/final tests, formatting, whitespace, and the full changed gate passed; 53 tests remain.
s228 — Comfy
Files:
config/max-lines-baseline.txt;extensions/comfy/{image-generation-provider,music-generation-provider,video-generation-provider,workflow-runtime.header-secrets.integration}.test.ts.Removed redundant config/auth/cloud cases, mocked SSRF/redirect repeats, shared media-validation checks, sibling header-redaction repeats, and a cosmetic seed-name row. Retained distinct SSRF boundaries, MIME rejection, video filtering, secret resolution/redaction, music timeout, SDK capabilities, and index auth metadata. Removed one obsolete max-lines baseline entry.
All 52 tests, coverage, formatting, whitespace, and the full changed gate passed.
s230 — IRC
Files:
extensions/irc/src/{accounts,client.surrogate,client,config-schema,connect-options,control-chars,inbound.behavior,irc-ingress,monitor,normalize,protocol,send,setup}.test.ts(client.surrogate.test.tsdeleted).Removed duplicate credential/nickname rows, redundant schema/protocol/control-character cases, and weaker boundary repeats. Moved unique surrogate checks to the real-socket harness. Retained cancellation, credential precedence, Unicode, migration, account isolation, shutdown races, and the real-process import smoke.
The sole coverage group was excluded after its baseline smoke timed out, so these comparator totals are not evidence of a successful full coverage comparison. Both after snapshots passed; raw coverage remained 885 statements, 636 branches, and 211 functions, with no per-file drops. The baseline printed 179 passed plus the import-smoke timeout; that test passed in isolation. Final proof had 156 passing tests. Formatting, whitespace, typechecking, all three dead-export scans, and focused IRC lint passed. The full changed gate failed only on the pre-existing unused
startCallatextensions/google-meet/index.test.ts:4823, verified unchanged from the supplied base.