Skip to content

test(agents,gateway,plugins): remove low-value tests (batch d304) - #178143

Merged
steipete merged 31 commits into
mainfrom
tcr/land-d304-1792475331
Oct 20, 2026
Merged

steipete merged 31 commits into
mainfrom
tcr/land-d304-1792475331

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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 from config/test-mock-exports-baseline.txt; total diff: 60 files, +11,719 / -17,329.

Replay decisions

  • Skipped z0010 commits 819267ec0916ce8e0d0bdf2acee5d568d36c0abc, 4e2b286709763dc0ee26f7c317091252382eed3c, and 334a1244a7c82a64390dbaec67bd76d48fc02e4b. They depend on the unlisted predecessor b61c6688c0a3088481269e4037d35737439814d2; replaying them directly conflicted with current session tests. No prerequisite commits imported.
  • z0015: retained current-main registry-failure tables and assertions in the first update-test cleanup. Dropped src/plugins/update.test.ts changes from fd1da33cee7d058dab23bd4e144e7d13adb992db and 0705e42c958d169f3d6484be6d9d98865bd19fd8 because the rewrites conflicted with newer consent, repair, release-pin, alias-migration, and externalization cases. Their independent web-provider changes remain.
  • z0022: dropped plugin-thread-config.test.ts changes to preserve newer app-policy and workspace coverage. Kept all five current-main managed-hook rejection variants in protocol-validators.test.ts; retained the non-overlapping cleanup.
  • Rebased once after GitHub reported a conflict with advancing main. Preserved the new warm-CLI shutdown test and imports in server-close-retirement.test-support.ts; retained the batch scheduler cleanup and removed its now-unused import. The remaining rebase applied cleanly.
  • Dropped the z0011 server-close.memory.test-support.ts rewrite after CI showed its direct typeof import pulled 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.
  • Other supplied commits applied without conflicts. No runtime seams removed. The mock-export baseline is shrink-only: 11 obsolete entries were removed after their mocks gained explicit isolation explanations. No changed paths match this base's CODEOWNERS rules.

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-gate is 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 in 0db43f2d60cf4b18206d9f18bb8c50610aee612c, 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 of 12204f8d1f03957d686db65d7831742ad4e18221 completed 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 for 543a7e4054258db35181b729b4fe3b518b503579: 39383217467.

Review findings checked and rejected

  • Mock defaults: these are vi.fn(implementation) mocks, not bare mocks. The installed Vitest implementation and type documentation specify that mockReset() restores the original implementation, including the approvals and client-retirement defaults.
  • Reply provenance: the pinned base already defaults omitted sourceTool to subagent_settle; the table has no falsy explicit source tool. The claimed external-user coverage loss did not occur in this diff.
  • Interstitial metadata: the pinned-base pluginSummary already inserts mustShowInstallationInterstitial: false when remotePluginId exists. The wrapper change does not turn an omitted output field into false.
  • Bulk retirement result: the only bulk row is lifecycle rotation, which returns before the admin-shaped assertion. The ordinary-retirement row reaching that assertion is admin-only.
  • Cron wake default: both pinned base and candidate route these fixtures through cronJob, which already inserts wakeMode: "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/test declarations, not expanded table cases. Fewer sites can reflect table consolidation; runtime case counts and behavior are left to CI.

Shard Files Test/support LOC before → after Static declarations Historical coverage
z0011 8 3928 → 3310 (-618) 69 → 62 Not run (CI-only)
z0013 6 3948 → 3128 (-820) 74 → 64 Not run (CI-only)
z0014 1 3947 → 3533 (-414) 100 → 100 Not run (CI-only)
z0015 5 3937 → 3668 (-269) 59 → 55 Not run (CI-only)
z0016 8 3934 → 3027 (-907) 41 → 40 Not run (CI-only)
z0017 7 3930 → 3241 (-689) 27 → 27 Not run (CI-only)
z0018 7 3922 → 3168 (-754) 55 → 51 Not run (CI-only)
z0019 7 3916 → 3300 (-616) 91 → 84 Not run (CI-only)
z0020 6 3913 → 3533 (-380) 75 → 73 Not run (CI-only)
z0022 4 931 → 799 (-132) 27 → 27 Not run (CI-only)
z0010 0 Skipped Unchanged Not run (CI-only)
Changed files by shard

z0011

  • src/gateway/server-close-retirement.test-support.ts
  • src/gateway/server-close.board.test.ts
  • src/gateway/server-close.lifecycle-read.test.ts
  • src/gateway/server-close.race.test-support.ts
  • src/gateway/server-close.session-signals.test.ts
  • src/gateway/server-connection-work.test.ts
  • src/gateway/server-cron.handoff.test-support.ts
  • src/gateway/server-cron.test.ts

z0013

  • src/commands/agent-exec.test.ts
  • src/commands/agent-exec.thinking-http.test.ts
  • src/commands/agent.acp.test.ts
  • src/commands/agent.delivery-format.test.ts
  • src/commands/agent.test.ts
  • src/commands/agent.thinking.test-support.ts

z0014

  • test/scripts/test-projects.test.ts

z0015

  • src/plugins/update.test.ts
  • src/plugins/web-provider-capture-lifetime.test.ts
  • src/plugins/web-provider-public-artifacts.fallback.test.ts
  • src/plugins/web-provider-resolution-candidates.test.ts
  • src/plugins/wired-hooks-inbound-claim.test.ts

z0016

  • src/agents/subagents/registry/subagent-active-context.test.ts
  • src/agents/subagents/registry/subagent-announcement.test-support.ts
  • src/agents/subagents/registry/subagent-catchup.runtime-facts.integration.test.ts
  • src/agents/subagents/registry/subagent-child-owner-match.test.ts
  • src/agents/subagents/registry/subagent-control.preparation.test.ts
  • src/agents/subagents/registry/subagent-control.raw-entry.test.ts
  • src/agents/subagents/registry/subagent-control.retirement.test.ts
  • src/agents/subagents/registry/subagent-control.worker.test.ts

z0017

  • src/gateway/server.agent.gateway-server-agent-a.test.ts
  • src/gateway/server.chat.gateway-server-chat-history.test.ts
  • src/gateway/server.native-completion-authority.test.ts
  • src/gateway/server.sessions-send-resume.test.ts
  • src/gateway/server.sessions-send.test.ts
  • src/gateway/server.subagent-settle-replay-recovery.test-support.ts
  • src/gateway/server.talk-permission-parity.test-support.ts

z0018

  • extensions/codex/src/command-plugins-available.test.ts
  • extensions/codex/src/command-plugins-management.test-support.ts
  • extensions/codex/src/conversation-binding-node.test.ts
  • extensions/codex/src/conversation-binding.test-helpers.ts
  • extensions/codex/src/conversation-binding.test.ts
  • extensions/codex/src/conversation-turn-input.test.ts
  • extensions/codex/src/native-plugin-tool.test.ts

z0019

  • src/auto-reply/reply/reply-tool-authority.snapshot.test.ts
  • src/auto-reply/reply/reply-turn-admission.database-claim.test.ts
  • src/auto-reply/reply/reply-turn-admission.recovery.test.ts
  • src/auto-reply/reply/reply-turn-admission.store-owner.test.ts
  • src/auto-reply/reply/reply-turn-admission.waiting.test.ts
  • src/auto-reply/reply/reply-utils.test.ts
  • src/auto-reply/reply/restart-recovery-claim.test.ts

z0020

  • src/agents/command/attempt-execution.cli.test.ts
  • src/agents/command/attempt-execution.error-propagation.test.ts
  • src/agents/command/attempt-execution.reply-policy.test-support.ts
  • src/agents/command/attempt-execution.shared.test.ts
  • src/agents/command/attempt-execution.test.ts
  • src/agents/command/delivery.settle-reset.integration.test.ts

z0022

  • extensions/codex/src/app-server/outcome-fallback-runtime-contract.test.ts
  • extensions/codex/src/app-server/plugin-app-cache-key.test.ts
  • extensions/codex/src/app-server/plugin-metadata-cache.test.ts
  • extensions/codex/src/app-server/protocol-validators.test.ts

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T07:04:40.289898Z 543a7e4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 20, 2026 06:11
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: codex size: XL labels Oct 20, 2026
@steipete
steipete force-pushed the tcr/land-d304-1792475331 branch from 0bfbf0a to bc0c2c0 Compare October 20, 2026 06:17
@steipete
steipete disabled auto-merge October 20, 2026 06:24
@steipete
steipete enabled auto-merge (squash) October 20, 2026 06:29
@steipete
steipete disabled auto-merge October 20, 2026 06:37
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@steipete
steipete enabled auto-merge (squash) October 20, 2026 06:44
@steipete
steipete disabled auto-merge October 20, 2026 06:54
@steipete
steipete enabled auto-merge (squash) October 20, 2026 06:55
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates test fixtures and assertions across agent, Gateway, plugin, Codex, and test-routing suites.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Source inspection and passing exact-head test jobs support the cleanup; coverage equivalence and performance gains were not measured.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only consolidation changes no shipped behavior; live product demonstration is outside the proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-directed cleanup reduces repeated setup while retaining the inspected contract scenarios and leaving production behavior untouched.

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
Reviewed head: 543a7e4054258db35181b729b4fe3b518b503579

Before merge

None.

Findings

None.

Agent review details

How this fits together

Vitest 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]
Loading

Technical review

Best 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

  • Test-routing regressions keeps the original intent (2ed30d4: The original change retained consumers whose closed module mocks could become incompatible after runtime export changes.)
  • Gateway shutdown and cron handoff tests keeps the original intent (unknown: Existing tests protect accepted-work drainage and handoff ordering; supplied provenance is partial, and a historical commit-object read was unavailable.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 8724255 adds test/scripts/test-projects.test.ts:257 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 872425513e9a; files: test/scripts/test-projects.test.ts)

PR surface

Tests -4679, Other -11. Total -4690 across 60 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 59 9738 14417 -4679
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 11 -11
Total 60 9738 14428 -4690

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and support +11,719/-17,318 The reduction comes from test consolidation without adding runtime machinery.

Labels

Label changes:

  • add P3: This is test maintenance with no intended user-facing behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is test maintenance with no intended user-facing behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 3:15 AM ET / 07:15 UTC.

@steipete
steipete merged commit f224d6e into main Oct 20, 2026
148 of 150 checks passed
@steipete
steipete deleted the tcr/land-d304-1792475331 branch October 20, 2026 07:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations extensions: codex gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant