Repository navigation
test(core,plugins): remove low-value tests (batch d015) - #167073
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, 6:17 AM ET / 10:17 UTC (Revision 2). ClawSweeper reviewWhat this changesThis PR consolidates overlapping test suites, removes redundant scenarios, and transfers test-selection entries to surviving suites. Review scores
ProductKind: Test only · Worth it: Yes Merge readiness⛔ Blocked before merge - 1 item remains The two prior CI-selection findings are resolved. No new concrete blocking defect was established in the inspected consolidation; this maintainer-authored PR remains useful work rather than a closure candidate. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherOpenClaw’s regression suites exercise runtime contracts with fixtures and isolated processes. CI inventories and policy watches select the suites that should run when source or dependency inputs change. flowchart TD
A[Source and dependency changes] --> B[CI test selection]
B --> C[Surviving regression suites]
D[Fixtures and isolated processes] --> C
C --> E[Contract assertions]
E --> F[Validation results]
Technical reviewBest possible solution: Keep meaningful regressions at their canonical test owners and preserve their CI-selection guarantees while reducing duplicate execution. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reduces test duplication rather than reporting a runtime bug; the prior selection defects can be checked directly in the revised inventories. Is this the best way to solve the issue? Yes for the inspected consolidation and routing corrections: surviving suites retain the examined contracts without adding production seams. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 245b7f6fb2ad. Provenance checked
TestingProof path: in-process harness. Added test files: 62. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -4542, Other -6. Total -4548 across 66 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 HistoryReview history (1 earlier review cycle)
|
Port bf205b2de7d4c75892b7aa159ede27acd352b26e while preserving the newer lane cancellation cases and abort-reason assertions. Validation: 97 tests passed across seven retained files on Blacksmith Testbox from fresh origin/main f66ca12 plus all ten resolved shard paths. Three deleted suite paths were excluded from the executable test list after the launcher rejected those nonexistent targets. No tests skipped, timeout increases, or assertion weakening during the port. Targeted oxlint and oxfmt checks passed, git diff --check passed, and independent review found no actionable P0-P2 findings.
839371b to
3d9cf77
Compare
) * test(commands): deslop w1136 tests * test(telegram): deslop w1144 tests * test(sessions): deslop w1146 tests * test(infra): deslop w1143 tests * test(secrets): deslop w1145 tests * test(browser): deslop w1151 tests * test(auto-reply): deslop w1147 tests Port bf205b2de7d4c75892b7aa159ede27acd352b26e while preserving the newer lane cancellation cases and abort-reason assertions. Validation: 97 tests passed across seven retained files on Blacksmith Testbox from fresh origin/main 92d3bdb plus all ten resolved shard paths. Three deleted suite paths were excluded from the executable test list after the launcher rejected those nonexistent targets. No tests skipped, timeout increases, or assertion weakening during the port. Targeted oxlint and oxfmt checks passed, git diff --check passed, and independent review found no actionable P0-P2 findings. * test(memory-core): deslop w1152 tests * test(snapshot): deslop w1154 tests * test(transcripts): deslop w1148 tests * test: retain independent boundary coverage in d015 * test: preserve cleanup coverage on current main
What Problem This Solves
Batch d015 removes duplicated test scenarios and consolidates split suites whose remaining cases protect the same owners, reducing the maintenance and execution cost of the test suite.
User Impact
No user-visible behavior changes. Production code is unchanged. The replay preserves current-main changes, including the newer steering-custody regression. Retention review restored the private-final, WebSocket, transcript-search and query-budget suites, plus distinct sandbox denial, HTTP lockdown and binary upload, linked-Git rollback, Doctor recovery ordering and state relocation, POSIX snapshot creation, transcript identity, next-date auto-start, and bounded scoped-metadata cases.
Why This Change Was Made
Replay the ten reviewed campaign shards in their original order onto main. All ten applied; none were skipped and no conflicts required resolution. After initial hosted CI exposed an interaction with newly landed main tests, the batch was rebased once onto
6aa926265782b5cf59bf7c1296b877debeb029f9, also without conflicts. A follow-up retention correction drops the private-final, WebSocket, transcript-search, and query-budget deletions and restores the distinct cases listed above. These cases protect contracts that statement/branch coverage totals alone cannot establish. The mock-export baseline shrinks. Test inventories and policy watches transfer protected selection to the surviving sanitizer/shutdown suites and remove obsolete deleted-file entries.The final batch changes 66 paths: test code +4,310/-8,847 lines (net -4,537); test planning and inventories +2/-13 (net -11); production +0/-0. No CODEOWNERS patterns match the changed paths.
Evidence
oxfmt --write, plainoxlint -c .oxlintrc.json, andgit diff --check: passed.CI=1 pnpm test <44 touched test files>: 665 passed, two existing platform skips across 12 groups (720.38 seconds of test orchestration).OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <changed paths>attempt: infrastructure gap, subsequently closed by the successful recovery run below. After source preparation completed, leasetbx_01m4dad7g879vg9w1qz2rjdgq3timed out after 15 minutes queued without a runner; automatic cleanup stopped it and native status confirmed completion. No changed checks executed; the wrapper exited 1 during runner admission. All focused tests that executed passed; the required hostedopenclaw/ci-gateremains the merge gate.reply-run-registry.visibility.test.ts: a newly landed main regression uses an error-class import removed by the earlier reduction, and the narrowed boolean table retained four unnecessary explicit-false comparisons. The import and equivalent boolean checks were repaired after the base refresh. The exact affected suite then passed 23 tests, and the complete changed-file gate passed on fresh Testbox proof, including all 27 core test-type graphs, extension/script types, dead-export scans, and core/extension/script lint. This closes the initial changed-gate infrastructure gap.Coverage below is the original per-shard comparison, not a newly measured aggregate coverage claim. Each shard stayed within the 1% covered-statement/branch gate. The w1136 summary report was stale: its later finish log and successful remote coverage snapshot confirm unchanged totals. Some original shard changed checks were interrupted by Testbox infrastructure; the batch validation above reports the current replay separately.
The original shard LOC counts include their full assigned file sets and precede the retention corrections; the net batch delta above is measured from the final candidate against this PR's base. Coverage does not measure spawned process/native worker internals, and Linux results do not establish native Windows/macOS behavior. Declaration targets below 30% were accepted to retain independent regressions, authority boundaries, and ordering proof.
Files touched by each shard
test(commands): deslop w1136 tests
covered statements 5994 -> 5994 (0); branches 3510 -> 3510 (0); functions 1225 -> 1225 (0)scripts/lib/ci-proof-test-inventory.mtssrc/commands/doctor-config-preflight.admission.process.test.tssrc/commands/doctor-config-preflight.legacy-copy.test.tssrc/commands/doctor-config-preflight.legacy-owner.process.test.tssrc/commands/doctor-config-preflight.pending-read.test.tssrc/commands/doctor-config-preflight.plugin-deferral.test.tssrc/commands/doctor-config-preflight.plugin-persistence.test.tssrc/commands/doctor-config-preflight.pristine.process.test.tssrc/commands/doctor-config-preflight.process.test-support.test.tssrc/commands/doctor-config-preflight.process.test.tssrc/commands/doctor-config-preflight.recovery.test.tssrc/commands/doctor-config-preflight.refusal.process.test.tssrc/commands/doctor-config-preflight.runtime-owners.test.tstest(telegram): deslop w1144 tests
covered statements 5823 -> 5823 (0); branches 4625 -> 4625 (0); functions 1103 -> 1103 (0)config/test-mock-exports-baseline.txtextensions/telegram/src/bot-message-context.dm-session.test.tsextensions/telegram/src/bot-message-context.media-carriers.test.tsextensions/telegram/src/bot-message-context.prompt-context.test.tsextensions/telegram/src/outbound-adapter.normalize-payload.test.tsextensions/telegram/src/outbound-adapter.presentation.test.tsextensions/telegram/src/outbound-adapter.sanitize.test.tsextensions/telegram/src/outbound-adapter.telegram-http.test.tsscripts/lib/ci-proof-test-inventory.mtstest(sessions): deslop w1146 tests
covered statements 7196 -> 7196 (0); branches 4113 -> 4112 (-1); functions 1661 -> 1661 (0)src/config/sessions/disk-budget.artifacts.test.tssrc/config/sessions/disk-budget.physical-usage.test.tssrc/config/sessions/disk-budget.test.tssrc/config/sessions/disk-budget.zero-byte.test.tssrc/config/sessions/session-cold-storage.preflight.test.tssrc/config/sessions/session-cold-storage.publication.test.tstest(infra): deslop w1143 tests
covered statements 4008 -> 4008 (0); branches 2359 -> 2358 (-1); functions 763 -> 763 (0)src/infra/package-update-swap.bounds.test.tssrc/infra/package-update-swap.diagnostics.test.tssrc/infra/package-update-swap.freebsd.test.tssrc/infra/package-update-swap.integrity.test.tssrc/infra/package-update-swap.launcher.test.tssrc/infra/package-update-swap.ownership.test.tssrc/infra/package-update-swap.test.tssrc/infra/package-update-swap.windows.test.tstest(secrets): deslop w1145 tests
covered statements 729 -> 729 (0); branches 374 -> 374 (0); functions 133 -> 133 (0)src/secrets/egress-proxy/proxy-server.http.test.tssrc/secrets/egress-proxy/proxy-server.lifecycle.test.tssrc/secrets/egress-proxy/proxy-server.test.tstest(browser): deslop w1151 tests
covered statements 1227 -> 1227 (0); branches 1165 -> 1165 (0); functions 205 -> 205 (0)config/test-mock-exports-baseline.txtextensions/browser/src/browser-tool.routing-guidance.test.tsextensions/browser/src/browser-tool.tabs.test.tsextensions/browser/src/browser-tool.test.tstest(auto-reply): deslop w1147 tests
covered statements 4173 -> 4171 (-2); branches 3267 -> 3267 (0); functions 780 -> 779 (-1)src/auto-reply/reply/agent-runner.media-ownership.test.tssrc/auto-reply/reply/agent-runner.stalled-turn.test.tssrc/auto-reply/reply/reply-run-registry.abort.test.tssrc/auto-reply/reply/reply-run-registry.backend-ready.test.tssrc/auto-reply/reply/reply-run-registry.control-owner.test.tssrc/auto-reply/reply/reply-run-registry.preparation.test.tssrc/auto-reply/reply/reply-run-registry.retained-singleton.test.tssrc/auto-reply/reply/reply-run-registry.successor-barrier.test.tssrc/auto-reply/reply/reply-run-registry.visibility.test.tstest(memory-core): deslop w1152 tests
covered statements 3461 -> 3461 (0); branches 2111 -> 2111 (0); functions 724 -> 724 (0)extensions/memory-core/src/memory/manager.borrowed-connection.test.tsextensions/memory-core/src/memory/manager.fts-only-reindex.test.tsextensions/memory-core/src/memory/manager.legacy-migration-cleanup.test.tsextensions/memory-core/src/memory/manager.reindex-recovery.test.tstest(snapshot): deslop w1154 tests
covered statements 614 -> 614 (0); branches 332 -> 332 (0); functions 77 -> 77 (0)src/snapshot/local-repository.test.tssrc/snapshot/local-repository.windows-acl-probe.test.tstest(transcripts): deslop w1148 tests
covered statements 1413 -> 1413 (0); branches 923 -> 922 (-1); functions 342 -> 342 (0)src/transcripts/library.async.test.tssrc/transcripts/library.test.tssrc/transcripts/status.metadata.test.tssrc/transcripts/status.occupancy.test.tssrc/transcripts/status.producer.shutdown.test.tssrc/transcripts/status.producer.test.tssrc/transcripts/status.provider-reload.test.tssrc/transcripts/status.test.tsscripts/lib/ci-policy-test-watch.mtstest/vitest/vitest.database-worker-core-paths.mjsReview dispositions
Two full-diff reviews identified retention risks that coverage totals alone missed. Accepted findings were resolved by keeping the independent contracts summarized above; a fresh review of the complete correction patch returned no actionable P0–P2 findings.
The hosted review also identified two real selection gaps. The Telegram sanitizer destination now inherits the deleted suite's protected classification, and SQLite/transcript-worker policy changes select the surviving shutdown suite. Three stale deleted-file inventory entries were removed. The three existing planner suites passed all 94 tests on Testbox (152.74 seconds). Direct planner execution confirmed the sanitizer suite for both package.json and pnpm-lock.yaml changes, and the surviving transcript status suite for SQLite worker and transcript-worker changes.
Rejected findings were checked against the owners and remaining tests:
forwardedRequestauth matrix. Unresolved URL/header sentinels shareswapRequestText; worker/lifecycle tests retain no-origin-contact rejection, and WebSocket tests retain URL substitution wiring.createVerifiedSqliteSnapshot, which the repository calls through the canonical snapshot-copy owner. Repository restore-content coverage remains.preserveKeysfixture used an unarchived row that eviction independently excludes. Restoring it would preserve a non-discriminating negative control.