Repository navigation
test(core,plugins): remove low-value tests (batch d029) - #158964
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, 11:25 AM ET / 15:25 UTC. ClawSweeper reviewWhat this changesThe branch consolidates and removes tests across OpenClaw core and bundled plugins and shrinks the max-lines suppression baseline, without changing production code. Merge readiness⛔ Blocked before merge - 3 items remain Keep this active test-cleanup PR open. Its changes are not on current main, and the review found one narrow baseline error to fix before merge. Priority: P3 Review scores
Verification
How this fits togetherCore and plugin tests check behavior before changes pass OpenClaw's CI gate. A separate ratchet compares source-file lint suppressions with a tracked baseline and reports entries that no longer match. flowchart LR
A[Core and plugin tests] --> B[Changed-file CI]
B --> C[Test results]
D[Source suppressions] --> F[Baseline comparison]
E[Baseline list] --> F
F --> G[Local result or hosted warning]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests -2999, Other -2. Total -3001 across 78 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the baseline synchronized with the actual suppression inventory, and retain tests that protect distinct behavior at their owning boundaries. Do we have a high-confidence way to reproduce the issue? Yes, from source: the test merge retains OpenRouter's suppression while dropping its baseline entry, and the ratchet marks unlisted suppressions as violations. I did not execute the check. Is this the best way to solve the issue? No, not yet: the sampled test consolidations retain useful boundary coverage, but the baseline must keep the OpenRouter entry while that suppression remains. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d0a658d9dcec. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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
|
45 upstream commits, including the Feishu webhook move to Gateway routes (openclaw#158861), which replaces webhookHost and webhookPort with legacyWebhook in the Feishu schema. channel.ts and config-schema.ts changed on both sides and auto-merged, and each equals this branch plus upstream's own lines. Nothing this branch changes reads webhookHost or webhookPort, and the modules it imports from upstream's change (accounts, types, gateway, doctor, config-schema) keep every export it uses. 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 3744 because each side independently took the channel count from 3742 to 3744, and the real count with both is 3746. 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 3746, 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. Feishu: 106 files and 1935 tests in the extension project, 16 files and 301 tests in the database-workers project, all 122 Feishu test files on disk. The forwarder test and the routing guards pass, 1908 tests. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap and assertion-safety ratchets against upstream/main, oxlint and oxfmt on the 42 changed code files all pass. The max-lines ratchet flags extensions/openrouter/index.test.ts, whose baseline entry upstream's openclaw#158964 removed while the file keeps its suppression. This branch touches neither file.
) * test(video): deslop s205 tests * chore: prune stale max-lines baseline entry * test(tool-call-repair): deslop s214 tests * test(helpers): deslop s208 tests * test(shared): deslop s217 tests * test(transcripts): deslop s219 tests * test(plugin-state): deslop s222 tests * test(teams-meetings): deslop s218 tests * test(qa-channel): deslop s216 tests * test(nextcloud-talk): deslop s220 tests * chore: prune replayed video test baseline
What Problem This Solves
The test suite contains repeated assertions, redundant table rows, and verbose fixture setup that add maintenance cost without distinct regression coverage.
User Impact
No user-visible behavior change. Batch d029 reduces test maintenance while preserving current main's newer lifecycle, authorization, storage, and transport contracts. Production code is unchanged.
Why This Change Was Made
Replay ten campaign commits onto current main, consolidating fixtures and removing low-value duplicate coverage. The final replay changes 77 test files: +1,152/-4,151 test LOC (net -2,999) and 890→800 syntactic test declarations (-90). Production LOC: +0/-0. The max-lines baseline shrinks by two entries. Parameterized declarations count once here; these are not executed case counts.
All ten commits were applied in order; no whole commit was skipped. Conflicting cleanup was narrowed to preserve current main:
No changed path matches the current CODEOWNERS rules.
Evidence
pnpm install --frozen-lockfile --prefer-offline, formatting of all 77 changed test files,git diff --check origin/main, and the changed-check dry run passed. The max-lines baseline was recomputed with the repository ratchet tool.config/tsconfig/oxlint.core.json) and helper tests (test/tsconfig/tsconfig.test.root.json). Plugin type-aware lint stopped before lint execution because SDK declaration generation timed out after 300,000 ms. The repository wrapper's syntax-only mode then passed for every changed plugin test, including unused-import/variable checks.tbx_01m3f0gtwmzh3ka15g8xjzbeq8verified and synced the candidate. The first command rejected an obsolete extra sibling path (plugin-state-store.e2e.test.ts) before running any tests. That target was corrected to the currentplugin-state-worker.test.ts; all 79 requested targets were checked to exist. The corrected command combinedCI=1 pnpm testfor all 77 changed tests plus the tool-payload and plugin-state-worker siblings, followed byOPENCLAW_TESTBOX=1 OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 node scripts/check-changed.mjs -- <78 changed paths>. It was rejected before dispatch because the lease expired during cold source preparation (Blacksmith Testbox has finished; create a new lease, provider error, command time 0). A preliminary attempt also corrected the wrapper's base-ref argument requirement before dispatch. No corrected-run test failure is being suppressed, and no fresh remote pass is claimed.openclaw/ci-gateremains the merge gate.The following are historical in-shard coverage results, not a fresh coverage measurement of this replay. The narrower replay above retains additional current-main cases. Each totals cell reproduces its shard report's covered-count line.
Coverage limitations: s219's formal comparison excluded every file after a baseline timeout, so its 0→0 row is not meaningful coverage proof. That report separately recorded raw covered statements 1,303→1,304 and branches 976→977, without raw function totals. Its separate flake fix is not included in this batch. The first s208 comparison exceeded 1% amid slow-SQLite diagnostics; an unchanged rerun produced the quoted counts. No replay coverage percentage is claimed.
Per-shard changed files
All names below end in
.test.ts.src/video-generation/:capabilities,capability-overlays,dashscope-compatible,live-test-helpers,runtime.packages/tool-call-repair/src/:grammar,payload,protection-fast-path,stream-normalizer.test/helpers/:bounded-child-output,gateway-e2e-harness,gateway-multi-acquisition,live-image-probe,openai-long-context-live,openclaw-test-instance.acquisition,process-wait,qa-gateway-cleanup,temp-dir.src/shared/:account-enabled,agent-liveness,agent-run-status,assistant-error-format.html,assistant-error-format,bounded-buffer,chat-message-content,chat-send-ack-status,config-eval,device-bootstrap-profile,entry-status,frontmatter,global-singleton,human-list,ignore-rules,json-schema-defaults,levenshtein-distance,model-key,node-match,node-resolve,one-time-ticket-store,operator-scope-compat,path-array-index,pid-alive,requirements,resume-handoff,string-sample; undertext/:assistant-visible-text,final-tags,formatted-reasoning-message,reasoning-tags.src/transcripts/:capture-stop,config,library,status,summary-model.src/plugin-state/:plugin-state-store.fresh-store,plugin-state-store.import,plugin-state-store.schema.extensions/teams-meetings/src/:cli; undertransports/:teams-meetings-audio-routing,teams-meetings-caption-capture,teams-meetings-platform-adapter,teams-meetings-urls.extensions/qa-channel/src/:bus-client,channel,channel.threading,gateway.extensions/nextcloud-talk/src/:inbound.authz,inbound.behavior,inbound.room-info-retry,message-actions,monitor-runtime.abort,monitor.limiter-lifecycle,monitor.replay,room-info,send.cfg-threading,setup,webhook-spool.config/max-lines-baseline.txtremoves onlyextensions/openrouter/index.test.tsandsrc/video-generation/runtime.test.ts.