Skip to content

test(core,plugins,ui): remove low-value tests (batch d041) - #159097

Merged
steipete merged 12 commits into
mainfrom
tcr/land-d041-1790443276
Sep 26, 2026
Merged

steipete merged 12 commits into
mainfrom
tcr/land-d041-1790443276

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This maintainer-requested test cleanup removes overlapping examples and repeated fixtures across utilities, UI theme checks, Prometheus diagnostics, Markdown, boards, script routing, image generation, ClawRouter, Qwen, and QA evidence producers (batch d041).

User Impact

No user-visible behavior changes. Runtime production code is unchanged. The only non-test-file API change makes the QA producer's buildTuiPtyVitestCommand helper private after moving its assertions to existing producer-boundary tests; no external production caller uses it.

Why This Change Was Made

Replay ten audited campaign commits onto current main, preserving newer regressions and current owner APIs. Retain meaningful cancellation, persistence, authorization, protocol, formatting, and error-path coverage while consolidating duplicate examples and setup.

Replay decisions

All ten source commits were applied in order; no commit was skipped. Conflict resolution preserved main's behavior:

  • Utilities: retain newer directive whitespace/marker regressions and unpriced-cost/accumulator tests. Keep main's already-consolidated provider-hook tests unchanged instead of restoring the old table.
  • Markdown: retain new inline/entity/escaped/control-separated fence-marker cases; apply remaining consolidation over main's earlier duplicate removals and keep exact-output assertions in the retained tables.
  • Boards: preserve async database calls, worker cleanup, new content ownership and storage regressions, and standalone explicit-ownership restart proof. Reapply equivalent duplicate-test deletions and alias cleanup; drop obsolete synchronous persistence-fixture and restart consolidation hunks.
  • Scripts: preserve new docs/catalog/native-routing paths and Windows provider-local-service cases. Retain the current prepared-runtime docs CLI fixtures and diagnostics; apply only the duplicate mirrored-route test deletion in that file, dropping its old fixture-cleanup rewrite.
  • Image generation: consolidate response/request fixtures while retaining main's native Response.json use and typed configuration.
  • ClawRouter: retain the newer abort-signal forwarding case while consolidating shared timeout/token defaults.
  • Qwen: preserve newer regional setup and simple-completion regressions, adapt their call to the consolidated registration helper, and retain main's restored media-provider registration initialization.
  • QA: preserve the expanded model/platform evidence matrix and current test API import while consolidating temporary-directory cleanup.
  • A replay inspection caught and repaired Prometheus imports still required by main's newer memory/spawn regression.

No changed path matches the current .github/CODEOWNERS rules.

Evidence

Current base after rebase round 1: f0b78f55d6d5acfb052a4512d97088b408a0c28d. Current replay head: 414a1021eda12793a2f8969bbc2263b5a48348fe. GitHub reported a conflict after the initial PR opened; the only rebase conflict was Qwen media-provider initialization, resolved in favor of current main while keeping the shared video fixture.

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <changed files>, plain oxlint -c .oxlintrc.json <changed TS files>, and git diff --check: passed.
  • Changed-check classification: core tests, plugin tests, root test support, and tooling; no runtime production lane.
  • Testbox infrastructure gap at PR opening: Blacksmith lease tbx_01m3fdm0nnw44k6pvh93mhyvyn was ready, but the wrapper's local source-capsule preparation took longer than its 30-minute idle lifetime. The lease completed before the attempted CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all 56 changed test files> reached it. No current-head focused test executed, passed, or failed in this attempt. Lease shutdown was requested. Testbox allocation.
  • The required changed-check attempt delegated to Blacksmith but remained in source preparation. It was stopped when hosted CI identified the Qwen repair below. The corrected-head retry uses fresh lease tbx_01m3fj2p35bh23yhr9w3k4st7t with a 90-minute idle lifetime, serializing the 56-file focused run and changed checks in one wrapper invocation. It is still in source preparation; no current-head Testbox result is claimed. Earlier reviews were stopped when their heads changed; fresh full-diff autoreview is running.
  • Hosted CI run 36264078340 ran the Qwen files: 114 tests passed and one retained operation-budget regression failed because the replay had removed its fetchWithTimeoutGuardedMock binding. Commit 414a1021eda restores that existing mock binding without changing assertions. Plain lint and a targeted undefined-binding scan across all changed files pass for the repaired binding; remaining extra-scan names are actual Node globals. The Testbox rerun is blocked in the same source-preparation infrastructure path.
  • Per the maintainer's campaign-specific infrastructure exception, arm exact-head squash auto-merge while hosted openclaw/ci-gate supplies the merge gate. Independent autoreview runs alongside CI; accepted findings disable auto-merge for repair.

Size and original shard evidence

Replayed diff: 56 test files +1,798/-5,530 (net -3,732); one test-support file +41/-2 (net +39); QA tooling +1/-1 (net 0); runtime production 0/0. Total: 58 files, +1,840/-5,533 (net -3,693). Literal test declarations in changed files: 656 → 557 (-99); .each counts once, so these are not expanded executed-case counts.

The following coverage totals are the original in-shard campaign evidence, not a fresh coverage claim for this replay. s248 and s242 have explicit baseline gaps; s246 reads CSS and measures no production JavaScript. s244's coverage increase is in test support; its production service coverage remained unchanged. s254's statement/branch losses were 0.49%/0.84%. Full-tree Knip timed out in the original s245, s242, and s254 runs.

Shard Replayed test LOC delta Literal declarations Original in-shard coverage totals
s241 utils -719 142 → 118 (-24) covered statements 689 -> 689 (0); branches 554 -> 554 (0); functions 123 -> 123 (0)
s246 UI -89 11 → 11 (0) covered statements 0 -> 0 (0); branches 0 -> 0 (0); functions 0 -> 0 (0)
s244 diagnostics -264 35 → 31 (-4) covered statements 309 -> 325 (16); branches 144 -> 150 (6); functions 58 -> 63 (5)
s247 Markdown -824 178 → 126 (-52) covered statements 1801 -> 1801 (0); branches 1308 -> 1308 (0); functions 230 -> 230 (0)
s243 boards -181 54 → 48 (-6) covered statements 504 -> 504 (0); branches 611 -> 611 (0); functions 122 -> 122 (0)
s248 scripts -299 83 → 82 (-1) covered statements 0 -> 0 (0); branches 0 -> 0 (0); functions 0 -> 0 (0) — unverified: baseline ENOSPC, all 13 files excluded
s254 image generation -469 35 → 33 (-2) covered statements 203 -> 202 (-1); branches 237 -> 235 (-2); functions 41 -> 40 (-1)
s245 ClawRouter -168 40 → 37 (-3) covered statements 347 -> 347 (0); branches 259 -> 259 (0); functions 78 -> 78 (0)
s242 Qwen -595 65 → 60 (-5) covered statements 0 -> 0 (0); branches 0 -> 0 (0); functions 0 -> 0 (0) — baseline timeout, all seven files excluded; diagnostic-only statements 316 -> 315 and branches 249 -> 249
s252 QA -124 13 → 11 (-2) covered statements 9165 -> 9175 (10); branches 975 -> 983 (8); functions 649 -> 650 (1)
Files by shard
  • s241, src/utils/: chunk-items.test.ts, delivery-context.test.ts, directive-tags.test.ts, fetch-timeout.test.ts, parse-json-compat.test.ts, queue-helpers.test.ts, reaction-level.test.ts, usage-format.cost.test.ts, usage-format.test.ts.
  • s246, ui/src/styles/: base-theme-contrast.node.test.ts, base-theme-tokens.node.test.ts.
  • s244, extensions/diagnostics-prometheus/src/: service.event-loop.test.ts, service.http-scope.test.ts, service.runtime-identity.test.ts, service.test-helpers.ts, service.test.ts.
  • s247, packages/markdown-core/src/: construct-fallbacks.test.ts, fences.test.ts, frontmatter.test.ts, ir.blockquote-spacing.test.ts, ir.dunder-identifiers.test.ts, ir.fenced-content.test.ts, ir.hr-spacing.test.ts, ir.nested-lists.test.ts, ir.raw-html.test.ts, ir.table-bullets.test.ts, ir.test.ts, render-aware-chunking.test.ts, render.crossing.test.ts, tables.test.ts.
  • s243, src/boards/: board-capabilities.test.ts, board-generated-identity.test.ts, board-layout.test.ts, board-store.parity.test.ts, board-store.test.ts.
  • s248, src/scripts/: ci-changed-scope.control-ui.test.ts, ci-changed-scope.git-owner.test.ts, ci-changed-scope.test.ts, ci-changed-scope.windows.test.ts, control-ui-i18n-report.test.ts, docs-link-audit.test.ts, sync-plugin-versions.test.ts.
  • s254, src/image-generation/: image-assets.test.ts, openai-compatible-image-provider.test.ts, runtime.test.ts.
  • s245, extensions/clawrouter/: index.test.ts, provider-catalog.test.ts, tool-schemas.test.ts, usage.test.ts.
  • s242, extensions/qwen/: index.test.ts, media-understanding-provider.test.ts, onboard.test.ts, provider-catalog.test.ts, stream.test.ts, video-generation-provider.test.ts.
  • s252, test/e2e/qa-lab/: plugins/clawhub-release-candidate-install.test.ts, tui/tui-pty-evidence-producer.test.ts, tui/tui-pty-evidence-producer.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 force-pushed the tcr/land-d041-1790443276 branch from f8d47b3 to 11d5fd1 Compare September 26, 2026 18:52
@steipete
steipete enabled auto-merge (squash) September 26, 2026 18:53
@steipete
steipete disabled auto-merge September 26, 2026 19:05
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 3:22 PM ET / 19:22 UTC (Revision 2).

ClawSweeper review

What this changes

The branch consolidates tests and fixtures across core, plugins, Markdown, UI, and QA, and makes a TUI QA command helper private.

Merge readiness

⛔ Blocked before merge - 1 item remains

This cleanup remains distinct from current main. The inspected retained tests and QA producer boundary show no concrete regression, while the prior shard measurements do not validate the repaired head.

Priority: P3
Reviewed head: 414a1021eda12793a2f8969bbc2263b5a48348fe

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The inspected cleanup is coherent, but the broad replay and earlier Qwen test failure limit confidence until the repaired head is validated.
Proof confidence 🌊 off-meta tidepool Not applicable: The changed owners are test suites and a TUI QA producer helper, with no user-visible runtime change; the Repository State identifies this as a MEMBER-authored PR. The captured evidence has no completed focused run for the repaired head, and no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed owners are test suites and a TUI QA producer helper, with no user-visible runtime change; the Repository State identifies this as a MEMBER-authored PR. The captured evidence has no completed focused run for the repaired head, and no stored-data contract changes.
Evidence reviewed 6 items Introduced change: The pinned introduced diff consolidates test files and removes the QA command builder's export; no runtime production implementation is changed.
Current-main necessity: Current main still exports the QA command builder and retains Qwen catalog tests removed by the branch; this cleanup has not already landed.
Retained contract coverage: The retained board test exercises an unmarked legacy row through database reopen, and the Windows CI inventory checks that every declared Windows test routes to its native lane.
Findings None None.
Security None None.

How this fits together

OpenClaw's tests exercise core and plugin behavior and feed CI results. A QA producer also turns selected TUI tests into evidence reports.

flowchart LR
A[Core and plugin behavior] --> B[Test cases and fixtures]
B --> C[Vitest suites]
C --> D[CI results]
E[QA scenario] --> F[TUI evidence producer]
F --> D
Loading

Before merge

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

Security

None.

PR surface

Tests -3693. Total -3693 across 58 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 58 1831 5524 -3693
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 58 1831 5524 -3693

Review metrics

Metric Value Why it matters
QA helper exports 1 made private This is the only code-facing API change, and repository search found no external caller.

Technical review

Best possible solution:

Keep tests for distinct observable contracts, validate the repaired head through its selected suites, and keep the QA command builder owned by its producer.

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

Not applicable: this PR cleans up tests rather than reporting a current-main product bug. The captured older-head Qwen failure is identified, but no focused run of the repaired head is recorded.

Is this the best way to solve the issue?

Yes for the inspected boundaries: shared fixtures and producer-level QA assertions preserve the checked contracts while removing repetition. Exact-head test results remain the validation step.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is internal test maintenance with no stated user-visible behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owners are test suites and a TUI QA producer helper, with no user-visible runtime change; the Repository State identifies this as a MEMBER-authored PR. The captured evidence has no completed focused run for the repaired head, and no stored-data contract changes.

Label justifications:

  • P3: This is internal test maintenance with no stated user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owners are test suites and a TUI QA producer helper, with no user-visible runtime change; the Repository State identifies this as a MEMBER-authored PR. The captured evidence has no completed focused run for the repaired head, and no stored-data contract changes.

Evidence

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)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Pavan Kumar Gondhi: 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.

  • Use the exact-head hosted test result to validate the retained suites, as the original shard measurements predate this replay.

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-26T18:58:06.687Z sha 11d5fd1 :: blocked before merge. :: none

@steipete
steipete enabled auto-merge (squash) September 26, 2026 19:17
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 26, 2026
@steipete
steipete merged commit b6b36ca into main Sep 26, 2026
129 checks passed
@steipete
steipete deleted the tcr/land-d041-1790443276 branch September 26, 2026 19:29
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
…159097)

* test(utils): deslop s241 tests

* test(ui): deslop s246 tests

* test(diagnostics-prometheus): deslop s244 tests

* test(markdown): deslop s247 tests

* test(boards): deslop s243 tests

* test(scripts): deslop s248 tests

* test(image-generation): deslop s254 tests

* test(clawrouter): deslop s245 tests

* test(qwen): deslop s242 tests

* test(qa): deslop s252 tests

* test(diagnostics-prometheus): preserve imports for runtime metrics

* test(qwen): preserve budget regression polling mock
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 extensions: clawrouter Extension: clawrouter extensions: diagnostics-prometheus extensions: qwen P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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