Repository navigation
test(core,plugins): remove low-value tests (batch d119) - #162202
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 30, 2026, 7:30 PM ET / 23:30 UTC. ClawSweeper reviewWhat this changesThe branch consolidates and removes overlapping core and plugin tests, simplifies their test support, and updates two test inventory entries without changing production runtime files. Merge readiness⛔ Blocked before merge - 1 item remains Keep this active PR open. Current main does not contain the consolidation, and the sampled voice-call, Mattermost, and plugin-service changes retain important contracts at stronger test owners. I found no concrete introduced defect. Priority: P3 Review scores
Verification
How this fits togetherThese suites exercise OpenClaw's agent, Gateway, plugin, and channel behavior using fixtures and transport-level checks. CI selects the suites and reports whether those behavior contracts still pass. flowchart LR
A[Runtime behavior] --> B[Test fixtures]
B --> C[Core and plugin suites]
C --> D[CI test selection]
D --> E[Validation results]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -10480, Other -2. Total -10482 across 42 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one meaningful test owner for each retained behavior contract and land the consolidation through the normal exact-head review and CI gates. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR prunes test coverage rather than reporting a runtime defect; the introduced diff identifies the changed suites. Is this the best way to solve the issue? Yes, consolidating overlapping cases at their owning test boundaries is appropriate where the retained assertions still protect the behavior. The sampled deleted contracts have corresponding retained checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ca1706469639. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
) * test(pr): deslop t0431 tests * test(plugins): deslop t0430 tests * test(mattermost): deslop t0415 tests * test(telegram): deslop t0427 tests * test(process): deslop t0424 tests * test(state): deslop t0434 tests * test(voice-call): deslop t0437 tests * test(telegram): deslop t0428 tests * test(gateway): deslop t0443 tests * test(agents): deslop t0436 tests * test: preserve lifecycle and authorization contracts in d119
…arge-in-guard Resolve the realtime-handler.test.ts conflict on main's test scaffold (bargeInHarness, sendMedia, expectFrame, talkEvents): - Re-express the playout-masking contract on the two barge-in tests main kept: the session-bridge override test now asserts no local barge-in while assistant audio plays out and the fallback once the window closes; the late local barge-in test advances past the playout tail first. - Take main's removal of the continuity-reset mark test and of the provider-without-speech-started fallback test (openclaw#162202). The masking and post-window fallback for that provider shape stay covered by realtime-handler.echo-guard.test.ts; its output.audio.done turn assertion moves into the override test. - Drop the echo-guard test's own teardown: main's connectCarrierStream now registers socket, handler, and server cleanup, so closing again failed with ERR_SERVER_NOT_RUNNING.
What Problem This Solves
Batch d119 removes redundant test variants, overlapping workflow replays, and repeated fixture setup across PR operation locks, plugin services, Mattermost, Telegram, process supervision, user profiles, voice calls, Gateway node events, and tool-loop detection.
User Impact
No production runtime behavior changes. The retained suites continue to exercise authorization, ownership, cleanup, recovery, persistence, cancellation, and stale-session boundaries. Campaign shard reports record 1,001 → 593 executed cases before the landing-review restorations; these historical counts include parameterized cases and are distinct from the declaration counts below.
Why This Change Was Made
Consolidate stronger behavior checks at their existing owners and remove redundant variations. Test support is simplified alongside the tests. The max-lines baseline loses the now-small tool-loop test entry, and the CI proof inventory loses the deleted voice-call persistence file whose retained cases moved into existing protected suites.
All ten supplied commits applied in order onto main at
27696df722600d5373ed7618c1c65050f3891636. No replay conflicts or skipped commits. Post-review retentions and the dropped test-support parameter change are recorded below. Main's newer content was retained; the CI inventory merged automatically. No changed path matches the current CODEOWNERS rules.Production runtime LOC: +0 / -0. Tests: +6,200 / -17,699 (net -11,499). Test support: +250 / -674 (net -424). Tooling/configuration: +0 / -2. Overall: net -11,925 lines across 42 files.
Evidence
tbx_01m3t5cvw8ssyvxbfvz4ek1v6p: frozen install plus all 28 surviving changed test files passed across 20 routed Vitest shards (301.74 seconds of test execution).CI=1 pnpm test extensions/voice-call/src/webhook/realtime-handler.lifecycle.test.ts src/plugins/services.reload.test.ts src/process/supervisor/adapters/child.service-lifecycle.test.ts src/gateway/server-node-events.test.tspassed 112 tests in four files (33.30 seconds).OPENCLAW_TESTBOX=1 OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 node scripts/check-changed.mjs -- <all 42 changed paths>: exit 0, including core/extension/script/root test types, ratchets, dead-export scans, and lint. The final combined remote command returned exit 0 after 33m51s. A non-fatal external runner portal-sync warning followed successful execution.oxfmt, plainoxlint -c .oxlintrc.json, andgit diff --checkpassed.Independent review retained additional owner-boundary proof: initial idle expiry and active-media renewal, transcripts arriving during shutdown, queued reload generations, failed-candidate handoff ownership, wrong-owner/missing-session authorization, native and broker lifecycle transports, and direct-child secret input. The native/broker test-support parameter change was fully dropped. No runtime code changed.
The full-diff autoreview raised seven findings. Six were addressed (the durability finding was narrowed to the uncovered shutdown-success case); the disabled provider-owned consult finding was rejected because the retained lifecycle table explicitly includes
toolPolicy: "none", rejected consultation, and no handler side effects. A fresh autoreview of the staged restorations returned scoped-clean at P0/P1. The separate source review also confirmed the final restorations.Per-shard campaign evidence
Coverage totals below are from each original in-shard results report, not a new coverage measurement on this replay. Every shard stayed within the 1% statement/branch-loss bound. Declaration counts count source-level
it/testdeclarations (parameterized rows are not expanded).Files touched by shard
t0431
test/scripts/pr-operation-lock.test.tst0430
src/plugins/services.cron.test.tssrc/plugins/services.reload.test.tssrc/plugins/services.replacement.test.tssrc/plugins/services.test.tst0415
extensions/mattermost/src/mattermost/monitor-helpers.test-support.tsextensions/mattermost/src/mattermost/monitor-onchar.test-support.tsextensions/mattermost/src/mattermost/monitor.authz.test.tsextensions/mattermost/src/mattermost/monitor.block-progress.test-support.tsextensions/mattermost/src/mattermost/monitor.channel-kind.test-support.tsextensions/mattermost/src/mattermost/monitor.inbound-system-event.test.tsextensions/mattermost/src/mattermost/monitor.preview-delivery.test-support.tsextensions/mattermost/src/mattermost/monitor.preview-policy.test-support.tsextensions/mattermost/src/mattermost/monitor.reaction-thread-session.test.tsextensions/mattermost/src/mattermost/monitor.test.tst0427
extensions/telegram/src/bot-message-dispatch.directive-delivery.test.tsextensions/telegram/src/bot-message-dispatch.draft-finalization.test.tsextensions/telegram/src/bot-message-dispatch.final-delivery-lifecycle.test.tsextensions/telegram/src/bot-message-dispatch.native-question.test.tsextensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.tsextensions/telegram/src/bot-message-dispatch.progress-card.test.tsextensions/telegram/src/bot-message-dispatch.progress-command-detail.telegram-http.test.tsextensions/telegram/src/bot-message-dispatch.progress-lifecycle.telegram-http.test.tst0424
src/process/supervisor/adapters/child.events.test.tssrc/process/supervisor/adapters/child.secret-abort.test.tssrc/process/supervisor/adapters/child.service-lifecycle.test.tssrc/process/supervisor/adapters/child.test.tst0434
src/state/user-profiles.owner.test.tssrc/state/user-profiles.test.tst0437
extensions/voice-call/src/webhook/realtime-handler.admission.test.tsextensions/voice-call/src/webhook/realtime-handler.delegation.test.tsextensions/voice-call/src/webhook/realtime-handler.lifecycle.test-helpers.tsextensions/voice-call/src/webhook/realtime-handler.lifecycle.test.tsextensions/voice-call/src/webhook/realtime-handler.persistence.test.tsextensions/voice-call/src/webhook/realtime-handler.test.tsextensions/voice-call/src/webhook/realtime-handler.upgrade.test.tsscripts/lib/ci-proof-test-inventory.mtst0428
extensions/telegram/src/bot-message-dispatch.recovery.telegram-http.test.tsextensions/telegram/src/bot-message-dispatch.reply-targets.telegram-http.test.tst0443
src/gateway/server-node-events.test.tst0436
config/max-lines-baseline.txtsrc/agents/tool-loop-detection.test.ts