Skip to content

test(core,plugins,scripts): remove low-value tests (batch d206) - #165097

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d206-1791142511
Oct 4, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d206-1791142511

Conversation

@steipete

@steipete steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d206 removes duplicated, implementation-mirroring, and ineffective test cases from ten audited campaign shards, and consolidates retained cases into existing fixtures.

User Impact

There is no production behavior change. This is test-only maintenance: current replay changes 79 files, with test LOC +2,895/-7,245 (net -4,350), test support/routing/ratchets +0/-43, and production LOC +0/-0. Distinct security, authority, cancellation, recovery, and output assertions remain.

Why This Change Was Made

Repeated test variants and redundant fixtures add maintenance and execution cost without independently protecting behavior. All ten supplied commits replayed in order onto main at 327dc38. No commits or hunks were skipped, and no manual conflicts required resolution. Git automatically reconciled the current dynamic-tool-build test; current-main additions are retained.

The historical shard reports describe 136 fewer declarations (2,434 to 2,298) and 274 fewer executed cases (3,739 to 3,465). None reached the aspirational 30% declaration reduction because further candidates protected distinct contracts. Those counts and coverage measurements are in-shard evidence, not a new combined coverage run on this PR.

The replay also prunes two obsolete first-party mock-export baseline entries for the deleted MSteams graph.timeout.test.ts, using the repository prune tool. The first remote changed-file gate caught these stale entries; its final-head rerun is recorded below.

No changed paths match the current CODEOWNERS rules.

Per-shard scope and historical coverage evidence

Coverage columns report covered counts, not percentages. The w0011 snapshot predates restoration of its existing Graph mock helper: its final coverage and changed-check reruns were blocked by lease shutdown/queueing, although its final 229 tests passed. This limitation is preserved here rather than treating that snapshot as final-revision coverage.

Shard Test LOC before → after Declarations before → after Covered statements; branches; functions
w0010 7,993 → 7,827 (-166) 194 → 189 (-5) 4429 → 4420 (-9); 3228 → 3217 (-11); 914 → 911 (-3)
w0003 11,519 → 11,160 (-359) 249 → 233 (-16) 6310 → 6299 (-11); 4738 → 4726 (-12); 1152 → 1152 (0)
w0001 14,373 → 13,955 (-418) 310 → 298 (-12) 16000 → 16000 (0); 11108 → 11107 (-1); 2803 → 2803 (0)
w0002 13,079 → 12,740 (-339) 268 → 257 (-11) 10221 → 10161 (-60); 6491 → 6429 (-62); 1856 → 1841 (-15)
w0007 6,035 → 5,875 (-160) 199 → 187 (-12) 3497 → 3497 (0); 2364 → 2364 (0); 733 → 733 (0)
w0011 6,566 → 5,968 (-598) 191 → 177 (-14) Pre-final: 1976 → 1961 (-15); 1415 → 1415 (0)
w0005 10,899 → 10,288 (-611) 225 → 208 (-17) 8429 → 8415 (-14); 5396 → 5368 (-28); 1611 → 1607 (-4)
w0006 11,041 → 9,967 (-1,074) 211 → 188 (-23) 3708 → 3703 (-5); 2606 → 2599 (-7); 761 → 760 (-1)
w0013 9,540 → 9,158 (-382) 190 → 175 (-15) 10796 → 10768 (-28); 8731 → 8701 (-30); 2361 → 2351 (-10)
x0001 22,774 → 22,531 (-243) 397 → 386 (-11) 1826 → 1826 (0); 1350 → 1350 (0); 352 → 352 (0)

w0010 files:

  • extensions/discord/src/monitor/message-handler.process.ack.test.ts
  • extensions/discord/src/monitor/message-handler.process.draft-final.test.ts
  • extensions/discord/src/monitor/message-handler.process.draft-progress.test.ts
  • extensions/discord/src/monitor/message-handler.process.session-routing.test.ts
  • extensions/discord/src/monitor/native-command.commands-allowfrom.test.ts
  • extensions/discord/src/monitor/native-command.model-picker.test.ts
  • extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts
  • extensions/discord/src/monitor/native-command.test-helpers.ts
  • extensions/discord/src/monitor/provider.rest-proxy.test.ts

w0003 files:

  • src/gateway/client.device-auth.test.ts
  • src/gateway/client.test.ts
  • src/gateway/control-ui.http.test.ts
  • src/gateway/exec-approval-manager.expiry.test.ts
  • src/gateway/exec-approval-manager.test.ts
  • src/gateway/server-restart-sentinel.system-event-owner.test.ts
  • src/gateway/server-restart-sentinel.test.ts

w0001 files:

  • src/agents/agent-command.live-model-switch.test.ts
  • src/agents/agent-tools.before-tool-call.e2e.test.ts
  • src/agents/agent-tools.before-tool-call.integration.e2e.test.ts

w0002 files:

  • src/agents/bash-tools.exec-host-node.cancellation.test.ts
  • src/agents/bash-tools.exec-host-node.integration.test.ts
  • src/agents/bash-tools.exec-host-node.test.ts
  • src/agents/tool-search.test.ts

w0007 files:

  • src/cli/program.force.test.ts
  • src/cli/program.nodes-basic.e2e.test.ts
  • src/cli/program.nodes-diagnostics-auth.e2e.test.ts
  • src/cli/program.nodes-media.e2e.test.ts
  • src/cli/program.nodes-push.e2e.test.ts
  • src/cli/program.smoke.test.ts
  • src/cli/run-main.command-dispatch.test.ts
  • src/cli/run-main.exit.test.ts
  • src/cli/run-main.gateway-startup.test.ts
  • src/cli/run-main.import-boundary.test.ts
  • src/cli/run-main.profile-env.test.ts
  • src/cli/run-main.test-support.ts
  • src/cli/run-main.test.ts

w0011 files:

  • extensions/msteams/src/attachments.graph.test.ts
  • extensions/msteams/src/attachments.helpers.test.ts
  • extensions/msteams/src/attachments.test-helpers.ts
  • extensions/msteams/src/attachments.test.ts
  • extensions/msteams/src/channel.directory.test.ts
  • extensions/msteams/src/channel.test.ts
  • extensions/msteams/src/graph-messages.actions.test.ts
  • extensions/msteams/src/graph-messages.read.test.ts
  • extensions/msteams/src/graph-messages.search.test.ts
  • extensions/msteams/src/graph.test.ts
  • extensions/msteams/src/graph.timeout.test.ts
  • extensions/msteams/src/send.test.ts
  • extensions/msteams/src/send.threaded-attachments.test.ts

w0005 files:

  • src/infra/outbound/message-action-params.attachments.test.ts
  • src/infra/outbound/message-action-params.media-access.test.ts
  • src/infra/outbound/message-action-params.test.ts
  • src/infra/outbound/message-action-send.core.test.ts
  • src/infra/outbound/message-action-send.media.test.ts
  • src/infra/outbound/message-action-send.test.ts
  • src/infra/outbound/message-action-send.validation.test.ts

w0006 files:

  • extensions/codex/src/app-server/dynamic-tool-build.memory-audience.test.ts
  • extensions/codex/src/app-server/dynamic-tool-build.prompt.test.ts
  • extensions/codex/src/app-server/dynamic-tool-build.sandbox.test.ts
  • extensions/codex/src/app-server/dynamic-tool-build.test.ts
  • extensions/codex/src/app-server/inference-proxy.capacity.test.ts
  • extensions/codex/src/app-server/inference-proxy.test.ts
  • extensions/codex/src/app-server/plugin-thread-config.missing-plugins.test.ts
  • extensions/codex/src/app-server/plugin-thread-config.native-approval.test.ts
  • extensions/codex/src/app-server/plugin-thread-config.test.ts
  • extensions/codex/src/app-server/session-binding.codec.test.ts
  • extensions/codex/src/app-server/session-binding.reads.test.ts
  • extensions/codex/src/app-server/session-binding.test.ts
  • test/vitest/vitest.extension-database-workers-paths.mjs

w0013 files:

  • src/plugins/management-service.policy-imports.test.ts
  • src/plugins/provider-runtime.test.ts

x0001 files:

  • test/scripts/openclaw-performance-workflow.test.ts
  • test/scripts/openclaw-release-ready.test.ts
  • test/scripts/output-root-guard.test.ts
  • test/scripts/package-acceptance-workflow.test.ts
  • test/scripts/package-changelog.test.ts
  • test/scripts/package-compat.test.ts
  • test/scripts/package-docs-map.test.ts

Evidence

Isolated autoreview raised three P2 coverage concerns; all were checked and rejected against retained tests and production control flow:

  • Hook exceptions/preflight errors remain covered in the terminal-diagnostic cases in agent-tools.before-tool-call.e2e.test.ts (including zero underlying executions), plus the real throwing-hook integration test.
  • The removed Discord wildcard case used a guild/channel configuration that did not match its interaction. It exited with channel-not-allowed before owner authorization, so it could not detect the claimed regression. monitor.test.ts still directly rejects wildcard-only owner access; native-command.guild-guards.test.ts still proves blocked-channel admission.
  • Reply hydration and path-policy enforcement remain covered through runMessageAction in message-action-params.attachments.test.ts, including waiting for hydration before dispatch and denying real paths outside mediaLocalRoots before invoking the reply handler.

Fresh batch validation:

  • Frozen dependency installation, oxfmt over all surviving changed code files, git diff --check, and plain oxlint over all changed TS/JS files passed.
  • Blacksmith Testbox focused command: CI=1 pnpm install --frozen-lockfile --prefer-offline, then CI=1 pnpm test with every surviving changed test file (59 files). All 11 selected Vitest shards passed, exit 0; the test command reported 957.57 seconds including its required runtime build. Run 37229120586, lease tbx_01m446vkhkamterge08n0xbw4n, stopped after completion. A post-success portal-sync warning did not change the successful wrapper and completion receipts.
  • That focused proof ran at af2766e. The follow-up commit only removes the two obsolete mock-baseline records; all tested source bytes are unchanged. Its separate isolated review was scoped-clean.
  • Initial remote changed-file gate caught the two stale baseline records; they were regenerated with check-test-mock-exports.mts --prune (10,800 to 10,798 exact factories). Initial gate run 37230215598, lease tbx_01m447vrayrfya3djxh7njrct7, stopped automatically.
  • Final-head changed-file rerun: OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 79 changed paths>. At publication it is blocked on Testbox allocation after source preparation, lease tbx_01m449gyng785px9rn6wf1x6h2. This is an infrastructure gap, not a passing check. The previously observed stale-baseline failure was repaired by the exact generated shrink and independently reviewed. Hosted openclaw/ci-gate remains the merge gate; the final remote rerun continues in parallel.

@clawsweeper

clawsweeper Bot commented Oct 4, 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.

@steipete
steipete enabled auto-merge (squash) October 4, 2026 20:32
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: msteams Channel integration: msteams gateway Gateway runtime cli CLI command changes agents Agent runtime and tooling extensions: codex size: XL labels Oct 4, 2026
@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 Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 4, 2026, 4:38 PM ET / 20:38 UTC.

ClawSweeper review

What this changes

The PR removes redundant test cases and consolidates retained coverage into shared suites across agents, channels, Gateway, CLI, plugins, and release tooling.

Merge readiness

✅ Ready for maintainer review

Keep open: this is useful test maintenance that remains distinct from current main. No concrete introduced correctness defect was found, and the author's verified repository admin role rules out automatic cleanup closure.

Priority: P3
Reviewed head: d2780f5bbd89fdceb15d60046a88ae69a70bd71e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent maintenance patch with retained boundary coverage and no actionable introduced defect; reported test validation has clearly recorded limits.
Proof confidence 🌊 off-meta tidepool Not applicable: Verified repository-admin authorship exempts this test-only maintenance from contributor runtime proof. The reported focused test run is supplemental validation, not live product proof; no stored-data model changes require upgrade proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Verified repository-admin authorship exempts this test-only maintenance from contributor runtime proof. The reported focused test run is supplemental validation, not live product proof; no stored-data model changes require upgrade proof.
Evidence reviewed 11 items Pinned introduced scope: The merge-base-to-head delta changes tests, test helpers, database-worker test routing, and two mock-baseline records; no production implementation, dependency manifest, or workflow is changed.
Verified merge context: The test merge records exactly fetched main followed by the pinned PR head. Its changed-path list contains the test-maintenance surface, so unrelated endpoint drift is not attributed to this PR.
Retained hook failure coverage: Retained terminal-diagnostic cases exercise hook exceptions and preflight failures, assert zero underlying executions, and check failure diagnostics; the production policy owner catches those failures and returns a blocked outcome.
Findings None None.
Security None None.

How this fits together

OpenClaw's test suites feed simulated commands, messages, and failures through product owners and check their outputs. This change reorganizes that regression coverage and its runner routing without changing production behavior.

flowchart LR
  A[Product contracts] --> B[Shared test fixtures]
  B --> C[Retained regression cases]
  C --> D[Vitest runner routing]
  D --> E[Assertions and CI results]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -4391, Other -2. Total -4393 across 79 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 78 2915 7306 -4391
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 79 2915 7308 -4393

Review metrics

None.

Technical review

Best possible solution:

Maintain one strong test owner for each distinct contract while removing ineffective controls and repeated fixtures.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR proposes test maintenance rather than a product bug fix; source inspection confirms the production implementation is unchanged.

Is this the best way to solve the issue?

Yes: consolidating retained cases into existing fixtures is consistent with the repository's test-value guidance, and the documented coverage objections have matching retained boundary tests.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ae4ebd2c9d2c.

Labels

Label changes:

  • add P3: This is test-suite maintenance with no introduced production behavior change or urgent user-facing regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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: Verified repository-admin authorship exempts this test-only maintenance from contributor runtime proof. The reported focused test run is supplemental validation, not live product proof; no stored-data model changes require upgrade proof.

Label justifications:

  • P3: This is test-suite maintenance with no introduced production behavior change or urgent user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Verified repository-admin authorship exempts this test-only maintenance from contributor runtime proof. The reported focused test run is supplemental validation, not live product proof; no stored-data model changes require upgrade proof.

Evidence

What I checked:

  • Pinned introduced scope: The merge-base-to-head delta changes tests, test helpers, database-worker test routing, and two mock-baseline records; no production implementation, dependency manifest, or workflow is changed. (d2780f5bbd89)
  • Verified merge context: The test merge records exactly fetched main followed by the pinned PR head. Its changed-path list contains the test-maintenance surface, so unrelated endpoint drift is not attributed to this PR. (271c0e5d1372)
  • Retained hook failure coverage: Retained terminal-diagnostic cases exercise hook exceptions and preflight failures, assert zero underlying executions, and check failure diagnostics; the production policy owner catches those failures and returns a blocked outcome. (src/agents/agent-tools.before-tool-call.e2e.test.ts:1139, d2780f5bbd89)
  • Retained media security boundary: The runner-level reply tests still await hydration before dispatch and use the real media loader to reject paths outside mediaLocalRoots before invoking the reply handler. (src/infra/outbound/message-action-params.attachments.test.ts:805, d2780f5bbd89)
  • Discarded ineffective Discord negative control: The removed wildcard case asserted channel-not-allowed rather than owner denial. The retained owner-access test directly verifies that a wildcard-only DM allowlist does not confer owner access. (extensions/discord/src/monitor.test.ts:216, d2780f5bbd89)
  • Validation identity and limitations: The captured PR body reports 59 surviving test files passing in 11 shards at af2766e. Comparing that revision with the final head confirms only the two obsolete mock-baseline records changed. The linked Testbox workflow is cancelled; its raw logs were unavailable because the artifact host was blocked, so the reported command success was not independently verified. No tests were executed during this read-only review. (config/test-mock-exports-baseline.txt:1228, d2780f5bbd89)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: 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 a406897 into main Oct 4, 2026
153 of 158 checks passed
@steipete
steipete deleted the tcr/land-d206-1791142511 branch October 4, 2026 20:42
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…claw#165097)

* test(discord): deslop w0010 tests

* test(gateway): deslop w0003 tests

* test(agents): deslop w0001 tests

* test(agents): deslop w0002 tests

* test(cli): deslop w0007 tests

* test(msteams): deslop w0011 tests

* test(outbound): deslop w0005 tests

* test(codex): deslop w0006 tests

* test(plugins): deslop w0013 tests

* test(scripts): deslop x0001 tests

* test(msteams): prune removed mock baseline entries
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: discord Channel integration: discord channel: msteams Channel integration: msteams cli CLI command changes extensions: codex 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. 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