Skip to content

test(core,plugins,ui): remove low-value tests (batch d024) - #158907

Merged
steipete merged 9 commits into
mainfrom
tcr/land-d024-1790419972
Sep 26, 2026
Merged

steipete merged 9 commits into
mainfrom
tcr/land-d024-1790419972

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated test cases and duplicated fixtures increase maintenance and CI work without adding independent behavior coverage across the selected core and plugin suites.

User Impact

No production behavior, public API, configuration, storage, or dependency changes. This batch changes only tests and preserves the stronger owner-boundary regressions.

Why This Change Was Made

Replay the validated portions of campaign batch d024 onto current main, consolidating fixtures and removing duplicate cases. The final diff contains 82 test files: +1,951/-7,020 lines (net -5,069), with 1,174 -> 1,032 test declarations (net -142). Production and separate test-support LOC are both +0/-0. Parameterized declarations count once here; these are not executed-case counts.

Gateway shard s169 (119bce0100d) is intentionally omitted: its report records a passing baseline but two after-runs with 393 passed/1 failed, and explicitly marks the coverage comparison invalid because all 51 files were excluded. No Gateway cleanup is included in this PR.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline, targeted oxfmt, and git diff --check: passed.
  • Blacksmith Testbox tbx_01m3eqk8fjrfhr2bagxnk4zpvy: CI=1 pnpm test <82 changed paths> passed 1,509 tests across 83 routed files; 10 Vitest shards in 182.52s. Native command and wrapper exits were both 0. A portal-sync timeout was reported after the successful command.
  • CI=1 OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <82 changed paths> passed all early guards, formatting, UI catalog verification, and all 25 core-test type shards. It then caught a missing RuntimeEnv type import in the Buzz fixture consolidation. The existing import was restored.
  • Fresh Blacksmith Testbox tbx_01m3ew5fkff6ysm5ms2rm1sqfm, corrected head 6a073955368d6c915bbbe617079fcdf44f96c858: the affected Buzz setup suite passed all 19 cases. Resumed the exact remaining commands from the check-changed plan: pnpm tsgo:extensions:test, coercion/deprecated-API guards, all three dead-export scans (zero entries), and all 82 files' core/plugin lint batches. All passed; remote exit 0. The earlier passing core checks were reused because the only correction is a type-only import in a plugin test.
  • Independent retention reviews checked stronger remaining behavior coverage. Autoreview was scoped-clean at P0 with no findings; the sole subsequent edit restores the baseline type-only import described above.

The coverage figures below are the original in-shard comparisons, not newly measured current-main coverage. The replay receives fresh focused Testbox tests and changed-file gates. Independent autoreview against the pinned base completed scoped-clean at the default P0 threshold; no findings were accepted or rejected. The only later adjustment restores an existing type-only import identified by the extension type check. GitHub's required openclaw/ci-gate remains the merge gate.

No changed path matches .github/CODEOWNERS at the reviewed base.

Replay decisions and preserved current-main behavior
  • Trajectory: kept extracted transcript fixtures, async database cleanup, new SQLite and read-evidence regressions, and main's existing recorder helper. Applied the remaining fixture and duplicate-case reductions.
  • Hooks: kept current-main archive installation fixtures by dropping the conflicting install.test.ts hunk; kept newer hook dispatch tests and existing transcript fixture extraction.
  • Worker: kept launcher arguments and shell isolation, exec authority, cancellation/replay coverage, all six IPC lineage-validation cases, and imports required by newer tests.
  • OpenShell: kept extracted filesystem fixtures and tests, new invalid-environment and filesystem security coverage, and current fixture signatures; dropped hunks that would restore moved suites/helpers.
  • Bedrock: kept current provider thinking defaults, newer model cases, and the relocation-marker cache regression while applying equivalent duplicate reductions.
  • LM Studio: kept the newer supplied-key setup regression, current config/response helpers, and shared-preload cancellation harness; retained the real transport redaction tests.
  • Copilot: kept supplied-token behavior and main's rejection of generic GitHub token environment variables; dropped the obsolete fallback expectation.
  • Buzz: reused main's shared runtime spies while consolidating equivalent relay and setup fixtures.
  • UI: removed only the two test-support cleanup probes from the requested commit; no rendered UI change.
Per-shard replay metrics, files, and original coverage evidence
Shard Test LOC before -> after Test additions/deletions Declarations before -> after
s167 trajectory 4250 -> 3873 +363/-740 99 -> 97
s166 hooks 6850 -> 5412 +335/-1773 218 -> 162
s161 worker 7927 -> 7404 +400/-923 166 -> 157
s168 openshell 3049 -> 2833 +126/-342 70 -> 62
s173 amazon-bedrock 5767 -> 5019 +227/-975 142 -> 126
s172 lmstudio 5854 -> 5170 +126/-810 157 -> 133
s170 ui 93 -> 60 +0/-33 4 -> 2
s174 github-copilot 6048 -> 5452 +127/-723 166 -> 145
s176 buzz 6213 -> 5759 +247/-701 152 -> 148

s167 (trajectory)

covered statements 790 -> 790 (0); branches 678 -> 678 (0); functions 153 -> 153 (0)

Files: src/trajectory/cleanup.test.ts, src/trajectory/export.test.ts, src/trajectory/metadata.test.ts, src/trajectory/runtime-store.sqlite.test.ts, src/trajectory/runtime.test.ts.

s166 (hooks)

covered statements 1565 -> 1565 (0); branches 1235 -> 1235 (0); functions 274 -> 274 (0)

Files: src/hooks/bundled/boot-md/handler.test.ts, src/hooks/bundled/session-memory/handler.test.ts, src/hooks/bundled/session-memory/transcript.test.ts, src/hooks/frontmatter.test.ts, src/hooks/gmail-ops.test.ts, src/hooks/gmail-setup-utils.test.ts, src/hooks/gmail-watcher.test.ts, src/hooks/gmail.test.ts, src/hooks/internal-hooks.test.ts, src/hooks/loader.test.ts, src/hooks/message-hook-mappers.test.ts, src/hooks/message-hooks.test.ts, src/hooks/plugin-hooks.test.ts, src/hooks/policy.test.ts, src/hooks/workspace.test.ts.

s161 (worker)

covered statements 1819 -> 1820 (1); branches 1442 -> 1443 (1); functions 373 -> 373 (0)

Files: src/worker/browser-runtime.test.ts, src/worker/computer-observation.runtime.test.ts, src/worker/inference-stream.runtime.test.ts, src/worker/launch-descriptor.test.ts, src/worker/node-workspace-retain-protocol.test.ts, src/worker/transcript-message.test.ts, src/worker/worker-command.runtime.test.ts, src/worker/worker-connection-endpoint.test.ts, src/worker/worker-connection.test.ts, src/worker/worker-rpc-clients.test.ts, src/worker/worker.fault-injection.test.ts, src/worker/worker.runtime.test.ts.

s168 (openshell)

covered statements 721 -> 721 (0); branches 452 -> 452 (0); functions 169 -> 169 (0)

Files: extensions/openshell/index.test.ts, extensions/openshell/src/backend.exec-workdir.test.ts, extensions/openshell/src/config.test.ts, extensions/openshell/src/mirror.test.ts, extensions/openshell/src/openshell-core.test.ts.

s173 (amazon-bedrock)

covered statements 1090 -> 1090 (0); branches 893 -> 893 (0); functions 203 -> 203 (0)

Files: extensions/amazon-bedrock/control-plane.test.ts, extensions/amazon-bedrock/discovery.test.ts, extensions/amazon-bedrock/embedding-provider.test.ts, extensions/amazon-bedrock/index.test.ts, extensions/amazon-bedrock/memory-embedding-adapter.test.ts, extensions/amazon-bedrock/stream.runtime.accounting-replay.test.ts, extensions/amazon-bedrock/stream.runtime.lifecycle.test.ts, extensions/amazon-bedrock/stream.runtime.preview.test.ts, extensions/amazon-bedrock/stream.runtime.test.ts.

s172 (lmstudio)

  • Coverage: statements 939 → 938; branches 881 → 879; functions 193 → 193. Only setup.ts dropped coverage (−1 statement, −2 branches); both gates pass. No excluded groups.

Files: extensions/lmstudio/index.test.ts, extensions/lmstudio/provider-policy-api.test.ts, extensions/lmstudio/src/embedding-provider.integration.test.ts, extensions/lmstudio/src/embedding-provider.test.ts, extensions/lmstudio/src/models.fetch.test.ts, extensions/lmstudio/src/models.test.ts, extensions/lmstudio/src/runtime.test.ts, extensions/lmstudio/src/setup.test.ts, extensions/lmstudio/src/stream.test.ts, extensions/lmstudio/tool-capabilities.test.ts.

s170 (ui)

covered statements 3 -> 3 (0); branches 0 -> 0 (0); functions 0 -> 0 (0)

Files: ui/src/e2e/phone-stale-build-recovery.test-support.test.ts.

s174 (github-copilot)

  • Coverage: statements 889 → 889; branches 767 → 767; functions 164 → 164. No per-file drops or excluded groups.

Files: extensions/github-copilot/auth.test.ts, extensions/github-copilot/embeddings.test.ts, extensions/github-copilot/index.test.ts, extensions/github-copilot/login.test.ts, extensions/github-copilot/models.test.ts, extensions/github-copilot/provider-policy-api.test.ts, extensions/github-copilot/stream.test.ts, extensions/github-copilot/usage.test.ts.

s176 (buzz)

  • Coverage: statements 2,121 → 2,120; branches 1,313 → 1,306; functions 407 → 407. Both drops meet the 1% gate. profile.ts lost one statement/six branches; buzz-bus.ts lost one branch. No excluded groups.

Files: extensions/buzz/src/buzz-bus.archived-rooms.test.ts, extensions/buzz/src/buzz-bus.history-catchup.test.ts, extensions/buzz/src/buzz-bus.lifecycle.test.ts, extensions/buzz/src/buzz-bus.mentions.test.ts, extensions/buzz/src/config-schema.test.ts, extensions/buzz/src/directory-relay.test.ts, extensions/buzz/src/directory.test.ts, extensions/buzz/src/event-order.test.ts, extensions/buzz/src/gateway.lifecycle.test.ts, extensions/buzz/src/inbound.test.ts, extensions/buzz/src/mentions.test.ts, extensions/buzz/src/qa/adapter.runtime.test.ts, extensions/buzz/src/qa/credentials.test.ts, extensions/buzz/src/setup-core.test.ts, extensions/buzz/src/setup-surface.test.ts, extensions/buzz/src/setup-verify.test.ts, extensions/buzz/src/target.test.ts.

@clawsweeper

clawsweeper Bot commented Sep 26, 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) September 26, 2026 13:24
@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 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 9:28 AM ET / 13:28 UTC.

ClawSweeper review

What this changes

The branch consolidates fixtures and removes repeated tests across core subsystems, bundled plugins, Buzz, and Control UI test support.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: this is a distinct, current test cleanup from a repository member. The inspected high-risk deletions retain stronger boundary checks, and the review found no concrete introduced defect.

Priority: P3
Reviewed head: 6a073955368d6c915bbbe617079fcdf44f96c858

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The test cleanup has useful focused validation and retained boundary coverage in the inspected areas, with no concrete regression identified.
Proof confidence 🌊 off-meta tidepool Not applicable: No production owner or behavior changes. This member-authored test cleanup is exempt from contributor real-setup proof; the reported Testbox runs support its test entrypoints, and 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: No production owner or behavior changes. This member-authored test cleanup is exempt from contributor real-setup proof; the reported Testbox runs support its test entrypoints, and no stored-data contract changes.
Evidence reviewed 8 items Introduced scope: The pinned introduced diff changes 82 test files and no production files; it removes more test lines than it adds.
Still distinct from current main: Current main still contains the LM Studio setup cases removed by the PR; the verified test-merge comparison changes the same test-only surface.
Retained worker boundary check: The retained fault-injection test commits through the production transcript boundary, mutates the caller's message, and verifies identical replay requests and the stored original message.
Findings None None.
Security None None.

How this fits together

Core and plugin test suites exercise OpenClaw behavior through fixtures and check the results. CI uses those assertions to catch regressions before changes reach users.

flowchart LR
  A[Core and plugin behavior] --> B[Test fixtures]
  B --> C[Core and plugin suites]
  C --> D[Behavior assertions]
  D --> E[CI results]
  F[Test cleanup] --> C
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one strong owner-boundary test for each distinct security, replay, setup, and delivery contract while accepting the duplicate reductions.

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

Not applicable: this PR reports test duplication, not a runtime defect. The relevant check is whether retained tests still protect the distinct behavior contracts.

Is this the best way to solve the issue?

Yes for the inspected high-risk cases: the branch reduces repeated assertions while retaining checks at the worker, provider setup, and stream failure boundaries.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is internal test maintenance with no direct production behavior change.
  • 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: No production owner or behavior changes. This member-authored test cleanup is exempt from contributor real-setup proof; the reported Testbox runs support its test entrypoints, and no stored-data contract changes.

Label justifications:

  • P3: This is internal test maintenance with no direct production behavior change.
  • 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: No production owner or behavior changes. This member-authored test cleanup is exempt from contributor real-setup proof; the reported Testbox runs support its test entrypoints, and no stored-data contract changes.

Evidence

What I checked:

  • Introduced scope: The pinned introduced diff changes 82 test files and no production files; it removes more test lines than it adds. (6a073955368d)
  • Still distinct from current main: Current main still contains the LM Studio setup cases removed by the PR; the verified test-merge comparison changes the same test-only surface. (extensions/lmstudio/src/setup.test.ts:665, 002288fc669c)
  • Retained worker boundary check: The retained fault-injection test commits through the production transcript boundary, mutates the caller's message, and verifies identical replay requests and the stored original message. (src/worker/worker.fault-injection.test.ts:455, 6a073955368d)
  • Retained provider setup check: The LM Studio plugin entrypoint still checks that its provider-specific key wins over a generic key during reset discovery. (extensions/lmstudio/index.test.ts:366, 6a073955368d)
  • Retained Bedrock failure check: A retained stream lifecycle test verifies the error result and client destruction when the provider request fails before output. (extensions/amazon-bedrock/stream.runtime.lifecycle.test.ts:203, 6a073955368d)
  • Reported validation: The captured PR body reports 1,509 passing tests in an isolated Testbox run. After a type-only Buzz import correction, it reports 19 passing Buzz setup cases and passing remaining extension type and lint checks on the reviewed head; these are contributor-reported results, not checks run in this read-only review.

Likely related people:

  • steipete: 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)
  • Yiğit ERDOĞAN: 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 b6fdbd1 into main Sep 26, 2026
132 of 137 checks passed
@steipete
steipete deleted the tcr/land-d024-1790419972 branch September 26, 2026 13:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
…158907)

* test(trajectory): deslop s167 tests

* test(hooks): deslop s166 tests

* test(worker): deslop s161 tests

* test(openshell): deslop s168 tests

* test(amazon-bedrock): deslop s173 tests

* test(lmstudio): deslop s172 tests

* test(ui): deslop s170 tests

* test(github-copilot): deslop s174 tests

* test(buzz): deslop s176 tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: buzz extensions: amazon-bedrock extensions: github-copilot extensions: lmstudio extensions: openshell 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