Skip to content

test(core,plugins,ci): remove low-value tests (batch d096) - #161092

Merged
steipete merged 12 commits into
mainfrom
tcr/land-d096-1790664620
Sep 29, 2026
Merged

steipete merged 12 commits into
mainfrom
tcr/land-d096-1790664620

Conversation

@steipete

@steipete steipete commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d096 removes repeated test matrices, forwarding/default replays, source inventories, and redundant fixture setup that increase maintenance without adding distinct behavioral proof.

User Impact

No production behavior changes. Authorization, lifecycle, redaction, cleanup, and historical regression boundaries remain covered. Existing test file identities and CI routing are retained.

Why This Change Was Made

Replayed all ten campaign commits onto main, then rebased without conflicts onto cec7fe73dc4b573f1f35aa326e036a3c2b44b7b9. The rebase preserved every patch and includes main's release-fixture type repair 64ef24b267b. A final GitHub rebase also includes main's SDK-budget fix a49e76e1862 and release-timeout test fix c7e89bc6a96.

The initial replay had one conflict in src/commands/channels.add.test.ts: kept setupChannels.mockReset() and its default implementation to isolate one-shot responses; vi.clearAllMocks() already clears the redundant call histories. All ten commits remain applied. Review restored distinct regression cases removed by the initial reduction. Seven whole-file deletions and three routing-entry deletions were subsequently dropped to retain CI timing-selector identities; the hourly planner passes on both plain main and the final candidate. No CODEOWNERS patterns match the final changed files.

Evidence

  • Final Blacksmith Testbox focused run: 1,229 tests passed across 48 files and 11 Vitest groups; wrapper exit 0.
  • Full rebased check:changed passed: all selected types, typed lint, formatting, dead-export checks, and repository guards. Local plain oxlint and whitespace checks also passed.
  • Testbox evidence: lease tbx_01m3p6agyk06yj7rymdqf24ap0, verified source tree f19caf6a564155a5acbc116efeb86ab0bfa18717. Lease cleanup may mark the workflow cancelled; delegated command exit codes are the proof.
  • A clean detached plain-main comparison at the base SHA reproduced five existing failures: three package-release timeout assertions and two SDK surface-budget assertions. The baseline had 572 passes / 5 failures; the candidate comparison reproduced exactly those failures with 718 passes. Neither the failing files nor the code they exercise is changed by this batch. Main subsequently fixed all five assertions in a49e76e1862 and c7e89bc6a96; the final GitHub rebase includes those fixes. The hourly planner passed both comparisons. Fresh hosted CI on the new head owns final merge admission.
  • Initial full-batch review raised 17 findings; distinct regression coverage was restored. Final remediation and file-identity reviews are scoped-clean through P2. The live-foreign-owner portion was already covered by the retained expiry fixture; that duplicate restoration was rejected, while EPERM retention was added there.
  • Earlier validation found and repaired an unused queued Discord emoji-list response and a stale relay generation assertion. The relay test now compares the successor's distinct supported runId; the throwing-retention fixture uses admitted host authority and verifies predicate invocation. An earlier Testbox lease disconnected before finishing its gate; the subsequent full gate above closes that gap.
Review resolutions

The initial full-batch review raised 17 findings. Each was resolved by restoring distinct authorization, concurrency, cleanup, provenance, sanitization, or action-identity coverage. The live foreign-owner portion was already protected by the retained expiry test; that duplicate restoration was rejected, and EPERM preservation was added to the same fixture. Follow-up review of the complete remediation patch was scoped-clean through P2, exit 0.

Restored boundaries: MCP tool/server approval isolation; delegated Discord GroupDM and caller-supplied guild mismatch; concurrent Twilio joins; finalized transcript versus active-read overlap; shared-tab adoption versus leave; paired-node realtime audio and remote cleanup on failures; recognized source-reply media/transport fields; denied sandbox bridge reads; fail-closed retention predicates; permission-protected foreign bridge owners; deferred queue provenance; untrusted gateway.env destructive overrides; normalized credential replacement; awaited asynchronous CLI disposal; exact write-token action identity; config-only terminal sanitization; and unknown-account disable rejection.

Focused current-main testing exposed a queued Discord channel-metadata mock leaking out of an explicit-guild emoji-list case into the subsequent allowlisted channel-info test. The fixture now queues metadata only when that table row actually resolves a channel, matching the previously proven campaign fixture fix. Assertions and production code are unchanged.

Scope and original shard evidence

Final diff: production +0/−0; test/support +6,461/−31,762 (net −25,301); tooling +0/−0. Counts are final changed-file LOC and static it/test declarations, not expanded parameterized case counts.

Shard Test/support LOC Test declarations Original in-shard covered totals
t0169 7,969 → 5,319 (-2,650) 151 → 85 (-66) statements 6,514 → 6,511 (−3); branches 4,047 → 4,038 (−9); functions 980 → 979 (−1)
t0170 3,856 → 2,590 (-1,266) 141 → 82 (-59) statements 1,638 → 1,637 (−1); branches 1,151 → 1,146 (−5); functions 277 → 277 (0)
t0116 5,949 → 3,750 (-2,199) 214 → 111 (-103) statements 2,145 → 2,135 (−10); branches 1,437 → 1,426 (−11); functions 440 → 435 (−5)
t0167 4,959 → 2,613 (-2,346) 149 → 86 (-63) statements 945 → 945 (0); branches 556 → 555 (−1); functions 233 → 233 (0)
t0173 13,326 → 7,413 (-5,913) 151 → 87 (-64) statements 1,121 → 1,120 (−1); branches 688 → 688 (0); functions 253 → 253 (0); intermediate snapshot, before final five case removals
t0168 3,249 → 2,040 (-1,209) 114 → 74 (-40) statements 2,724 → 2,712 (−12); branches 1,702 → 1,687 (−15); functions 590 → 588 (−2)
t0174 6,410 → 4,124 (-2,286) 144 → 87 (-57) statements 1,215 → 1,212 (−3); branches 837 → 829 (−8); functions 222 → 222 (0)
t0180 5,756 → 4,392 (-1,364) 131 → 97 (-34) statements 4,077 → 4,075 (−2); branches 1,574 → 1,570 (−4); functions 476 → 475 (−1); supplemental coordinator completion
t0164 6,511 → 3,214 (-3,297) 147 → 70 (-77) statements 1,702 → 1,701 (−1); branches 1,155 → 1,153 (−2); functions 332 → 332 (0)
t0166 6,975 → 4,204 (-2,771) 141 → 86 (-55) statements 1,278 → 1,268 (−10); branches 973 → 965 (−8); functions 306 → 305 (−1)

Coverage totals are original shard evidence, not a new coverage measurement on this rebased branch. Each completed comparison met the 1% statement/branch budget. t0173 coverage predates its final five case removals because the final refresh failed on infrastructure. Supplemental remote coverage supersedes t0180’s stale blocked report. t0168 lost six covered statements in cli.runtime.ts; t0166 lost eight in node-host.ts, with stronger retained owner proof and its original registration-only group excluded. Seven deleted files are now retained unchanged. Several shards missed the aspirational 50% reduction target; no additional contracts were removed to reach a quota.

Final files touched by shard

t0169

  • src/agents/tools/message-tool.clawhub.integration.test.ts
  • src/agents/tools/message-tool.hosted-transport.test.ts
  • src/agents/tools/message-tool.internal-source-reply.integration.test.ts
  • src/agents/tools/message-tool.sandbox-attachments.test.ts
  • src/agents/tools/message-tool.scheduled-lifetime.test.ts
  • src/agents/tools/message-tool.scheduled-writes.test.ts
  • src/agents/tools/message-tool.test.ts

t0170

  • extensions/discord/src/actions/runtime.moderation.authz.test.ts
  • extensions/discord/src/actions/runtime.presence.test.ts
  • extensions/discord/src/actions/runtime.test.ts

t0116

  • src/cli/run-main.bare-root.test-support.ts
  • src/cli/run-main.cleanup.test.ts
  • src/cli/run-main.exit.test.ts
  • src/cli/run-main.profile-env.test.ts
  • src/cli/run-main.proxy-exit.test-support.ts
  • src/cli/run-main.test.ts

t0167

  • src/cli/capability-cli.help.test.ts
  • src/cli/capability-cli.lazy.test.ts
  • src/cli/capability-cli.test.ts

t0173

  • test/scripts/ci-workflow-guards.test.ts

t0168

  • extensions/qa-lab/src/cli.runtime.test.ts

t0174

  • src/commands/channels.add.test.ts
  • src/commands/channels.adds-non-default-telegram-account.test.ts
  • src/commands/channels.config-only-status-output.test.ts
  • src/commands/channels.list.inventory.test.ts
  • src/commands/channels.list.test.ts
  • src/commands/channels.logs.test.ts
  • src/commands/channels.remove.test.ts
  • src/commands/channels.resolve.test.ts
  • src/commands/channels.status.command-flow.test.ts
  • src/commands/channels.surfaces-signal-runtime-errors-channels-status-output.test.ts

t0180

  • src/agents/harness/native-hook-relay.approval-wait.test.ts
  • src/agents/harness/native-hook-relay.lifecycle.test.ts
  • src/agents/harness/native-hook-relay.test.ts

t0164

  • src/auto-reply/reply/queue.authority.test.ts
  • src/auto-reply/reply/queue.case.test-support.ts
  • src/auto-reply/reply/queue.collect.test.ts
  • src/auto-reply/reply/queue.dedupe.test.ts
  • src/auto-reply/reply/queue.drain-restart.test.ts
  • src/auto-reply/reply/queue.in-flight.test.ts
  • src/auto-reply/reply/queue.media-carrier.test.ts
  • src/auto-reply/reply/queue.personal-bootstrap-overflow.test.ts
  • src/auto-reply/reply/queue.personal-bootstrap.test.ts

t0166

  • extensions/google-meet/index.test.ts

@clawsweeper

clawsweeper Bot commented Sep 29, 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: discord Channel integration: discord cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: qa-lab plugin: google-meet size: XL labels Sep 29, 2026
@steipete
steipete enabled auto-merge (squash) September 29, 2026 08:41
@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 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 29, 2026, 6:35 AM ET / 10:35 UTC (Revision 2).

ClawSweeper review

What this changes

The branch consolidates and removes tests across agent messaging, reply queues, plugins, CLI commands, and CI guards while retaining test file identities.

Merge readiness

⛔ Blocked before merge - 5 items remain

This is a coherent test cleanup, but three removed cases leave distinct ClawHub card, catalog-outage, and managed-media behaviors without direct regression coverage.

Priority: P3
Reviewed head: 33599d67461567e7f3cf19487c8b100221ac3ea5

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused validation supports a substantial cleanup, but three distinct removed boundary checks limit confidence in the patch.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The supplied Repository State classifies this as a member-authored, test-only cleanup, so contributor real-behavior proof is not required; the reported focused Testbox run is supplemental validation. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied Repository State classifies this as a member-authored, test-only cleanup, so contributor real-behavior proof is not required; the reported focused Testbox run is supplemental validation. No stored-data contract changes.
Evidence reviewed 10 items Introduced card coverage deletion: The pinned PR diff removes the installed/uninstalled official plugin card case, including its single persisted transcript and display-content assertions.
Current main retains card and outage cases: Current main still has both the official card persistence case and the unavailable-catalog retry case; neither appears in the proposed suite.
Card persistence boundary: The production transcript writer reads recommendation cards from reply channel data and places them in display content before appending the assistant message.
Findings 3 actionable findings [P2] Restore one official plugin card persistence check
[P2] Keep the catalog-unavailable reply check
[P2] Retain managed-artifact delivery with a remote bridge
Security None None.

How this fits together

The agent message tool turns catalog results and media references into replies. Those replies reach either the Control UI transcript or a channel attachment, and the changed tests check those boundaries.

flowchart LR
A[Test runner] --> B[Regression suites]
C[Catalog results] --> D[Message tool]
E[Workspace media] --> D
B -. verifies .-> D
D --> F{Reply route}
F --> G[Control UI transcript]
F --> H[Channel attachment]
Loading

Before merge

  • Restore one official plugin card persistence check (P2) - Deleting this case removes the only test that sends an official plugin recommendation through the message tool and verifies its installed state, durable display card, and single transcript entry. The remaining skill-card test stops at the tool result, while transcript tests do not supply a ClawHub card. A break in this documented Control UI flow could now leave the suite green.
  • Keep the catalog-unavailable reply check (P2) - The removed case exercised a rejected catalog request and required a visible retry instruction instead of a no-match result. The retained no-match case supplies a successful catalog response, so it cannot catch a regression in the outage path described by the Control UI docs.
  • Retain managed-artifact delivery with a remote bridge (P2) - This deletion removes the composed case where a host-managed generated file is sent while the agent workspace uses a remote bridge. The remaining bridge tests read workspace files, and the separate managed-media test never reaches channel delivery; together they cannot catch routing the host artifact through an inaccessible remote reader.
  • Complete next step (P2) - Restore the focused ClawHub and remote managed-media regression checks before merge.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.

Findings

  • [P2] Restore one official plugin card persistence check — src/agents/tools/message-tool.clawhub.integration.test.ts:61
  • [P2] Keep the catalog-unavailable reply check — src/agents/tools/message-tool.clawhub.integration.test.ts:128
  • [P2] Retain managed-artifact delivery with a remote bridge — src/agents/tools/message-tool.sandbox-attachments.test.ts:202
Agent review details

Security

None.

PR surface

Tests -25301. Total -25301 across 44 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 44 6922 32223 -25301
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 44 6922 32223 -25301

Review metrics

None.

Technical review

Best possible solution:

Keep the test reduction while retaining focused checks for card persistence, catalog failure feedback, and managed-artifact delivery through a remote bridge.

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

Not applicable: this PR reports no live bug. The deleted regression cases are directly visible in the pinned source diff.

Is this the best way to solve the issue?

No, not as submitted: the consolidation is useful, but the three distinct boundary checks should remain.

Full review comments:

  • [P2] Restore one official plugin card persistence check — src/agents/tools/message-tool.clawhub.integration.test.ts:61
    Deleting this case removes the only test that sends an official plugin recommendation through the message tool and verifies its installed state, durable display card, and single transcript entry. The remaining skill-card test stops at the tool result, while transcript tests do not supply a ClawHub card. A break in this documented Control UI flow could now leave the suite green.
    Confidence: 0.9
  • [P2] Keep the catalog-unavailable reply check — src/agents/tools/message-tool.clawhub.integration.test.ts:128
    The removed case exercised a rejected catalog request and required a visible retry instruction instead of a no-match result. The retained no-match case supplies a successful catalog response, so it cannot catch a regression in the outage path described by the Control UI docs.
    Confidence: 0.85
  • [P2] Retain managed-artifact delivery with a remote bridge — src/agents/tools/message-tool.sandbox-attachments.test.ts:202
    This deletion removes the composed case where a host-managed generated file is sent while the agent workspace uses a remote bridge. The remaining bridge tests read workspace files, and the separate managed-media test never reaches channel delivery; together they cannot catch routing the host artifact through an inaccessible remote reader.
    Confidence: 0.86

Overall correctness: patch is incorrect
Overall confidence: 0.81

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against be271241b0c0.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The supplied Repository State classifies this as a member-authored, test-only cleanup, so contributor real-behavior proof is not required; the reported focused Testbox run is supplemental validation. No stored-data contract changes.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P3: This is internal test maintenance with no production-code change; the identified coverage losses are bounded.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The supplied Repository State classifies this as a member-authored, test-only cleanup, so contributor real-behavior proof is not required; the reported focused Testbox run is supplemental validation. No stored-data contract changes.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/agents/tools/message-tool.clawhub.integration.test.ts.
  • [P1] node scripts/run-vitest.mjs src/agents/tools/message-tool.sandbox-attachments.test.ts.
  • [P1] node scripts/check-changed.mjs.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SunnyShu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore a focused official plugin card and catalog-outage check at the message-tool boundary.
  • Restore one managed host artifact send using the remote workspace bridge.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-29T08:47:41.235Z sha 9e3e23f :: needs maintainer review before merge. :: none

@steipete
steipete disabled auto-merge September 29, 2026 08:49
@steipete
steipete force-pushed the tcr/land-d096-1790664620 branch from 9e3e23f to 574442a Compare September 29, 2026 10:19
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Sep 29, 2026
@steipete
steipete enabled auto-merge (squash) September 29, 2026 10:20
Restore distinct authorization, concurrency, provenance, sanitization, and cleanup regression cases identified in review. Keep retained relay assertions on the current registration contract and ensure the throwing-retention fixture actually reaches its predicate. Fix an unused Discord emoji-list mock response exposed by the reduced execution order.
Keep the seven original test files and their three routing entries while retaining the in-file case reductions. The hourly planner derives timing selectors from tracked test paths; preserve those identities instead of changing its cap. Plain-main and candidate planner checks pass, and the full changed-file gate plus 48-file focused run pass.
@steipete
steipete force-pushed the tcr/land-d096-1790664620 branch from 574442a to 33599d6 Compare September 29, 2026 10:25
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 29, 2026
@steipete
steipete merged commit e18311d into main Sep 29, 2026
151 checks passed
@steipete
steipete deleted the tcr/land-d096-1790664620 branch September 29, 2026 10:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 30, 2026
…161092)

* test(agents): deslop t0169 tests

* test(discord): deslop t0170 tests

* test(cli): deslop t0116 tests

* test(cli): deslop t0167 tests

* test(ci): deslop t0173 tests

* test(qa-lab): deslop t0168 tests

* test(channels): deslop t0174 tests

* test(agents): deslop t0180 tests

* test(auto-reply): deslop t0164 tests

* test(google-meet): deslop t0166 tests

* test: preserve boundary coverage in d096

Restore distinct authorization, concurrency, provenance, sanitization, and cleanup regression cases identified in review. Keep retained relay assertions on the current registration contract and ensure the throwing-retention fixture actually reaches its predicate. Fix an unused Discord emoji-list mock response exposed by the reduced execution order.

* test: retain d096 file identities for CI routing

Keep the seven original test files and their three routing entries while retaining the in-file case reductions. The hourly planner derives timing selectors from tracked test paths; preserve those identities instead of changing its cap. Plain-main and candidate planner checks pass, and the full changed-file gate plus 48-file focused run pass.
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 cli CLI command changes commands Command implementations extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: google-meet rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant