Skip to content

test(core,plugins): remove low-value tests (batch d119) - #162202

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d119-1790805296
Sep 30, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d119-1790805296

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Blacksmith Testbox run 36783113533, lease tbx_01m3t5cvw8ssyvxbfvz4ek1v6p: frozen install plus all 28 surviving changed test files passed across 20 routed Vitest shards (301.74 seconds of test execution).
  • Final retention fixes: 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.ts passed 112 tests in four files (33.30 seconds).
  • The same leased runner then executed 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.
  • Local targeted oxfmt, plain oxlint -c .oxlintrc.json, and git diff --check passed.

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/test declarations (parameterized rows are not expanded).

Shard Test LOC added / removed (net) Declarations before → after Original coverage totals
t0431 +255 / -1698 (-1443) 73 → 50 (-23) covered statements 57 -> 57 (0); branches 8 -> 8 (0); functions 9 -> 9 (0)
t0430 +934 / -2465 (-1531) 55 → 27 (-28) statements 1,805 -> 1,803 (-0.11%); branches 785 -> 780 (-0.64%); functions 385 -> 384
t0415 +575 / -1758 (-1183) 66 → 28 (-38) covered statements 1096 -> 1097 (1); branches 751 -> 748 (-3); functions 208 -> 208 (0)
t0427 +546 / -942 (-396) 46 → 43 (-3) statements 4,330 -> 4,316 (-0.32%); branches 3,042 -> 3,022 (-0.66%); functions 889 -> 886
t0424 +747 / -2008 (-1261) 69 → 37 (-32) statements 1,711 -> 1,703 (-0.47%); branches 948 -> 947 (-0.11%)
t0434 +283 / -1007 (-724) 47 → 30 (-17) statements 2,335 -> 2,327 (-0.34%); branches 1,164 -> 1,159 (-0.43%); functions 512 -> 511
t0437 +1622 / -4030 (-2408) 68 → 49 (-19) covered statements 1204 -> 1208 (4); branches 662 -> 658 (-4); functions 204 -> 207 (3)
t0428 +240 / -515 (-275) 15 → 13 (-2) covered statements 3789 -> 3780 (-9); branches 2709 -> 2691 (-18); functions 773 -> 772 (-1)
t0443 +284 / -1175 (-891) 66 → 39 (-27) covered statements 1040 -> 1040 (0); branches 521 -> 520 (-1); functions 115 -> 115 (0)
t0436 +714 / -2101 (-1387) 74 → 39 (-35) 394 -> 393 statements; 355 -> 354 branches; 56 -> 56 functions (-0.25% / -0.28%)
Files touched by shard

t0431

  • test/scripts/pr-operation-lock.test.ts

t0430

  • src/plugins/services.cron.test.ts
  • src/plugins/services.reload.test.ts
  • src/plugins/services.replacement.test.ts
  • src/plugins/services.test.ts

t0415

  • extensions/mattermost/src/mattermost/monitor-helpers.test-support.ts
  • extensions/mattermost/src/mattermost/monitor-onchar.test-support.ts
  • extensions/mattermost/src/mattermost/monitor.authz.test.ts
  • extensions/mattermost/src/mattermost/monitor.block-progress.test-support.ts
  • extensions/mattermost/src/mattermost/monitor.channel-kind.test-support.ts
  • extensions/mattermost/src/mattermost/monitor.inbound-system-event.test.ts
  • extensions/mattermost/src/mattermost/monitor.preview-delivery.test-support.ts
  • extensions/mattermost/src/mattermost/monitor.preview-policy.test-support.ts
  • extensions/mattermost/src/mattermost/monitor.reaction-thread-session.test.ts
  • extensions/mattermost/src/mattermost/monitor.test.ts

t0427

  • extensions/telegram/src/bot-message-dispatch.directive-delivery.test.ts
  • extensions/telegram/src/bot-message-dispatch.draft-finalization.test.ts
  • extensions/telegram/src/bot-message-dispatch.final-delivery-lifecycle.test.ts
  • extensions/telegram/src/bot-message-dispatch.native-question.test.ts
  • extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.progress-card.test.ts
  • extensions/telegram/src/bot-message-dispatch.progress-command-detail.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.progress-lifecycle.telegram-http.test.ts

t0424

  • src/process/supervisor/adapters/child.events.test.ts
  • src/process/supervisor/adapters/child.secret-abort.test.ts
  • src/process/supervisor/adapters/child.service-lifecycle.test.ts
  • src/process/supervisor/adapters/child.test.ts

t0434

  • src/state/user-profiles.owner.test.ts
  • src/state/user-profiles.test.ts

t0437

  • extensions/voice-call/src/webhook/realtime-handler.admission.test.ts
  • extensions/voice-call/src/webhook/realtime-handler.delegation.test.ts
  • extensions/voice-call/src/webhook/realtime-handler.lifecycle.test-helpers.ts
  • extensions/voice-call/src/webhook/realtime-handler.lifecycle.test.ts
  • extensions/voice-call/src/webhook/realtime-handler.persistence.test.ts
  • extensions/voice-call/src/webhook/realtime-handler.test.ts
  • extensions/voice-call/src/webhook/realtime-handler.upgrade.test.ts
  • scripts/lib/ci-proof-test-inventory.mts

t0428

  • extensions/telegram/src/bot-message-dispatch.recovery.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.reply-targets.telegram-http.test.ts

t0443

  • src/gateway/server-node-events.test.ts

t0436

  • config/max-lines-baseline.txt
  • src/agents/tool-loop-detection.test.ts

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: voice-call Channel integration: voice-call gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL labels Sep 30, 2026
@steipete
steipete enabled auto-merge (squash) September 30, 2026 23:25
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 30, 2026, 7:30 PM ET / 23:30 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 180b2da211ecb6aa54e63a3fa6949e8eae01448f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The test consolidation retains sampled owner-boundary checks and has no concrete patch defect; its broad scope keeps the rating at the normal good tier.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The introduced branch changes test suites and their selection, with no production behavior to demonstrate; the supplied Repository State identifies a MEMBER-authored PR. Its historical Testbox workflow was cancelled, and exact-head CI remains the ordinary validation gate. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The introduced branch changes test suites and their selection, with no production behavior to demonstrate; the supplied Repository State identifies a MEMBER-authored PR. Its historical Testbox workflow was cancelled, and exact-head CI remains the ordinary validation gate. No stored-data contract changes.
Evidence reviewed 7 items Introduced scope: The introduced change touches tests, test support, a max-lines baseline, and a protected-test inventory; it changes no production runtime file.
Still absent from main: Current main retains the separate plugin-service replacement and voice-call persistence and upgrade suites removed by this branch. The verified test merge applies this PR's test changes on top of that main parent.
Voice-call retention: The retained lifecycle suite includes the concurrent-admission, consult-delegation, transcript event-ID, and shutdown-durability cases moved from deleted files.
Findings None None.
Security None None.

How this fits together

These 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]
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Tests -10480, Other -2. Total -10482 across 42 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 40 6171 16651 -10480
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 0 2 -2
Total 42 6171 16653 -10482

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no introduced production runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The introduced branch changes test suites and their selection, with no production behavior to demonstrate; the supplied Repository State identifies a MEMBER-authored PR. Its historical Testbox workflow was cancelled, and exact-head CI remains the ordinary validation gate. No stored-data contract changes.

Label justifications:

  • P3: This is test-maintenance cleanup with no introduced production runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The introduced branch changes test suites and their selection, with no production behavior to demonstrate; the supplied Repository State identifies a MEMBER-authored PR. Its historical Testbox workflow was cancelled, and exact-head CI remains the ordinary validation gate. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit dac3c15 into main Sep 30, 2026
187 of 193 checks passed
@steipete
steipete deleted the tcr/land-d119-1790805296 branch September 30, 2026 23:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
)

* 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
mnowrot added a commit to mnowrot/openclaw that referenced this pull request Oct 4, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: voice-call Channel integration: voice-call gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant