Repository navigation
test(runtime,ui,tooling): remove low-value tests (batch d026) - #167563
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. |
|
Codex review: needs changes before merge. What this changesThis PR consolidates regression suites, removes redundant cases, and removes test-routing entries for deleted suites. Review scores
ProductKind: Test only · Worth it: Yes Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this is useful owner-directed maintenance, but one source-proven test-contract regression blocks a clean review. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherOpenClaw’s regression suites check runtime, maintenance, browser setup, and Control UI behavior. CI selects these suites through routing inventories, while compatibility records identify tests protecting supported plugin contracts. flowchart TD
A[Repository changes] --> B[CI test selection]
B --> C[Consolidated regression suites]
C --> D[Runtime and UI contracts]
E[Plugin compatibility records] --> F[Test path validation]
F --> G[Test results]
D --> G
Technical reviewBest possible solution: Keep distinct regressions in their existing owner suites and update compatibility metadata whenever those tests move. Do we have a high-confidence way to reproduce the issue? Yes: the compatibility registry checks that every recorded test path exists, and this PR deletes one of those paths without updating the record; no failing run was executed during this read-only review. Is this the best way to solve the issue? Yes: consolidation into existing suites is appropriate, with a mechanical metadata correction needed to complete the move. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 608134ea54c3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceTests -1972, Other -7. Total -1979 across 42 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 8, 2026, 10:31 PM ET / October 9, 2026, 02:31 UTC (Revision 2). |
523ddd3 to
9d2569c
Compare
|
Confirmed the inherited CI failure for head The only failed check in CI run 37874402877 is The exact failing command was reproduced on clean detached checkouts in Blacksmith Testbox run 37877245073, lease Both runs verified their Git SHA and clean tracked tree around the frozen install. The batch changes neither cycle owner nor the scanner or its configuration. The same failure also appears in the completed full-main CI run 37871873098; the Testbox reproduction above is the independent baseline proof. Proceeding with the approved pre-existing-failure exception, pinned to this head. The cycle remains a separate main repair. |
…aw#167563) * test(channels): deslop w1238 tests * test(canvas): deslop w1237 tests * test(gateway): deslop w1231 tests * test(browser): deslop w1240 tests * test(commands): deslop w1239 tests * test(ui): deslop w1221 tests * test(scripts): deslop w1232 tests * test(scripts): deslop w1236 tests * test(scripts): deslop w1244 tests * test(plugins): deslop w1243 tests * test: preserve distinct contracts in reduction batch d026
#167563 deleted src/plugins/runtime/runtime-agent.workspace.test.ts, but the workspace-mutation-guard compatibility record still listed it, so the compat registry's "keeps every record actionable" test failed on main. The deprecated beforePersistentApply surface and its DEP_WORKSPACE_MUTATION_GUARD warning are covered by src/plugins/runtime/runtime-agent.test.ts.
openclaw#167563 deleted src/plugins/runtime/runtime-agent.workspace.test.ts, but the workspace-mutation-guard compatibility record still listed it, so the compat registry's "keeps every record actionable" test failed on main. The deprecated beforePersistentApply surface and its DEP_WORKSPACE_MUTATION_GUARD warning are covered by src/plugins/runtime/runtime-agent.test.ts.
What Problem This Solves
This maintainer-requested campaign batch removes redundant test cases and repeated fixture setup across channel turns, canvas widgets, Gateway Talk, browser setup, Doctor/session migration, Custodian UI, and plugin runtime tests.
User Impact
No user-visible behavior changes. Production runtime code is unchanged. The replay removes 1,970 net test lines and nine stale test-routing entries while preserving distinct regression, security, authority, and lifecycle coverage.
Why This Change Was Made
Replay all ten campaign shard commits onto main, then rebase onto
77cecb5449650c8efd3c261fecb4be08f82e7eed. Redundant variants and implementation-mirroring cases are removed; retained cases move into existing suites with their cleanup and routing preserved. Coverage alone was not used to justify deletion: distinct security and lifecycle cases remain even where their coverage overlaps.The initial replay applied all ten commits without conflicts. The subsequent rebase had one conflict in
src/acp/runtime/session-meta.legacy-migration.test.ts: main's final-metadata-commit authority fix from71bcb79b44fis kept byte-for-byte, including initialization and closure cases; the batch's initialization-case deletion was dropped. All ten other commit patches are unchanged. Subsequent independent review retained 19 distinct contracts that the source reductions had removed; no whole commit was skipped. Current main's unrelated changes remain intact. Test-routing changes only remove paths deleted by this batch. No paths in this diff match the base CODEOWNERS rules.Final diff against the pinned base: tests +2,319 / −4,289 (net −1,970); test-routing/tooling +0 / −9; production runtime +0 / −0. Overall: 42 changed files, +2,319 / −4,298, and 55 fewer test declarations. Per-shard final deltas below include the review corrections; original coverage figures remain the original worker measurements.
Evidence
Candidate:
9d2569cd3b4967b2131ec3ccae004eed14e95832. The completed Testbox results below belong to the pre-rebase candidate523ddd38124b2aac0d1e3522d651f21fe4153a19; the rebase preserves the reviewed diff except for retaining more of main's ACP authority test.Rebase validation: local formatting, plain changed-file oxlint, diff checks, and a conflict-free merge-tree check against fresh main passed. A fresh Testbox attempt for this head stalled during source preparation for more than ten minutes, then was interrupted before upload (exit 143). No post-rebase Testbox tests are claimed. Hosted CI is the final-head merge gate under the campaign infrastructure-gap rule.
pnpm test <26 surviving touched test files> <4 routing-owner tests>: 690 tests in 30 files passed, across all 12 routed Vitest projects in 293.98 seconds, after source hashes/deletion checks.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <batch paths>: all 27 core typecheck graphs, extension/script typechecks, formatting, boundaries, ratchets, and preceding guards passed on the replay. After review corrections, the core changed-path gate passed all seven selected typecheck graphs and preceding guards on the final candidate. Both attempts stopped at the same inherited dead-export scan; neither is reported as a green full gate.3f76fe021990df309bfcd0905030520bb30f81f4, fresh frozen install, exactnode --import tsx scripts/check-deadcode-exports.mts: reproduced the same four unused exports below. Those files and the scanner are unchanged by this batch.oxfmt, plain changed-fileoxlint -c .oxlintrc.json, andgit diff --check: passed. Independent final review through P2: no actionable findings.Blacksmith Testbox final candidate and clean-main proof, lease
tbx_01m4f34n7py76wypxgwyh54eyy. Initial focused proof: run 37860860720, 657 tests before the retained-contract corrections. Broad changed-check proof: run 37862642709. The wrapper's command exit and timing records own these external lease results; stopping a completed lease may mark its hosting Actions run cancelled.Inherited scan findings:
bindCliQuestionAnswerAuthorityinsrc/agents/cli-runner/tool-authority.ts;prepareSessionEventTargetForHostinsrc/auto-reply/reply/session-event-handoff.ts;readSessionEntryCreationTransitioninsrc/config/sessions/session-accessor.sqlite-entry-cache-publication.ts;RESTART_CONTINUATION_CONTEXT_PREFIXinsrc/infra/heartbeat-events-filter.ts.Each original shard stayed within the campaign's 1% covered-statement/branch loss gate. These are original in-shard coverage measurements, not a new aggregate coverage run on the rebased batch. The historical canvas changed-check run was interrupted by Testbox infrastructure; session-metadata broad checks had baseline-proven unrelated failures. Fresh replay validation is reported above.
covered statements 998 -> 998 (0); branches 802 -> 800 (-2); functions 214 -> 214 (0)covered statements 303 -> 303 (0); branches 353 -> 353 (0); functions 38 -> 38 (0)covered statements 29483 -> 29446 (-37); branches 19545 -> 19507 (-38); functions 5553 -> 5548 (-5)covered statements 1151 -> 1151 (0); branches 891 -> 891 (0); functions 191 -> 191 (0)covered statements 565 -> 565 (0); branches 521 -> 521 (0); functions 60 -> 60 (0)covered statements 3985 -> 3982 (-3); branches 2368 -> 2361 (-7); functions 652 -> 652 (0)covered statements 7164 -> 7148 (-16); branches 4003 -> 3991 (-12); functions 1637 -> 1634 (-3)covered statements 545 -> 545 (0) branches 367 -> 367 (0) functions 90 -> 90 (0)covered statements 1412 -> 1412 (0) branches 647 -> 646 (-1) functions 254 -> 254 (0)covered statements 5139 → 5163 (+24) branches 3541 → 3561 (+20) functions 1124 → 1129 (+5)Shard files and retained contracts
src/channels/turn/run-channel-turn.{pipeline,prepared-lifecycle,startup-admission}.test.ts. Startup admission moves into prepared lifecycle; account-stop and Gateway-stop cancellation races remain.src/canvas/widget-tool.{grants,presenter,prompt,report,scheduled,script-syntax}.test.tsandwidget-tool.test.ts. Retained grants, scheduled authoring, and script validation move into presenter; report security, UTF-8/large HTML, ownership, and generated-name collision regressions remain.src/gateway/server.talk-{config,runtime}.test.ts. SecretRef, code-heavy speech, prototype-like aliases, and lifecycle coverage remain. Config reload has dedicated sibling coverage.extensions/browser/src/cli/browser-cli-extension.{posix-upgrade,windows-setup}.test.ts. Explicit-context refusal, state-directory binding, serial cancellation, and final mutation-race guards remain.src/commands/doctor/cron/store-migration.{schedule-kind,session-target}.test.tsandstore-migration.test.ts. Retained cases move into the base suite; policy-owner selection and invalid/valid-date regressions remain.ui/src/pages/custodian/custodian-page.session-lifecycle.test.tsandcustodian-page.test.ts. Retained lifecycle cases move into base; secret clearing/masking, reconnect fencing, and incident races remain. This is test-only and changes no UI appearance.src/config/sessions/legacy-main-session-migration.{bounded,handoff,input-handoff,ledger,race,startup}.test.ts,legacy-main-session-migration.test.ts, andscripts/lib/ci-proof-test-inventory.mts. Retained cases move into base; races and canonical-membership security remain; three deleted paths leave the inventory.src/acp/runtime/session-meta.{alias-lifecycle,changes,key-repair,legacy-migration}.test.ts,session-meta.test.ts,scripts/lib/ci-policy-test-watch.mts,scripts/lib/ci-proof-test-inventory.mts, andtest/vitest/vitest.database-worker-core-paths.mjs. Retained cases move into base; authority and recovery interleavings remain; routing cleanup removes five lines.src/commands/doctor-maintenance.{settlement.refusals,settlement,stopped-activation,worker}.test.tsandscripts/lib/ci-proof-test-inventory.mts. Fourteen retained cases move into settlement; distinct authority/lifecycle refusals remain; one deleted path leaves the inventory.src/plugins/runtime/runtime-agent.{session-color,session-patch,workspace}.test.tsandruntime-agent.test.ts. Session patch moves into color, workspace into base; ingress/commit authority, recovery ownership, queued archival, lifecycle replacement, and worker guards remain.Independent review and retained contracts
P2 review retained explicit and selector-free installer guards, mixed-root atomicity, channel failure cleanup and identityless settlement, migration artifacts/discovery, ACP event negatives, stored cron target normalization, Custodian delivery certainty and reconnect history, report validation/naming, presenter precedence, dynamic capability prompts, Doctor error aggregation, and plugin initialization ordering. Talk resolver output assertions were folded into the retained code-heavy test. Final review found no actionable P0–P2 issue.
Eight findings were rejected with current-source and sibling-test evidence: ACP closure/source receipts are covered by retained canonical-edit and changed-source cases; legacy ACP session-ID reads by the retained runtime-reader fence; Doctor timeout and unchanged/during-write receipts by retained settlement and database-write tests; plugin unlocked rollback and refusal to overwrite a completed entry by retained creation cases; Talk persisted voice fields by the strict SecretRef resolver test. Each uses the same owning guard or failure path.