Repository navigation
test(core): remove low-value tests (batch d169) - #174192
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 test fixtures and assertions across runtime, plugin, storage, release, Feishu, and chat suites. Example: Feishu sends a reply to chat:oc_secondary_conversation using the secondary account.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-approved cleanup open; moved and annotated mocks leave stale baseline entries that fail a required CI gate. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherThese suites feed synthetic configurations, events, and transport responses through production owners and check their outputs and lifecycle behavior. flowchart TD
A[Test fixtures] --> B[Production owners]
C[Controlled transports] --> B
B --> D[Behavior assertions]
D --> E[Hosted test checks]
A --> F[Mock export ratchet]
E --> G[CI gate]
F --> G
Technical reviewBest possible solution: Retain the fixture consolidation, prune obsolete mock fingerprints, and resolve the remaining compiler gate according to its actual diagnostic. Do we have a high-confidence way to reproduce the issue? The unchanged baseline contains fingerprints for removed mock locations, and the checker deterministically rejects stale entries; hosted CI independently reports mock-exports failure. Is this the best way to solve the issue? Shared fixtures and retained behavior assertions fit the approved cleanup direction, but their exact-fingerprint ledger must be updated with the extraction. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5719a1efd41d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests -2847. Total -2847 across 60 files. Added test files: 4. 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, 8:35 AM ET / 12:35 UTC. |
* test(chat): deslop x7108 tests * test(chat): deslop x7108 tests * test(chat): deslop x7108 tests * test(plugins): deslop x7111 tests * test(plugins): further deslop x7111 tests * test(plugins): further deslop x7111 tests * test(secrets): deslop x7116 tests * test(sqlite): deslop x7115 tests * test(sqlite): deslop x7115 tests * test(sqlite): deslop x7115 tests * test(gateway): deslop x7109 tests * test(gateway): deslop x7109 tests * test(gateway): deslop x7109 tests * test(active-memory): deslop x7117 tests * test(active-memory): deslop x7117 tests * test(active-memory): deslop x7117 tests * test(commands): deslop x7095 tests * test(infra): deslop x7118 tests * test(sessions): deslop x7125 tests * test(sessions): deslop x7125 tests * test(agents): deslop x7120 tests * test(agents): deslop x7120 tests * test(agents): deslop x7120 tests * test(feishu): deslop x7124 tests * test(feishu): deslop x7124 tests * test(release): deslop x7119 tests * test(release): further deslop x7119 tests * test(scripts): deslop x7114 tests * test: preserve current contracts in replayed fixtures * test: retain constructor coverage and tuple fixture types
What Problem This Solves
Repeated test setup and assertion scaffolding make the affected suites harder to maintain. This is the maintainer-requested d169 test-cleanup batch, replayed onto current main.
User Impact
No intended user-visible behavior change. Production code is unchanged. The change consolidates fixtures and assertions while retaining current-main regressions that the older campaign did not contain.
Why This Change Was Made
Replay the requested cleanup commits without importing earlier, unlisted campaign changes. Keep current-main tests and contracts wherever a proposed consolidation depends on a previous reduction or an obsolete helper layout.
Evidence
pnpm install --frozen-lockfile --prefer-offlinepassed.node_modules/.bin/oxfmt --write <changed files>andnode_modules/.bin/oxlint -c .oxlintrc.json <changed files>passed (exit 0).git diff --checkagainst the replay base passed.openclaw/ci-gateis the runtime/typecheck proof and merge gate.Initial replay decisions
28 of 30 source commits applied, with the following omissions. All other nonconflicting changes in applied commits were retained.
fd57e898e4f692eca72483bbed3081a68eaacb57(x7113): all seven files depend on earlier campaign helpers absent from main and overlap newer routing/session assertions. No auto-reply changes are included.5261b844be2822b65101746a48c64dc1ca869257(x7118): follow-up fixture rewrite depends on the omitted HTTP/install reductions and conflicts throughout the current files.chat-thread-input-order.test.ts. The two later commits' changes to that file are omitted; their changes to other chat files remain.plugin-lifecycle-lease.test.tschanges in all three commits. Preserve the full operation/cleanup outcome matrix, both shared-state lease cases, and runtime/cleanup waiter coverage.sqlite-schema-contract.test.tschanges in all three commits andsqlite-schema-contract.worker.test.tsin the second. Preserve the current diagnostic import boundary, vector/view regressions, and fingerprint-based cold-worker proof.models.test.tschanges from the second and third commits; retain the first cleanup and all newer capability/authentication cases.onboard-skills.test.ts; retain newer Linuxbrew and default/saved package-manager cases.infra-runtime.test.ts. Omit home-directory, HTTP body/response/lifecycle, and archive-install rewrites because they rely on earlier case reductions or changed current-main fixtures. Plain lint exposed shadowed installer callbacks ininstall-from-npm-spec.test.ts; source inspection also found its narrowed helper no longer accepted current-main callbacks, so that file's hunk was dropped.session-state-events.test.tsrewrite, preserving the first cleanup and newer watcher-session cases.model-fallback.probe.test.tsrewrite, preserving earlier cleanup plus newer overload/resource-exhaustion regressions.codex-install-assertions.test.ts; preserve current binding/session-store contract overrides and configure/plugin assertions.CI repair
The first hosted run exposed fixture regressions and type errors introduced by the replay. No failing check is treated as pre-existing. The corrected head restores the original versions of the following files, rather than weakening assertions or importing missing campaign prerequisites:
extensions/active-memory/index.test.tsextensions/feishu/src/docx-create-loopback.test.tsextensions/feishu/src/drive-comments-loopback.test.tsextensions/feishu/src/docx-table-actions.test.tssrc/agents/model-fallback.probe.test.tssrc/gateway/server-methods/model-discovery-policy.test.tssrc/gateway/server-methods/models-auth-login.catalog.integration.test.tssrc/sessions/session-lifecycle-diagnostics.test.tssrc/infra/infra-runtime.test.tssrc/secrets/provider-integrations.test.tsui/src/pages/chat/chat-submit-handoff.test.tsextensions/feishu/src/drive.test.tssrc/gateway/server-methods/models.test.tsThe new Feishu loopback helper was removed with its callers' rewrites. Remaining repairs preserve fixture contracts: the admission hook returns the wrapped result on both paths; tuple identities retain their fixed arity; the filesystem interceptor accepts the real optional flags type; a heterogeneous assertion callback is invoked explicitly; and mock-isolation annotations describe the mocked external/state boundaries. The unused generic on the chat fixture was removed. The interrupted original review is not counted as completed; the corrected head receives a fresh independent review.
Final review and ratchet correction
The independent full-diff review identified a real loss of constructor-argument forwarding coverage; the final correction restores the parameterized constructor and both argument-bearing calls. Two proposed type findings were rejected after checking current source:
RuntimeEnv.exitreturnsvoid, andTranscriptEventisunknown, so the reported incompatibilities do not apply. Review method: full-diff review plus a focused review of the corrective commit.The last CI type error is fixed at the fixture producer:
makeTargetpreserves the input tuple type. The 14 obsolete mock-export baseline rows named by CI are removed exactly; no baseline entries are added. All earlier runtime-test failures cleared in the corrected run, but the final head must satisfy fresh hosted CI.Shard inventory
Actual changed-file counts against the pinned replay base. LOC includes test-support files. Declarations are static
it/testcall sites, not executed/expanded cases; table consolidation can reduce this number without removing rows.Test files: +9,382 / −14,970 lines (net −5,588). Test support: +378 / −110 (net +268). Mock-export baseline: +0 / −14. Combined: +9,760 / −15,094 (net −5,334). Production: +0 / −0. There are 60 TypeScript test/support files and one shrink-only baseline file.
Files by shard
ui/src/pages/chat/chat-steer-order.test.ts,ui/src/pages/chat/chat-thread-fixtures.test-support.ts,ui/src/pages/chat/chat-thread-grouping.test.ts,ui/src/pages/chat/chat-thread-input-order.test.ts,ui/src/pages/chat/chat-thread-live-final.test.ts,ui/src/pages/chat/chat-thread.test.ts.src/plugins/plugin-instance-callbacks.test.ts,src/plugins/plugin-instance-invocation.test.ts,src/plugins/plugin-instance-iterables.test.ts,src/plugins/plugin-instance-value-views.test.ts,src/plugins/plugin-instance.consumer.test.ts,src/plugins/plugin-instance.retention.test.ts,src/plugins/plugin-instance.test-support.ts,src/plugins/plugin-instance.test.ts.src/secrets/resolve.test.ts,src/secrets/runtime-auth-refresh-failure.test.ts,src/secrets/runtime-auth-store-inline-refs.test.ts,src/secrets/runtime-command-secrets.test.ts,src/secrets/runtime.coverage.test.ts,src/secrets/runtime.fast-path.test.ts,src/secrets/runtime.test.ts.src/infra/sqlite-readonly-worker-session.test.ts,src/infra/sqlite-schema-facts.test.ts,src/infra/sqlite-schema-header.test.ts,src/infra/sqlite-snapshot.test-support.ts,src/infra/sqlite-snapshot.test.ts,src/infra/sqlite-snapshot.transfer.test.ts.src/gateway/server-methods/models-auth-login.test.ts.extensions/active-memory/escalation.test.ts.src/commands/onboarding-plugin-install.test.ts,src/commands/reset.sessions.test.ts,src/commands/sandbox-explain.test.ts,src/commands/sandbox.test.ts,src/commands/sessions.test.ts.src/sessions/session-diff-baseline.test.ts,src/sessions/session-key-case-preservation.test.ts,src/sessions/session-lifecycle-admission.pending.test.ts,src/sessions/session-lifecycle-admission.test.ts,src/sessions/session-state-events.test.ts,src/sessions/session-state-events.worker-boundary.test.ts.src/agents/model-fallback.e2e.test-support.ts,src/agents/model-fallback.reply-entry.e2e.test.ts,src/agents/model-fallback.run-embedded.e2e.test.ts,src/agents/model-fallback.terminal-boundary.test.ts,src/agents/model-fallback.test.ts.extensions/feishu/src/comment-handler.test.ts,extensions/feishu/src/directory.test.ts,extensions/feishu/src/dm-delivery-loopback.test.ts,extensions/feishu/src/docx.test.ts.test/scripts/release-scenarios-assertions.test.ts,test/scripts/release-stable-post.test.ts,test/scripts/release-stable.test-support.ts,test/scripts/release-stable.test.ts,test/scripts/release-telegram-candidate-archive.test.ts,test/scripts/release-tooling-identity.test.ts,test/scripts/release-upgrade-baseline.test.ts.test/scripts/codesign-mac-app.test.ts,test/scripts/codex-app-server-protocol-source.test.ts,test/scripts/codex-npm-plugin-live-audit.test.ts,test/scripts/compiler-input-snapshot.test.ts.Additional shrink-only maintenance:
config/test-mock-exports-baseline.txt.