Repository navigation
test(agents,gateway,plugins): remove low-value tests (batch d304) - #178143
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. |
0bfbf0a to
bc0c2c0
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR consolidates test fixtures and assertions across agent, Gateway, plugin, Codex, and test-routing suites. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed test consolidation has clear maintenance value, and no actionable defect was established. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherVitest suites supply synthetic inputs to runtime owners and test-routing code, then check outcomes, persistence, rejection, and lifecycle ordering. flowchart LR
A[Synthetic scenarios] --> B[Shared test fixtures]
B --> C[Runtime owners]
C --> D[Contract assertions]
D --> E[CI test jobs]
Technical reviewBest possible solution: Merge the test consolidation when the existing exact-head CI gate passes. Do we have a high-confidence way to reproduce the issue? This is a test-only cleanup, so no product bug reproduction applies; no target code was executed during this read-only review. Is this the best way to solve the issue? Shared fixtures and table-driven cases fit the stated cleanup, and the inspected lifecycle, rejection, and persistence assertions retain their distinct purposes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 524e645d83c2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -4679, Other -11. Total -4690 across 60 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 20, 2026, 3:15 AM ET / 07:15 UTC. |
…enclaw#178143) * test(agent): deslop z0013 tests * test(agent): deslop z0013 tests * test(scripts): deslop z0014 tests * test(scripts): deslop z0014 tests * test(scripts): deslop z0014 tests * test(gateway): deslop z0011 tests * test(gateway): deslop z0011 tests * test(gateway): deslop z0011 tests * test(plugins): deslop z0015 tests * test(plugins): deslop z0015 tests * test(plugins): deslop z0015 tests * test(gateway): deslop z0017 tests * test(gateway): deslop z0017 tests * test(gateway): deslop z0017 tests * test(agents): deslop z0020 tests * test(agents): deslop z0020 tests * test(agents): deslop z0020 tests * test(subagents): deslop z0016 tests * test(subagents): deslop z0016 tests * test(subagents): deslop z0016 tests * test(auto-reply): deslop z0019 tests * test(auto-reply): deslop z0019 tests * test(auto-reply): deslop z0019 tests * test(codex): deslop z0018 tests * test(codex): deslop z0018 tests * test(codex): deslop z0018 tests * test(codex): deslop z0022 tests * test: repair d304 fixtures against current contracts * test(gateway): retain the memory fixture type boundary * test: preserve d304 fixture bindings and mock isolation * test: prune d304 mock export baseline entries
What Problem This Solves
Reduces duplicated test fixtures and repetitive assertions across agent, gateway, plugin, and Codex suites in campaign batch d304.
User Impact
No intended runtime or public API change. This batch changes tests and test-support files only; distinct authority, recovery, cleanup, ordering, and protocol behavior remains the retention criterion.
Why This Change Was Made
Replays 27 supplied commits onto pinned main
3fceb15ea5a45ce2d08e148a4289bdf0bd29e6e4, consolidating setup and table-driven scenarios. Production LOC: +0 / -0. Test and test-support LOC: +11,719 / -17,318, net -5,599, across 59 test/support files. An additional 11 baseline lines are removed fromconfig/test-mock-exports-baseline.txt; total diff: 60 files, +11,719 / -17,329.Replay decisions
819267ec0916ce8e0d0bdf2acee5d568d36c0abc,4e2b286709763dc0ee26f7c317091252382eed3c, and334a1244a7c82a64390dbaec67bd76d48fc02e4b. They depend on the unlisted predecessorb61c6688c0a3088481269e4037d35737439814d2; replaying them directly conflicted with current session tests. No prerequisite commits imported.src/plugins/update.test.tschanges fromfd1da33cee7d058dab23bd4e144e7d13adb992dband0705e42c958d169f3d6484be6d9d98865bd19fd8because the rewrites conflicted with newer consent, repair, release-pin, alias-migration, and externalization cases. Their independent web-provider changes remain.plugin-thread-config.test.tschanges to preserve newer app-policy and workspace coverage. Kept all five current-main managed-hook rejection variants inprotocol-validators.test.ts; retained the non-overlapping cleanup.server-close-retirement.test-support.ts; retained the batch scheduler cleanup and removed its now-unused import. The remaining rebase applied cleanly.server-close.memory.test-support.tsrewrite after CI showed its directtypeof importpulled Memory Core into the core compiler graph and changed the inferred manager contract. The file is byte-identical to pinned main; the original plugin fixture boundary is retained.Evidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <58 existing changed files>: passed.node_modules/.bin/oxlint -c .oxlintrc.json <58 existing changed files>: passed, exit 0.git diff --check 3fceb15ea5a45ce2d08e148a4289bdf0bd29e6e4: passed.Per operator CI-only instruction: no local Vitest, check-changed, typechecking, coverage, Crabbox, or Testbox runs. Hosted
openclaw/ci-gateis the behavioral gate. Local test wall times are unavailable.Fresh-head CI run 39379570542 exposed batch-caused missing helper references, duplicate fixture fields, tuple inference, async callback/binding lint, and an over-strict nested web-result matcher. Repaired in
573f87053a09b442c0fa480990992960f41a807a; plain lint and formatting passed on the 11 repaired files. New CI remains the proof; tests/typechecks were not rerun locally.The same run reported memory-core import-graph leakage and an unbound method assertion in the untouched
server-close.memory.test.ts. Source inspection traced both to the changed memory helper's inferred types. Its rewrite was dropped in0db43f2d60cf4b18206d9f18bb8c50610aee612c, restoring the pinned-main fixture boundary. All identified CI causes are addressed; fresh-head CI is the required confirmation. No failures are claimed pre-existing and no admin exception is requested.Follow-up run 39380612967 exposed catch-variable typing, unbound fixture methods, a steering-fixture text mismatch, and missing mock-isolation explanations. Repaired in
12204f8d1f03957d686db65d7831742ad4e18221, preserving assertion intent and documenting why mocked runtime owners remain isolated. Formatting, plain lint, and diff-check passed on the repaired files. Pre-baseline CI: 39382088715.Full-diff autoreview completed three passes against head
0db43f2d60cf4b18206d9f18bb8c50610aee612c; all five reported findings were checked against the pinned base or dependency source and rejected for the reasons below. Incremental review of12204f8d1f03957d686db65d7831742ad4e18221completed clean with no actionable P0–P2 findings. Earlier incomplete attempts are not claimed as clean.CI run 39382088715 then requested pruning exactly those 11 stale mock-export baseline entries. Removed only the listed entries in
543a7e4054258db35181b729b4fe3b518b503579; no exceptions were added and no test code changed after the clean incremental review. Final-head CI for543a7e4054258db35181b729b4fe3b518b503579: 39383217467.Review findings checked and rejected
vi.fn(implementation)mocks, not bare mocks. The installed Vitest implementation and type documentation specify thatmockReset()restores the original implementation, including the approvals and client-retirement defaults.sourceTooltosubagent_settle; the table has no falsy explicit source tool. The claimed external-user coverage loss did not occur in this diff.pluginSummaryalready insertsmustShowInstallationInterstitial: falsewhenremotePluginIdexists. The wrapper change does not turn an omitted output field into false.cronJob, which already insertswakeMode: "next-heartbeat"before overrides. The claimed production-default coverage was not present at the base.The saved shard reports are historical first-pass checkpoints, not evidence for this rebased head. Every report explicitly says tests and coverage were not run under CI-only mode; no in-shard coverage totals are available and no <=1% coverage-loss claim is made.
Static declaration sites below count source
it/testdeclarations, not expanded table cases. Fewer sites can reflect table consolidation; runtime case counts and behavior are left to CI.Changed files by shard
z0011
src/gateway/server-close-retirement.test-support.tssrc/gateway/server-close.board.test.tssrc/gateway/server-close.lifecycle-read.test.tssrc/gateway/server-close.race.test-support.tssrc/gateway/server-close.session-signals.test.tssrc/gateway/server-connection-work.test.tssrc/gateway/server-cron.handoff.test-support.tssrc/gateway/server-cron.test.tsz0013
src/commands/agent-exec.test.tssrc/commands/agent-exec.thinking-http.test.tssrc/commands/agent.acp.test.tssrc/commands/agent.delivery-format.test.tssrc/commands/agent.test.tssrc/commands/agent.thinking.test-support.tsz0014
test/scripts/test-projects.test.tsz0015
src/plugins/update.test.tssrc/plugins/web-provider-capture-lifetime.test.tssrc/plugins/web-provider-public-artifacts.fallback.test.tssrc/plugins/web-provider-resolution-candidates.test.tssrc/plugins/wired-hooks-inbound-claim.test.tsz0016
src/agents/subagents/registry/subagent-active-context.test.tssrc/agents/subagents/registry/subagent-announcement.test-support.tssrc/agents/subagents/registry/subagent-catchup.runtime-facts.integration.test.tssrc/agents/subagents/registry/subagent-child-owner-match.test.tssrc/agents/subagents/registry/subagent-control.preparation.test.tssrc/agents/subagents/registry/subagent-control.raw-entry.test.tssrc/agents/subagents/registry/subagent-control.retirement.test.tssrc/agents/subagents/registry/subagent-control.worker.test.tsz0017
src/gateway/server.agent.gateway-server-agent-a.test.tssrc/gateway/server.chat.gateway-server-chat-history.test.tssrc/gateway/server.native-completion-authority.test.tssrc/gateway/server.sessions-send-resume.test.tssrc/gateway/server.sessions-send.test.tssrc/gateway/server.subagent-settle-replay-recovery.test-support.tssrc/gateway/server.talk-permission-parity.test-support.tsz0018
extensions/codex/src/command-plugins-available.test.tsextensions/codex/src/command-plugins-management.test-support.tsextensions/codex/src/conversation-binding-node.test.tsextensions/codex/src/conversation-binding.test-helpers.tsextensions/codex/src/conversation-binding.test.tsextensions/codex/src/conversation-turn-input.test.tsextensions/codex/src/native-plugin-tool.test.tsz0019
src/auto-reply/reply/reply-tool-authority.snapshot.test.tssrc/auto-reply/reply/reply-turn-admission.database-claim.test.tssrc/auto-reply/reply/reply-turn-admission.recovery.test.tssrc/auto-reply/reply/reply-turn-admission.store-owner.test.tssrc/auto-reply/reply/reply-turn-admission.waiting.test.tssrc/auto-reply/reply/reply-utils.test.tssrc/auto-reply/reply/restart-recovery-claim.test.tsz0020
src/agents/command/attempt-execution.cli.test.tssrc/agents/command/attempt-execution.error-propagation.test.tssrc/agents/command/attempt-execution.reply-policy.test-support.tssrc/agents/command/attempt-execution.shared.test.tssrc/agents/command/attempt-execution.test.tssrc/agents/command/delivery.settle-reset.integration.test.tsz0022
extensions/codex/src/app-server/outcome-fallback-runtime-contract.test.tsextensions/codex/src/app-server/plugin-app-cache-key.test.tsextensions/codex/src/app-server/plugin-metadata-cache.test.tsextensions/codex/src/app-server/protocol-validators.test.ts