Repository navigation
test(core,plugins,ui): remove low-value tests (batch d041) - #159097
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
f8d47b3 to
11d5fd1
Compare
|
Codex review: blocked before merge. Reviewed September 26, 2026, 3:22 PM ET / 19:22 UTC (Revision 2). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherOpenClaw'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
Before merge
Agent review detailsSecurityNone. PR surfaceTests -3693. Total -3693 across 58 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…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
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
buildTuiPtyVitestCommandhelper 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:
Response.jsonuse and typed configuration.No changed path matches the current
.github/CODEOWNERSrules.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>, plainoxlint -c .oxlintrc.json <changed TS files>, andgit diff --check: passed.tbx_01m3fdm0nnw44k6pvh93mhyvynwas ready, but the wrapper's local source-capsule preparation took longer than its 30-minute idle lifetime. The lease completed before the attemptedCI=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.tbx_01m3fj2p35bh23yhr9w3k4st7twith 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.fetchWithTimeoutGuardedMockbinding. Commit414a1021edarestores 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.openclaw/ci-gatesupplies 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);
.eachcounts 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.
Files by shard
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.ui/src/styles/:base-theme-contrast.node.test.ts,base-theme-tokens.node.test.ts.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.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.src/boards/:board-capabilities.test.ts,board-generated-identity.test.ts,board-layout.test.ts,board-store.parity.test.ts,board-store.test.ts.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.src/image-generation/:image-assets.test.ts,openai-compatible-image-provider.test.ts,runtime.test.ts.extensions/clawrouter/:index.test.ts,provider-catalog.test.ts,tool-schemas.test.ts,usage.test.ts.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.test/e2e/qa-lab/:plugins/clawhub-release-candidate-install.test.ts,tui/tui-pty-evidence-producer.test.ts,tui/tui-pty-evidence-producer.ts.