Repository navigation
test(core,plugins): remove low-value tests (batch d196) - #174993
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR consolidates repeated test fixtures and assertions across core and plugin suites. Example: Gateway shutdown starts while schema publication is pending.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: this maintainer-directed cleanup is useful, but it removes a distinct regression protecting watcher shutdown from starting another ledger read. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherThe test suites supply controlled inputs to production owners and check routing, storage, lifecycle, and release contracts. flowchart LR
A[Test scenarios] --> B[Shared fixtures]
B --> C[Production owners]
C --> D[Controlled external boundaries]
D --> E[Observed results]
E --> F[Contract assertions]
Technical reviewBest possible solution: Keep the consolidation and preserve the no-read-after-shutdown assertion in the existing held-publication test. Do we have a high-confidence way to reproduce the issue? Source and introduction history establish the lost regression; no target code or mutation experiment was run during this read-only review. Is this the best way to solve the issue? Shared fixtures and tables are appropriate, but the shutdown read assertion protects a separate lifecycle contract and should survive consolidation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f34fed3c2823. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests -3500. Total -3500 across 63 files. Added test files: 1. View PR surface stats
Review metrics
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 Reviewed October 16, 2026, 11:25 PM ET / October 17, 2026, 03:25 UTC. |
aaf1057 to
2a1f97f
Compare
) * test(update-cli): deslop x7402 tests * test(update-cli): deslop x7402 tests * test(update-cli): deslop x7402 tests * test(outbound): deslop x7405 tests * test(outbound): deslop x7405 tests * test(memory-core): deslop x7380 tests * test(gateway): deslop x7407 tests * test(gateway): deslop x7407 tests * test(gateway): deslop x7407 tests * test(cron): deslop x7406 tests * test(cron): deslop x7406 tests * test(cron): deslop x7406 tests * test(plugins): deslop x7411 tests * test(plugins): deslop x7411 tests * test(channels): deslop x7378 tests * test(system-agent): deslop x7412 tests * test(system-agent): deslop x7412 tests * test(system-agent): deslop x7412 tests * test(agents): deslop x7415 tests * test(agents): deslop x7415 tests * test(plugins): deslop x7413 tests * test(plugins): further deslop x7413 tests * test(plugins): consolidate x7413 artifact fixtures * test(sqlite): deslop x7410 tests * test(sqlite): deslop x7410 tests * test(sqlite): deslop x7410 tests * test(agents): deslop x7409 tests * test(agents): deslop x7409 tests * test(agents): deslop x7409 tests * test(gateway): keep retained config scoping fixture explicit * test: repair CI fixtures and retain guarded mock factories * test: retain current fixture contracts in campaign replay * test(system-agent): reuse complete config snapshot fixture * test(agents): retain messaging target tool identity assertion
What Problem This Solves
Reduces repeated fixture setup and assertion plumbing across the campaign's test suites.
User Impact
No user-visible behavior change. Current-main regression cases and mock-isolation contracts are preserved.
Why This Change Was Made
Replay batch d196 onto pinned main
9a81e55bab1f36075ad44972bd1fe8e53af372b9(initial base:c0e26d5c72b949fabe1baf50c828e4793ad703a1). Of 30 supplied commits, 29 were replayed (some partially); the Docker commit was skipped. Five follow-up commits repair source-review/CI findings and drop unsafe or ratchet-incompatible cleanup.Production LOC: +0 / -0. Final test/support LOC: +9886 / -15650, net -5764, across 63 files. Lines in retained changed files: 32814 → 27050. No production seams, runtime files, config baselines, workflows, dependencies, or CODEOWNERS-owned paths changed.
Evidence
pnpm install --frozen-lockfile --prefer-offline: passed, lockfile unchanged.node_modules/.bin/oxfmt --write <changed files>: exit 0 on the initial 85-file replay and the 25-file and 11-file CI repair sets, plus the final single-file snapshot repair.node_modules/.bin/oxlint -c .oxlintrc.json <changed TS files>: exit 0 on both sets.git diff --check: exit 0.openclaw/ci-gateremains the merge gate.aaf1057744dded31f6fe28b5051850a13f6541a0. The subsequent one-line assertion restoration requires fresh current-head CI; prior-head results are not claimed as current-head proof.tool: "message"in the messaging target telemetry assertion. Rejected: the maintenance-expiry refusal type assertion was not lost; the shared assertion after both branches still requiresStateDatabaseOfflineMaintenanceError. No extra duplicate assertion was added.Final shard inventory
Measured against pinned main; includes support files. Declaration counts are static it/test/platform-alias source counts, not executed cases. Source reports describe earlier shard passes and are not final replay counts.
No in-shard coverage totals line exists in the supplied reports: each says tests/coverage were not run under CI-only instructions. No <=1% coverage-loss claim is made.
Retained files by shard
x7378
src/commands/backup-verify-manifest.update-recovery.test.tssrc/commands/channels.add.test.tsx7380
extensions/memory-core/src/dreaming-phases.test.tsextensions/memory-core/src/dreaming-startup-cleanup.test.tsextensions/memory-core/src/dreaming-state.test.tsextensions/memory-core/src/dreaming-sweep-narrative.test.tsextensions/memory-core/src/memory-budget.test.tsextensions/memory-core/src/memory-entry-origins.test.tsextensions/memory-core/src/memory-events.test.tsx7402
src/cli/update-cli/update-command-lease-service.test-support.tssrc/cli/update-cli/update-command-legacy-finalize.test.tssrc/cli/update-cli/update-command-lifecycle-repair.test-support.tssrc/cli/update-cli/update-command-maintenance-contention.test-support.tssrc/cli/update-cli/update-command-metadata-diagnostics.test.tssrc/cli/update-cli/update-command-migrated-windows.test.tssrc/cli/update-cli/update-command-mutable-signals.test.tsx7405
src/infra/outbound/session-binding-routing.worker.test.tssrc/infra/outbound/session-binding-service.async-read.test.tssrc/infra/outbound/session-binding-service.test.tssrc/infra/outbound/source-delivery-plan.test.tssrc/infra/outbound/source-reply-mirror.test.tssrc/infra/outbound/target-resolver.test.tssrc/infra/outbound/targets.test-helpers.tsx7406
src/cron/run-diagnostics.test.tssrc/cron/run-history-detail.test.tssrc/cron/run-history.test.tssrc/cron/schedule.test.tssrc/cron/scratch-store.test.tssrc/cron/service.persists-delivered-status.test.tssrc/cron/service.trigger-eval.test.tsx7407
src/gateway/tool-resolution.swarm-collector.test.tssrc/gateway/tools-invoke-http.test.tssrc/gateway/tools-invoke.policy.test-support.tssrc/gateway/update-run-watcher.interruption.test.tssrc/gateway/update-run-watcher.schema-publication.test.tsx7409
src/agents/model-selection-resolve.test.tssrc/agents/model-selection.catalog-overlay.test.tssrc/agents/model-selection.test.tsx7410
src/infra/sqlite-maintenance-fixture.test-support.tssrc/infra/sqlite-transaction.diagnostics.test.tssrc/infra/sqlite-transaction.test.tssrc/infra/sqlite-wal-checkpoint.test.tssrc/infra/sqlite-wal.checkpoint-tick.test.tssrc/infra/sqlite-wal.idle.test.tssrc/infra/sqlite-wal.test.tsx7411
src/plugins/copy-bundled-plugin-metadata.test.tssrc/plugins/current-plugin-metadata-snapshot.test.tssrc/plugins/dashboard-capabilities.test.tssrc/plugins/discovery-checkout.test.tssrc/plugins/discovery.test.tsx7412
src/system-agent/approval-intent.test.tssrc/system-agent/assistant.configured.test.tssrc/system-agent/chat-engine.test-support.tssrc/system-agent/chat-engine.test.tssrc/system-agent/chat-turn-router.operations.test.tsx7413
test/scripts/plugin-publication-artifact.test.tstest/scripts/plugin-release-git-lifecycle.test.tstest/scripts/plugin-release-pretag-pack-check.process-tree.test.tstest/scripts/plugin-sdk-api-diff.test.tsx7415
src/agents/openai-transport-stream.deepseek-and-shaping.test.tssrc/agents/openai-transport-stream.failed-sse.test.tssrc/agents/openclaw-gateway-tool.test.tssrc/agents/openclaw-owned-tool-runtime-contract.test.tsConflict and dropped-hunk record
Skipped
d00a0c35e9db9d915b324e91b802ad2edc808e33in full. Its four Docker files depended on earlier, unlisted fixture refactors such as runPromotion/publishPrepared. No unlisted commits were imported.System-agent: retained main's embedded + CLI failed-completion cases; dropped the second-pass assistant.configured/chat-engine file rewrites, and the later conflicting owner-change fixture simplification. Other system-agent cleanup remains.
Agent tools: retained config.get result scoping; dropped requester-yield rewrites to retain acknowledgment bounds/defaults, missing-child, running-process and earlier-turn cases. Dropped streaming rewrite to retain Azure policy, partial-snapshot and idless-tool-call coverage.
SQLite: retained throw + Promise-returning post-COMMIT owner failures, snapshot/Promise-operation regressions and Linux SMB/CIFS/9p cases. Dropped later overlapping sqlite-transaction rewrites and final sqlite-wal rewrite; earlier safe fixture cleanup remains.
The channels-remove conflict originally preserved main's additional deletion case in the consolidated table. Final CI-driven restoration below supersedes that resolution and retains the entire pinned-main file.
Final CI drop: restored these 12 files to pinned main because their rewritten closed mock factories violate the exact-factory ratchet. This avoids new isolation exceptions or baseline expansion; it also restores the update-finalizer assertions and their original imports intact.
src/agents/model-selection-manifest-workspace.test.tssrc/agents/model-selection.plugin-runtime.test.tssrc/agents/model-transport-debug.test.tssrc/agents/models-config.providers.auth-provenance.test.tssrc/agents/openclaw-tools.session-status.test.tssrc/cli/update-cli/update-command-lifecycle.test.tssrc/commands/channels.config-only-status-output.test.tssrc/commands/channels.list.test.tssrc/commands/channels.logs.test.tssrc/commands/channels.remove.test.tssrc/commands/channels.resolve.test.tssrc/commands/channels.status.command-flow.test.tsFresh-main conflict resolution
Rebased onto
9a81e55bab1f36075ad44972bd1fe8e53af372b9after GitHub reported a merge conflict. The sole conflict wassession-binding-service.async-read.test.ts: retained main's three method-specific deprecation warning expectations and kept compatible fixture consolidation.git range-diffconfirmed the other 33 commits are patch-equivalent. The final head is2a1f97f8afcc8dd2b75625cc98395209a7999782; hosted CI is the proof for this head.Second CI repair pass
CI run 38996003460 exposed additional fixture-contract mismatches in later type partitions, a closed-handle admission failure, and an update-watcher timeout. Under the operator's drop-uncertain-hunk rule, these ten cleanup files were restored to pinned main; no assertion was weakened and no timeout/retry added:
src/agents/model-visibility-policy.test.tssrc/infra/outbound/targets.test.tssrc/infra/sqlite-wal.agent-admission.test.tssrc/system-agent/agent-turn.test.tssrc/system-agent/approval-intent.resources.test.tssrc/system-agent/chat-turn-router.operations.test.tstest/scripts/plugin-sdk-api-release-evidence.test.tssrc/gateway/tools-invoke-http.abort.test.tssrc/plugins/doctor-contract-artifact.test.tssrc/gateway/update-run-watcher.test.tsThese restorations supersede earlier per-file resolution notes where they overlap. The new configured-inference support module then had only one consumer, so its snapshot fixture was folded back into chat-engine.test-support and the unused new module removed. Current-head CI, not the superseded failures above, determines readiness.
Final snapshot fixture repair
CI run 38996840144 cleared the earlier issues and reported one remaining type error: the restored router test supplied a partial config snapshot to the now-typed shared mock. The final head constructs it with the existing complete
configSnapshotfixture and preserves its published path/hash/config values. This small repair is the only retained change inchat-turn-router.operations.test.ts; the broader cleanup there remains dropped. Plain oxfmt, oxlint, and diff-check passed. No local typecheck/test rerun was made.