Repository navigation
test(core,codex,ui): remove low-value tests (batch d058) - #169673
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 removes redundant tests and unused test support across core, Codex, and the Control UI. Example: A test reduction removes both incomplete-snapshot recovery controls from Codex plugin metadata caching.
Review scores
ProductKind: Test only · Worth it: Yes Merge readiness⛔ Needs changes before merge - 4 items remain Keep open: the maintainer-approved test reduction is useful, but both previously reported P2 coverage regressions remain. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherVitest suites feed synthetic requests, databases, and UI fixtures through OpenClaw owners and compare their results with independent expectations. flowchart LR
A[Test fixtures] --> B[Vitest harnesses]
B --> C[Core and plugin owners]
C --> D[Observable results]
D --> E[Contract assertions]
E --> F[CI checks]
Technical reviewBest possible solution: Keep the useful test reductions while restoring compact, independent recovery and maintenance-rejection controls at their existing owners. Do we have a high-confidence way to reproduce the issue? The pinned diff and remaining tests establish both coverage losses by source inspection; no failing test run or current runtime regression is claimed. Is this the best way to solve the issue? Reducing duplicate proof is appropriate, but aggregate coverage similarity does not replace independent controls for successful incomplete responses or malformed databases at maintenance admission. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7aae49e8677b. TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes: No label 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 (3 earlier review cycles)
Reviewed October 12, 2026, 5:38 AM ET / 09:38 UTC (Revision 4). |
ff6ef9f to
d0c7947
Compare
d0c7947 to
4b2aecc
Compare
Port f670574ef5c onto campaign lane 612424730c41 while retaining the newer Solid glyph test, avatar rendering helper, and Mermaid light-DOM behavior. Validation: Testbox tbx_01m4pw6bbqnvhc2jxmtpf1f57c, fresh main 05287ac plus all 15 resolved files: 131 UI tests and 34 Chromium tests passed, zero skipped (12.32s across two Vitest shards). Oxlint exit 0, oxfmt --check, git diff --check, and independent P0-P2 review passed. Lease stopped.
Restore fail-closed recovery, passive-tool rejection, shared-store scoping, and corruption classification cases identified during landing review. Keep the batch reduction while preserving these distinct contracts.
Wait for initial transcript enrichment and the next accepted row backfill before asserting the committed preview. Preserve the projection and public list assertions without changing timeouts or polling for elapsed time.
4b2aecc to
99f83ed
Compare
…9673) * test(media-understanding): deslop x1248 tests * test(commands): deslop x1247 tests * test(ui): deslop x1243 tests Port f670574ef5c onto campaign lane 612424730c41 while retaining the newer Solid glyph test, avatar rendering helper, and Mermaid light-DOM behavior. Validation: Testbox tbx_01m4pw6bbqnvhc2jxmtpf1f57c, fresh main e6a6155 plus all 15 resolved files: 131 UI tests and 34 Chromium tests passed, zero skipped (12.32s across two Vitest shards). Oxlint exit 0, oxfmt --check, git diff --check, and independent P0-P2 review passed. Lease stopped. * test(gateway): deslop x1236 tests * test(codex): deslop x1238 tests * test(state): deslop x1252 tests * test(agents): deslop x1244 tests * test(codex): deslop x1250 tests * test(hooks): deslop x1256 tests * test(cli): deslop x1251 tests * test(hooks): remove orphaned npm spec assertion helper * test: retain independent safety regressions * test: retain independent safety coverage and remove stale lint directive Restore fail-closed recovery, passive-tool rejection, shared-store scoping, and corruption classification cases identified during landing review. Keep the batch reduction while preserving these distinct contracts. * test(gateway): await committed preview publication Wait for initial transcript enrichment and the next accepted row backfill before asserting the committed preview. Preserve the projection and public list assertions without changing timeouts or polling for elapsed time.
What Problem This Solves
Redundant test variants and implementation-mirroring checks add maintenance and execution cost without independently protecting behavior.
User Impact
No production behavior changes. This is one bounded test-reduction batch, preserving meaningful regressions, authority boundaries, and lifecycle/interleaving coverage.
Why This Change Was Made
All ten campaign commits initially applied cleanly at
ae34008dbc579db7261410a2d98dbd3cd8332697, with none skipped. The branch was initially rebased onto70bfdc2b58e42f02af5bdc4d345875a9e6ad3928and was rebased onto2c7cc827b309c6a2da1cd6c2aa5cb930eb326030and then93e87378063af62b07ca309d8fb48ceb7cb93073to incorporate the canonical main repair; both settlement rebases were conflict-free. Conflicts in the two update service integration/support files were resolved by preserving main's new clean-refusal regression, JSON response, definition-recovery receipt, running-service and restart assertions, while retaining the equivalent low-value variant deletions. Remove duplicate cases, metadata/wiring replays, and an unused update-command test-only facade; retain direct plugin-payload owner tests. The replay also removes the newly orphanedexpectUnsupportedNpmSpecassertion helper from test support (12 lines); the last caller was among the approved hook deletions. Test-only fixture repairs follow current asynchronous auth/search and rendering contracts.Prior corrected replay before settlement: production LOC +0 / -0, test LOC +2147 / -12920, test-support LOC +93 / -202, total +2240 / -13122, net -10882, across 143 files. These are historical figures; the current settlement total is below. Per-shard measurements are the original in-shard measurements and include unchanged shard members. No test routing, dependencies, timeouts, retries, or production API changed. No CODEOWNERS pattern matched these paths at the original review.
Current status
Settlement head:
99f83ed3585d19789fd81b0450efc6a56e0741aa.The batch-created lint failure is fixed by removing the unused max-lines directive. Clean-main local execution reproduced the original rewind SQL-count failure exactly (24 passed, 1 failed; 1,076.34s wrapper wall time on the overloaded host). This is local evidence, not a claimed Testbox/admin qualification.
The first settlement CI run, 38227724723, passed lint/types and all other selected jobs but failed one Node-test job with two cases: the same rewind assertion and the optional committed-preview fixture. Auto-merge was explicitly disabled before repair.
The next rebase preserves main's canonical repair
900c5c3079834fdcfe6557d41bbeb21256e73bfa: exact cold-fork transaction-admission and commit authority reads, plus exact resulting session keys, with all editor/media/provenance/sandbox and rewind assertions retained. The batch does not weaken that contract.The committed-preview fixture now waits for initial target enrichment, then observes the next accepted current-row publication using its existing owner-publication helper. It retains the projection and public list assertions and unchanged test deadlines; no sleeps, polling, timeout increase, or new skips.
Fresh full-batch independent review identified seven independent safety contracts to retain; all seven are restored. The correction delta and the subsequent preview synchronization fix each completed independent review with no actionable P0/P1 findings. Retained contracts: unrelated task-delivery corruption and inbound CASCADE preservation; all effectful passive native item kinds; displaced/replaced/conflicting/unreadable database publication; oversized canonical/legacy memory preservation; warm/cold shared-store deletion scoping; terminal corruption despite close failure; async foreign-key admission refusal.
Formatting, diff checks, and plain lint of all changed TS/JS pass. The eight-file local correction run was stopped before the second rebase; completed cases passed, including both restored warm/cold deletion cases, and hosted CI covered the correction files. The two affected Gateway files are now running locally with
--maxWorkers=1; no completed full-file pass is claimed yet.Testbox capacity gap: the main, candidate, and final admission attempts reported queued before any payload execution. All four created leases, including the unused initial warmup, were stopped. The final admission recheck was stopped immediately upon observing queued state. No provider escalation, Testbox run URL, PROVEN-ON-MAIN ledger entry, or admin exception is claimed. Fresh exact-head hosted CI is required before merge.
Current total diff against the refreshed base: +2,261 / -12,970, net -10,709 lines. Production code remains unchanged.
Review resolution
The completed initial full-diff review returned 14 P2 concerns. Four were accepted, restoring five cases: ledger-admission recovery rollback; archive failure preserves both workspace notes; authoritative remote bytes beat a stale local file (title corrected to avoid an untested timestamp claim); and named-entry plus installed-name hook allowlists. The final correction delta and conflict resolutions also received independent source review with no actionable issues, but that is not represented as a successful isolated follow-up run.
The initial review declined ten concerns after checking their primary proof; the fresh settlement review above supersedes those decisions where it restores stronger boundary coverage: passive protocol items use one deny-by-default path; removed scheduled accounts remain tested across three consumers; configured/persisted node execution remains covered; initial view-only reaction admission remains in the first access table; supported source initialization remains tested while raw foreign SQLite writers are outside the ownership contract; canonical database publication refusal lives in
update-run-recovery-admission; shared-store isolation remains in survivor-handle cleanup andcleanup-service.agent-purge; key-addressed queued-only abort remains covered; unsupported/prerelease npm policy is tested byinstall-from-npm-spec; and negative maintenance schemas remain covered inopenclaw-agent-dbandsqlite-schema-contract.Evidence
oxfmt --write <changed files>, plainoxlint -c .oxlintrc.json <changed TS files>, andgit diff --checkpassed.CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <137 changed test files>passed all 14 selected Vitest shards in 626.05s, including both browser files. Source verification pinned692ab55e194286a1ec85ddc09629b4c7c2a2078c/ tree390f83b29e9c4bb0a073e57a974b8abc8e392eea. Run, leasetbx_01m4q7pypfh292d7q5msfvb7nh, stopped.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <142 changed paths>: every selected guard, all core-test typecheck partitions, and extension-test typechecking passed. The dead-export step failed on six inherited production exports and their five-entry full-tree subset, plus the newly orphaned helper. Later lint steps were not executed after that failure; plain local lint passed separately. Run, leasetbx_01m4q96axs7v4zczw646fjart9, stopped.ff6ef9f155ba0964f6a175b6e70267db93e2e13f; repository-wide reference search confirms no callers, and focused independent review was clean. Existing focused test evidence remains applicable: the follow-up removes only this unreferenced helper.ae34008dbc579db7261410a2d98dbd3cd8332697with a frozen install, the same Knip production and full-tree scans reproduced the inherited lists exactly. The initial concurrent local attempt hit the existing 600s timeout; running the same scans serially completed without raising the timeout. Production:agentRunHasVisibleReply,retireOpenClawStateReadConnectionAfterCorruption,ApprovalPage,CustodianPage,QuestionPage,SkillWorkshopViewProps. Full-tree: the same list exceptQuestionPage. No baseline ignore or scanner guard changed.openclaw/ci-gateremains the merge gate, not a substitute claim that the unresolved local failure is repaired. No production behavior, visual output, or update/migration contract changes.All ten original shard coverage comparisons met the <=1% covered-statement/branch loss gate. Declarations were removed, not folded into unrelated combined tests. Some shards intentionally missed the 30% declaration target to retain independent contracts. These are the original measurement totals; the five restored cases make the final reduction smaller and cannot reduce the measured coverage.
Prior replay LOC before settlement, including shard-owned support and the initial review restorations:
Coverage qualifications: x1243 compares the non-browser group; both browser files passed separately after the original stale Mermaid fixture was repaired. x1244 and x1238 use a green pre-deletion baseline after repairing stale auth/search fixtures. x1236's per-case instrumenter did not support the nested Gateway group, so those deletions used source-based duplicate review; its aggregate coverage comparison succeeded across all groups. Historic shard changed-check gaps are not asserted to be current-head passes.
Per-shard changed file inventory
test(media-understanding): deslop x1248 tests
src/media-understanding/apply.test.tssrc/media-understanding/attachments.normalize.test.tssrc/media-understanding/defaults.test.tssrc/media-understanding/echo-transcript.test.tssrc/media-understanding/file-extraction-limits.test.tssrc/media-understanding/local-audio.test.tssrc/media-understanding/media-understanding-misc.test.tssrc/media-understanding/provider-registry.test.tssrc/media-understanding/resolve.test.tssrc/media-understanding/runner.entries.guards.test.tssrc/media-understanding/shared.test.tstest(commands): deslop x1247 tests
src/commands/doctor-tools-md-migration.test.tssrc/commands/doctor-ui.repair.test.tssrc/commands/doctor-ui.test.tssrc/commands/doctor-unconfigured-agent-databases.test.tssrc/commands/doctor-update-refusal.test.tssrc/commands/doctor-update-run.test.tssrc/commands/doctor-update.test.tssrc/commands/doctor-volatile-fs.test.tssrc/commands/doctor-workspace-status.test.tssrc/commands/doctor-workspace.test.tssrc/commands/export-trajectory.test.tssrc/commands/gateway-auth-token.test.tssrc/commands/gateway-install-token.test.tssrc/commands/gateway-readiness.test.tssrc/commands/gateway-status.test.tstest(ui): deslop x1243 tests
ui/src/components/config-form.constraints.test.tsui/src/components/config-form.search.node.test.tsui/src/components/confirm-dialog.test.tsui/src/components/dock-panel-layout.test.tsui/src/components/exec-approval-card.test.tsui/src/components/exec-approval.test.tsui/src/components/file-preview-modal.browser.test.tsui/src/components/file-preview-modal.test.tsui/src/components/identity-avatar-view.test.tsui/src/components/input-dialog.test.tsui/src/components/link-reader-content.test.tsui/src/components/lobster-dex.test.tsui/src/components/login-gate.test.tsui/src/components/markdown-cjk-html.test.tsui/src/components/markdown-clipboard.browser.test.tstest(gateway): deslop x1236 tests
src/gateway/server-methods/sessions-github.test.tssrc/gateway/server-methods/sessions-reactions.test.tssrc/gateway/server-methods/sessions-read-cache.test.tssrc/gateway/server-methods/sessions-read-diagnostics.test.tssrc/gateway/server-methods/sessions-reset-subagent-cleanup.test.tssrc/gateway/server-methods/sessions-rewind.storage.test.tssrc/gateway/server-methods/sessions-rewind.test.tssrc/gateway/server-methods/sessions-search.test.tssrc/gateway/server-methods/sessions.abort-agent-scope.test.tstest(codex): deslop x1238 tests
extensions/codex/src/app-server/model-catalog.test.tsextensions/codex/src/app-server/models.test.tsextensions/codex/src/app-server/native-auth.test.tsextensions/codex/src/app-server/native-execution-policy.test.tsextensions/codex/src/app-server/native-skill-isolation.test.tsextensions/codex/src/app-server/native-subagent-notification.test.tsextensions/codex/src/app-server/native-subagent-submission-store.test.tsextensions/codex/src/app-server/openclaw-owned-tool-runtime-contract.test.tsextensions/codex/src/app-server/plugin-activation.test.tsextensions/codex/src/app-server/plugin-metadata-cache.test.tsextensions/codex/src/app-server/plugin-thread-attestation.test.tsextensions/codex/src/app-server/protocol-validators.test.tsextensions/codex/src/app-server/provider-capabilities.test.tsextensions/codex/src/app-server/rate-limits.test.tsextensions/codex/src/app-server/remote-workspace-media.test.tsextensions/codex/src/app-server/remote-workspace-path.test.tstest(state): deslop x1252 tests
src/state/agent-database-admission.test.tssrc/state/agent-deletion-cleanup.test.tssrc/state/agent-deletion-journal-initialization.test.tssrc/state/claw-package-adoption.test.tssrc/state/local-onboarding-state.test.tssrc/state/onboarding-recommendations.test.tssrc/state/openclaw-agent-admission-order.diagnostic.test.tssrc/state/openclaw-agent-db-disposal.test.tssrc/state/openclaw-agent-db-maintenance.test.tssrc/state/openclaw-agent-db-open-authority.test.tssrc/state/openclaw-agent-db-write.test.tssrc/state/openclaw-agent-participants-migration.test.tssrc/state/openclaw-agent-worker-store.test.tssrc/state/openclaw-database-maintenance.test.tssrc/state/openclaw-database-preflight-agent-scheduler.test.tssrc/state/openclaw-database-verify.process.test.tstest(agents): deslop x1244 tests
src/agents/code-mode-swarm.test.tssrc/agents/codex-app-server.extensions.test.tssrc/agents/codex-mcp-config.test.tssrc/agents/codex-native-web-search.test.tssrc/agents/command-poll-backoff.test.tssrc/agents/compaction-real-conversation.test.tssrc/agents/configured-provider-fallback.test.tssrc/agents/context-window-guard.test.tssrc/agents/conversation-capability-profile.test.tssrc/agents/copilot-routing.test.tssrc/agents/current-time.test.tssrc/agents/date-time.test.tssrc/agents/delegation-capability.test.tstest(codex): deslop x1250 tests
extensions/codex/src/session-catalog-archive.test.tsextensions/codex/src/session-catalog-cold-start.test.tsextensions/codex/src/session-catalog-create.test.tsextensions/codex/src/session-catalog-diagnostics.test.tsextensions/codex/src/session-catalog-events.test.tsextensions/codex/src/session-catalog-index.test.tsextensions/codex/src/session-catalog-listing-cache.test.tsextensions/codex/src/session-catalog-listing.test.tsextensions/codex/src/session-catalog-node-continue.test.tsextensions/codex/src/session-catalog-node-listing.test.tsextensions/codex/src/session-catalog-provenance.test.tsextensions/codex/src/session-cli.test.tsextensions/codex/src/session-rollout-snapshot.test.tsextensions/codex/src/session-upstream-activity.test.tstest(hooks): deslop x1256 tests
src/hooks/configured.test.tssrc/hooks/frontmatter.test.tssrc/hooks/gmail-ops.test.tssrc/hooks/gmail-setup-utils.test.tssrc/hooks/gmail-watcher-lifecycle.test.tssrc/hooks/gmail-watcher.test.tssrc/hooks/gmail.test.tssrc/hooks/import-url.test.tssrc/hooks/install.test.tssrc/hooks/internal-hooks.test.tssrc/hooks/llm-slug-generator.test.tssrc/hooks/loader.test.tssrc/hooks/message-hook-mappers.test.tssrc/hooks/workspace.test.tsReplay cleanup for x1256:
src/test-utils/npm-spec-install-test-helpers.ts.test(cli): deslop x1251 tests
src/cli/update-cli/update-command-generation.test-support.tssrc/cli/update-cli/update-command-plugins.test-support.tssrc/cli/update-cli/update-command-restart-outcome.test-support.tssrc/cli/update-cli/update-command-rollback-report.test.tssrc/cli/update-cli/update-command-rollback.test.tssrc/cli/update-cli/update-command-run.test.tssrc/cli/update-cli/update-command-service-maintenance.test.tssrc/cli/update-cli/update-command-service-publication.test.tssrc/cli/update-cli/update-command-service-recovery.test-support.tssrc/cli/update-cli/update-command-service-transition.test-support.tssrc/cli/update-cli/update-command-service.integration.test.tssrc/cli/update-cli/update-command-task-delivery.test.tssrc/cli/update-cli/update-command-terminal-outcome.test.tssrc/cli/update-cli/update-command-triage.test.tssrc/cli/update-cli/update-command-verification.test.tssrc/cli/update-cli/update-command.test.tssrc/cli/update-cli/update-finalization-lifecycle.test.tssrc/cli/update-cli/update-recovery-guidance.test.tssrc/cli/update-cli/update-repair-package-activation.test.ts