Repository navigation
test(gateway,agents,ui): remove low-value tests (batch d020) - #167300
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: blocked before merge. Reviewed October 8, 2026, 11:38 AM ET / 15:38 UTC. ClawSweeper reviewWhat this changesThis PR consolidates test suites, removes redundant variants, and updates test inventories and shrink-only baselines. Review scores
ProductKind: Test only · Worth it: Yes Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this is useful, maintainer-sponsored test cleanup that remains distinct from current main. Source review found no concrete blocking defect; final-head execution evidence remains limited. Priority: P3 Before merge
FindingsNone. Provenance
Agent review detailsHow this fits togetherOpenClaw's automated tests exercise agent execution, Gateway lifecycle, state storage, setup, and plugin settings. Test inventories assign these suites to CI lanes, which report whether the covered contracts still hold. flowchart TD
A[Agent and Gateway contracts] --> C[Retained test suites]
B[Setup and plugin settings contracts] --> C
C --> D[Test inventory and lane selection]
D --> E[CI execution]
E --> F[Regression results]
Technical reviewBest possible solution: Keep distinct regressions in their existing owner suites and use the normal exact-head CI gate to validate the combined cleanup. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses duplicate test maintenance rather than a reported runtime defect. Is this the best way to solve the issue? Yes: consolidating cases into existing suites and retiring obsolete routing is an appropriate approach; source inspection found no concrete introduced failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 73fb34cfcf81. Provenance checked
TestingProof path: in-process harness. Added test files: 49. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -3113, Other -5. Total -3118 across 74 files. 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 |
…w#167300) * test(wizard): deslop w1190 tests * test(gateway): deslop w1182 tests * test(web-fetch): deslop w1188 tests * test(codex): deslop w1184 tests * test(auto-reply): deslop w1185 tests * test(state): deslop w1187 tests * test(ui): deslop w1191 tests * test(doctor): deslop w1186 tests * test(agents): deslop w1183 tests * test(gateway): deslop w1195 tests * test(codex): retain reviewer endpoint admission boundary * test: retain independent authority and recovery cases
What Problem This Solves
This maintainer-requested test-reduction batch removes redundant test variants and duplicate file-level setup across setup, Gateway, web fetch, native harness, auto-reply, state, plugin settings, Doctor, and authentication tests.
User Impact
No user-visible or runtime production behavior changes. Remaining tests preserve distinct authority, lifecycle, ordering, and regression coverage. Tests lose 3,107 lines net (+4,117 / -7,224); test inventories and shrink-only baselines lose another 11 lines. Runtime production LOC: +0 / -0.
Why This Change Was Made
Batch d020 replays ten already-validated campaign shards onto current main. All ten patches initially applied unchanged (stable patch IDs match), with no conflicts or skipped commits. Review retained five existing cases: Guardian endpoint rejection before thread creation, explicitly disabled required-root tools, reverse-order catalog install intent, unapplied runtime-failure handling, and partial uninstall failure after inventory disappearance. These are the only dropped deletion hunks; no production changes were introduced. Nineteen deleted test files are consolidated into existing owner suites or have redundant coverage removed; obsolete routing entries are removed with them. The two baseline edits only remove entries.
The original shard runs measured covered statements and branches before and after each reduction; every loss remained below 1%. These are original in-shard coverage results, not a fresh coverage measurement of the combined replay. No shard reached the campaign's 30% declaration-reduction target: the retained contracts took priority over that target. Some nested-project case-coverage probes used the campaign's documented fallback; aggregate coverage and focused tests still ran.
No changed path matches the current CODEOWNERS rules.
Evidence
git diff --check: passed.tbx_01m4dzy9wb6b24b15ae8fqcphyremained queued without a runner and was stopped before incorporating the first review fix. AWS fallbackcbx_f2fb2d55f42freached a sync-quiet watchdog; that source transfer was stopped when review required further changes. Its result recordedcommandMs: 0; no test or changed-check payload executed. Both leases were stopped. The final focused tests and changed-check gate therefore remain unverified remotely at publication. This batch uses the campaign's infrastructure-gap allowance; hosted CI is the merge gate.CI=1 pnpm test <49 retained changed test paths> test/scripts/ci-proof-test-inventory.test.ts, followed byOPENCLAW_TESTBOX=1 OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 CI=1 node scripts/check-changed.mjs -- <all changed paths>on the remote candidate.Review dispositions: retained the five cases above. Managed-hook refusal remains covered through real startup in
run-attempt-native-process-authority.test.ts; ACP-shaped keys without current metadata remain covered through realsessionsCommandinsessions.acp-model-display.test.ts. The removed memory-audience fixture stripped its fabricated audience before delegation and only asserted mocked argument forwarding; real host-bound currency checks remain inhook-context.test.tsand provider audience tests.Additional review dispositions: ambient expiry retained refresh material and reached the same planner state; unavailable-profile ambient denial stays in
provider-model-route-auth.test.ts. Adopted failure notices use the normal final-delivery suppression, covered by the send-policy and message-tool-only dispatch suites. Structural SQLite corruption refusal and byte preservation remain insqlite-index-corruption.test.tsand CHECK classification insqlite-integrity.test.ts. ACP disposal uses the shared shutdown-step warning/continuation owner, retained through cron and subsystem failures; ACP-specific ordering remains tested. Icon retries remain in the icon-loader and credential-ordering owners. Publication before result application and retry after enable failure remain covered by the shared mutation owner and browser runtime tests. The partial-uninstall failure row was retained because its error must survive the disappearance of the plugin row and selected local detail route.The final restoration diff passed independent autoreview at P2; all accepted findings are addressed, and the rejected findings are explained above.
Per-shard files, test LOC/declaration deltas, and original coverage totals
w1190
covered statements 1218 -> 1218 (0); branches 821 -> 821 (0); functions 236 -> 236 (0)Files touched:
src/wizard/setup.inference-recovery.integration.test.ts,src/wizard/setup.migration-transaction.test.ts,src/wizard/setup.test.ts,src/wizard/setup.workspace-validation.test.ts.w1182
covered statements 2104 -> 2104 (0); branches 1327 -> 1327 (0); functions 301 -> 301 (0)Files touched:
scripts/lib/ci-proof-test-inventory.mts,src/gateway/conversation-list.test.ts,src/gateway/conversation-list.worker-read.test.ts,src/gateway/session-sharing-preparation.admission.test.ts,src/gateway/session-sharing-preparation.creation-settlement.test.ts,src/gateway/session-sharing-preparation.test.ts,src/gateway/session-utils-model.acp-owner.test.ts,src/gateway/session-utils-model.identity.test.ts,src/gateway/session-utils-model.thinking-default.test.ts,test/vitest/vitest.gateway-server-paths.mjs.w1188
covered statements 588 -> 588 (0); branches 328 -> 328 (0); functions 77 -> 77 (0)Files touched:
config/test-mock-exports-baseline.txt,src/agents/tools/web-fetch.cache.test.ts,src/agents/tools/web-fetch.cf-markdown.test.ts,src/agents/tools/web-fetch.headers.test.ts,src/agents/tools/web-fetch.provider-fallback.test.ts,src/agents/tools/web-fetch.signal.test.ts,src/agents/tools/web-fetch.ssrf.test.ts.w1184 (landed counts include the restored endpoint admission test; coverage below is from the original shard reduction)
covered statements 12400 -> 12340 (-60); branches 9767 -> 9700 (-67); functions 2383 -> 2374 (-9)Files touched:
extensions/codex/src/app-server/run-attempt.fork-provenance.test.ts,extensions/codex/src/app-server/run-attempt.hooks.test.ts,extensions/codex/src/app-server/run-attempt.input-attachments.test.ts,extensions/codex/src/app-server/run-attempt.native-config.test.ts,extensions/codex/src/app-server/run-attempt.native-hook-fallback.test.ts,extensions/codex/src/app-server/run-attempt.native-hook-relay.test.ts,extensions/codex/src/app-server/run-attempt.notification-burst.test.ts,extensions/codex/src/app-server/run-attempt.prompt-hook-audience.test.ts,extensions/codex/src/app-server/run-attempt.protocol-validation.test.ts,test/vitest/vitest.extension-database-workers-paths.mjs.w1185
covered statements 3937 -> 3936 (-1); branches 2814 -> 2813 (-1); functions 797 -> 797 (0)Files touched:
src/auto-reply/reply/dispatch-from-config.restart-tombstone.test.ts,src/auto-reply/reply/dispatch-from-config.source-completion.test.ts,src/auto-reply/reply/dispatch-from-config.terminal-recovery.test.ts,src/auto-reply/reply/dispatch-from-config.tts-stream.test.ts,src/auto-reply/reply/dispatch-from-config.turn-model-selection-differential.test.ts.w1187
covered statements 3276 -> 3276 (0); branches 1633 -> 1633 (0); functions 647 -> 647 (0)Files touched:
src/state/openclaw-state-lease-heartbeat.activation.test.ts,src/state/openclaw-state-lease-heartbeat.diagnostics.test.ts,src/state/openclaw-state-lease-heartbeat.lifetime.test.ts,src/state/openclaw-state-lease-heartbeat.startup.test.ts,src/state/openclaw-state-lease-heartbeat.test.ts,src/state/openclaw-state-read-worker.mcp.test.ts,src/state/openclaw-state-read-worker.settlement.test.ts,src/state/openclaw-state-read-worker.test.ts,test/vitest/vitest.database-worker-core-paths.mjs.w1191 (landed counts include retained install-intent and failure cases; original coverage totals follow)
covered statements 4241 -> 4233 (-8); branches 3198 -> 3181 (-17); functions 924 -> 922 (-2)Files touched:
ui/src/pages/plugins/plugins-page.generations.test.ts,ui/src/pages/plugins/plugins-page.icon-loading.test.ts,ui/src/pages/plugins/plugins-page.icons.test.ts,ui/src/pages/plugins/plugins-page.mcp-auth.test.ts,ui/src/pages/plugins/plugins-page.persisted-install.test.ts,ui/src/pages/plugins/plugins-page.routing.test.ts,ui/src/pages/plugins/plugins-page.runtime.test.ts,ui/src/pages/plugins/plugins-page.schema.test.ts,ui/src/pages/plugins/plugins-page.settings-navigation.test.ts,ui/src/pages/plugins/plugins-page.test.ts.w1186
covered statements 2956 -> 2956 (0); branches 1846 -> 1846 (0); functions 560 -> 560 (0)Files touched:
src/commands/doctor-maintenance.admission-freshness.test.ts,src/commands/doctor-maintenance.admission-warm.test.ts,src/commands/doctor-maintenance.database-writes.test.ts,src/commands/doctor-maintenance.finish-revalidation.test.ts,src/commands/doctor-maintenance.foreground-update.test.ts,src/commands/doctor-maintenance.installation.test.ts,src/commands/doctor-maintenance.native-identity.test.ts,src/commands/doctor-maintenance.readiness.test.ts,src/commands/doctor-maintenance.schema-preflight.test.ts,src/commands/doctor-maintenance.service-identity.test.ts,src/commands/doctor-maintenance.service-inspection.test.ts,src/commands/doctor-maintenance.serving-owner.test.ts.w1183
covered statements 2452 -> 2436 (-16); branches 2110 -> 2097 (-13); functions 471 -> 469 (-2)Files touched:
config/max-lines-baseline.txt,src/agents/runtime-plan/prepare-auth.ambient-credential.test.ts,src/agents/runtime-plan/prepare-auth.metadata.test.ts,src/agents/runtime-plan/prepare-auth.route-intent.test.ts,src/agents/runtime-plan/prepare-auth.test.ts.w1195
covered statements 10818 -> 10821 (+3); branches 5499 -> 5501 (+2); functions unchangedFiles touched:
src/gateway/server-close.plugin-failure.test.ts,src/gateway/server-close.test.ts.