Skip to content

test(core): remove low-value tests (batch d325) - #178456

Merged
steipete merged 35 commits into
mainfrom
tcr/land-d325-1792503911
Oct 20, 2026
Merged

steipete merged 35 commits into
mainfrom
tcr/land-d325-1792503911

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d325 reduces repeated test fixtures, setup, and assertions that make the suite harder to maintain.

User Impact

No production or user-visible behavior changes. Distinct behavior, security, lifecycle, and recovery cases remain.

Why This Change Was Made

Consolidate equivalent fixtures and assertions while retaining main's newer behavior. Conflicting database fixtures and selected dependent hunks are intentionally excluded.

Evidence

  • Base: dca4955.
  • Local frozen-lockfile install, changed-file oxfmt, plain oxlint, and git diff --check passed.
  • Per the operator's CI-only rule, no local Vitest, typecheck, check-changed, coverage, or Testbox runs. Hosted openclaw/ci-gate is the runtime and typecheck proof. No Testbox leases created.
  • Campaign reports explicitly say coverage was not run under CI-only mode; no statement/branch coverage totals exist to quote. Source reports retain expanded cases, but those reports are not a new coverage measurement of this replay.
  • Initial CI identified and drove five corrections: retain the full completion-check type; call the renamed prompt helper consistently; use it.for for test context; keep the concrete stdout spy type; restore main's prompt assertions around required plugin context wrappers. Initial run: https://github.com/openclaw/openclaw/actions/runs/39434673848 .
  • Three-pass independent review completed. Its six claims were checked against source: JSON.stringify and the mock result expression compiled in the relevant CI type graph; prompt-tool policy retains its initialized current value when Object.assign receives undefined; Vitest 5 resets vi.fn(implementation) to that original implementation; ClawHub already restores spies in afterEach; the workflow test's trusted-checkout loop retains all four security assertions and explicitly inventories the packaging job. No actionable finding from those claims. A focused correction review follows.

Per-shard replay

LOC and declaration counts below are computed from this replay, not copied from older campaign totals. Declaration counts are static it/test call-site counts, not expanded parameterized cases.

z0240

Test/support LOC: +32/-42 (net -10); static declarations 8 → 8. Coverage totals: not run (CI-only source report).

  • src/infra/database-engine/search-extension.test.ts
  • src/infra/database-engine/session-search-product.postgres.test.ts
  • src/infra/database-engine/state-read-lock.postgres.test.ts

z0236

Test/support LOC: +1250/-1698 (net -448); static declarations 35 → 27. Coverage totals: not run (CI-only source report).

  • test/scripts/gateway-ws-client.test.ts
  • test/scripts/generate-gateway-protocol-plugin.test.ts
  • test/scripts/install-dependency-ownership.test.ts
  • test/scripts/install-native-tools.test.ts
  • test/scripts/install-previous-version.test.ts
  • test/scripts/install-ps1.test.ts
  • test/scripts/install-sh-historical-warning.test.ts
  • test/scripts/install-smoke-no-push-workflow.test.ts

z0242

Test/support LOC: +526/-907 (net -381); static declarations 24 → 22. Coverage totals: not run (CI-only source report).

  • extensions/qa-lab/src/agent-run-identity-repeated-turn-child.process.test.ts
  • extensions/qa-lab/src/browser-runtime.test.ts
  • extensions/qa-lab/src/cli-coverage.runtime.test.ts
  • extensions/qa-lab/src/code-mode-matrix-repository-tasks.test.ts
  • extensions/qa-lab/src/codex-authenticated-hook-context.e2e.test.ts
  • extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts
  • extensions/qa-lab/src/codex-plugin-lifecycle.test.ts

z0239

Test/support LOC: +510/-705 (net -195); static declarations 32 → 30. Coverage totals: not run (CI-only source report).

  • src/agents/embedded-agent-runner/run/attempt-plan-completion.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-admission.test-support.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-build.provenance.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-context.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-error.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-execution-prepare.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-phase.admission.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-phase.runtime-marker.test.ts

z0241

Test/support LOC: +287/-523 (net -236); static declarations 30 → 28. Coverage totals: not run (CI-only source report).

  • extensions/reef/src/config-schema.test.ts
  • extensions/reef/src/flow-send.test.ts
  • extensions/reef/src/state.test-support.ts
  • extensions/reef/src/state.test.ts

z0243

Test/support LOC: +1048/-1328 (net -280); static declarations 28 → 24. Coverage totals: not run (CI-only source report).

  • src/gateway/server-methods/sessions-describe-active-run.test.ts
  • src/gateway/server-methods/sessions-describe-catalog.test.ts
  • src/gateway/server-methods/sessions-diff-reset.test.ts
  • src/gateway/server-methods/sessions-file-assets.test.ts
  • src/gateway/server-methods/sessions-get.worker.test.ts
  • src/gateway/server-methods/sessions-github-read.guest.test.ts
  • src/gateway/server-methods/sessions-github-read.test-support.ts
  • src/gateway/server-methods/sessions-github-read.test.ts
  • src/gateway/server-methods/sessions-keyed-read.test-support.ts

z0238

Test/support LOC: +759/-1283 (net -524); static declarations 57 → 45. Coverage totals: not run (CI-only source report).

  • src/commands/onboard-helpers.test.ts
  • src/commands/onboard-non-interactive.migration.test.ts
  • src/commands/onboard-quickstart-host.plugin-generation.test.ts
  • src/commands/onboard-quickstart-host.test.ts
  • src/commands/onboard-reset-discovery.test-support.ts
  • src/commands/onboard-reset-engine.test.ts
  • src/commands/plugin-control-plane-cold-imports.test.ts
  • src/commands/reset.test.ts

z0246

Test/support LOC: +967/-1389 (net -422); static declarations 37 → 33. Coverage totals: not run (CI-only source report).

  • src/plugins/capability-consent.test.ts
  • src/plugins/capability-summary.test.ts
  • src/plugins/channel-catalog-registry.workspace.test.ts
  • src/plugins/channel-validation.test.ts
  • src/plugins/claw-managed-capability-consent.integration.test.ts
  • src/plugins/clawhub.registry-authority.test.ts
  • src/plugins/clawhub.test-support.ts
  • src/plugins/cli-gateway-nodes-runtime.test.ts

z0245

Test/support LOC: +654/-955 (net -301); static declarations 62 → 58. Coverage totals: not run (CI-only source report).

  • src/infra/node-compile-cache.test.ts
  • src/infra/node-pairing-migration.test.ts
  • src/infra/node-pairing-state.test.ts
  • src/infra/node-runtime-recovery.gateway-drain.test.ts
  • src/infra/node-runtime-recovery.shutdown.test.ts
  • src/infra/node-runtime-update.test.ts
  • src/infra/node-sqlite.test.ts
  • src/infra/openclaw-cli-invocation.test.ts

z0244

Test/support LOC: +1132/-1607 (net -475); static declarations 33 → 32. Coverage totals: not run (CI-only source report).

  • src/gateway/server-methods/chat-aborted-partial.test.ts
  • src/gateway/server-methods/chat-assistant-content.media-authority.test.ts
  • src/gateway/server-methods/chat-broadcast.test.ts
  • src/gateway/server-methods/chat-history-budget.test.ts
  • src/gateway/server-methods/chat-history-command-context.test.ts
  • src/gateway/server-methods/chat-history-fixtures.test-support.ts
  • src/gateway/server-methods/chat-history-handler.test.ts
  • src/gateway/server-methods/chat-history-pages.test.ts
  • src/gateway/server-methods/chat-history-requester.test.ts

z0247

Test/support LOC: +1149/-1426 (net -277); static declarations 42 → 41. Coverage totals: not run (CI-only source report).

  • src/infra/update-run-diagnostics.test.ts
  • src/infra/update-run-fixture.test-support.ts
  • src/infra/update-run-interruption-store.test.ts
  • src/infra/update-run-interruption.worker.test.ts
  • src/infra/update-run-mutation.worker.test.ts
  • src/infra/update-run-reconciliation.worker.test.ts
  • src/infra/update-run-recovery-handoff.test.ts
  • src/infra/update-run-report.test.ts
  • src/infra/update-run-step-key.test.ts

z0250

Test/support LOC: +186/-306 (net -120); static declarations 24 → 24. Coverage totals: not run (CI-only source report).

  • extensions/codex/src/app-server/run-attempt-lifecycle-controller.test.ts

Overall impact

Test/support LOC: +8500/-12171 (net -3671). Production LOC: +0/-0. No user-facing change or release note required.

Conflict resolution

  • 846715ae2826: retained main's complete versions of postgres-search.conformance.test.ts, search-extension.postgres.test.ts, session-actor.conformance.test.ts, sqlite-memory-search-fragments.test.ts, and sqlite-vec.test.ts; dropped cleanup hunks in those files. Retained clean independent hunks in search-extension.test.ts, search.conformance.test-support.ts, session-search-product.postgres.test.ts, and state-read-lock.postgres.test.ts.
  • a4c674bcbdb4: skipped; all four files conflicted with the retained current versions.

Additional retained-current-file resolutions: QA-lab browser-runtime.test.ts and ci-smoke-plan.test.ts in 3cc6138b186c preserve the normalized browser request case, six-part smoke matrix and Gateway-hosted scenario exclusion. attempt-prompt-context.test.ts in 357ddfd45194 and 475d8dbbf350 preserves turn-start snapshot wording, cross-scope exclusions and current replay regressions.

Reef: retained flow.test-helpers.ts and transport-capacity-recovery.test.ts in e5175253c83e/e9779e29d960, preserving main's direct sealing fixture. Dropped dependent cleanup from flow.source-authority.test.ts and replay-state.test.ts because it required the omitted helper extraction. Removed the newly orphaned database search.conformance.test-support.ts. Infrastructure: retained node-sqlite.test.ts for 6c85155a96f6/e6e871fd06c4, preserving newer UNC/namespaced Windows coverage; the first commit's independent changes remain. All other source commits applied; 29 applied, one skipped, plus one conflict-coherence commit.

CODEOWNERS

No changed path matches the current CODEOWNERS rules.

CI follow-up

The initial run also caught the dropped explicit session-store fixture path, an unbound cleanup method, undefined members in a promise collection, and destructured plugin helper methods. These were repaired without weakening assertions or adding suppressions. The two small correction diffs receive independent review; all local reruns remain formatting, plain lint, and diff-check only. Fresh-head CI must validate the corrections before merging.

The next CI run identified one floating respawn promise and two existing partial mocks requiring explicit isolation reasons. Restored tracked promise ownership (independently reviewed clean), and documented image-I/O and in-memory-config isolation without changing either mock. Both prior correction reviews also passed. No local test or typecheck execution was used.

Baseline maintenance: removed exactly the two obsolete entries named by CI from config/test-mock-exports-baseline.txt, for the image-loader and in-memory config mocks above. This is shrink-only; no new exemption or weakened guard.

@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-20T14:30:46.187005Z 9094663 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: qa-lab extensions: codex channel: reef Channel integration: reef size: XL labels Oct 20, 2026
@steipete
steipete disabled auto-merge October 20, 2026 14:02
@steipete
steipete enabled auto-merge (squash) October 20, 2026 14:09
@steipete
steipete disabled auto-merge October 20, 2026 14:19
@steipete
steipete enabled auto-merge (squash) October 20, 2026 14:26
@steipete
steipete disabled auto-merge October 20, 2026 14:41
@steipete
steipete enabled auto-merge (squash) October 20, 2026 14:43
@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. 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 core and bundled plugins and removes two obsolete mock-baseline entries.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no actionable finding; supporting current-head checks have passed, but the aggregate validation gate remains pending.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR changes test organization and fixtures without changing shipped behavior; current-head CI provides supporting validation and is still completing.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Maintainers must update repeated fixtures and assertion setup across related test cases.
Reason: The maintainer-authored direction is established, and the changes reduce maintenance duplication without introducing production architecture.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored cleanup reduces duplicated test setup while retaining distinct behavioral checks; no actionable introduced defect was found.

Priority: P3
Reviewed head: 5509bfa4cd47d56d8de85c1fcc37503adb86b513

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed test suites supply synthetic requests, state, and transport fixtures to OpenClaw owners, then check their responses, persistence, authorization, and cleanup.

flowchart LR
  A[Synthetic fixtures] --> B[Parameterized test cases]
  B --> C[OpenClaw module owners]
  C --> D[State and transport boundaries]
  D --> E[Behavioral assertions]
Loading

Technical review

Best possible solution:

Land the fixture and assertion consolidation after the current-head required CI completes successfully.

Do we have a high-confidence way to reproduce the issue?

This PR addresses duplicated test maintenance rather than a reported runtime defect, so a user-facing reproduction does not apply.

Is this the best way to solve the issue?

Shared fixtures and parameterized cases are appropriate here; the reviewed changes preserve distinct rejection, lifecycle, recovery, persistence, and transport assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 034856a7f365.

Provenance checked

  • Gateway plugin-steering history tests keeps the original intent (aaed6bf: Expose attributed plugin guidance only to Control UI while keeping private prompt metadata out of display responses.)
  • Agent prompt persistence tests keeps the original intent (56d5592: Preserve prompt prefixes and append-only transcript behavior; removing the explicit runtime-context flag assignment retains the fixture's existing true value.)
  • Installer qualification workflow tests keeps the original intent (38740f2: Qualify frozen candidates with their committed harness while independently trusted tooling binds workflow identity and artifact provenance.)
  • Update-report test consolidation keeps the original intent (676915d: Earlier test cleanup consolidated update-report fixtures; this PR further shares setup while retaining report, recovery, and redaction cases.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests/support +8301/-11970; mock baseline -2 The reduction comes from shared fixtures and parameterized assertions without adding runtime machinery.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no production behavior change or demonstrated urgent regression.
  • 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 cleanup with no production behavior change or demonstrated urgent regression.
  • 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, 11:03 AM ET / 15:03 UTC.

@steipete
steipete merged commit 54e1a2d into main Oct 20, 2026
138 of 140 checks passed
@steipete
steipete deleted the tcr/land-d325-1792503911 branch October 20, 2026 15:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
* test(database-engine): deslop z0240 tests

* test(scripts): deslop z0236 tests

* test(scripts): deslop z0236 tests

* test(scripts): deslop z0236 tests

* test(qa-lab): deslop z0242 tests

* test(qa-lab): deslop z0242 tests

* test(agents): deslop z0239 tests

* test(agents): deslop z0239 tests

* test(agents): deslop z0239 tests

* test(reef): deslop z0241 tests

* test(reef): deslop z0241 tests

* test(reef): deslop z0241 tests

* test(gateway): deslop z0243 tests

* test(gateway): deslop z0243 tests

* test(gateway): deslop z0243 tests

* test(commands): deslop z0238 tests

* test(commands): deslop z0238 tests

* test(plugins): deslop z0246 tests

* test(plugins): deslop z0246 tests

* test(infra): deslop z0245 tests

* test(infra): deslop z0245 tests

* test(infra): deslop z0245 tests

* test(gateway): deslop z0244 tests

* test(gateway): deslop z0244 tests

* test(gateway): deslop z0244 tests

* test(update): deslop z0247 tests

* test(update): deslop z0247 tests

* test(update): deslop z0247 tests

* test(codex): deslop z0250 tests

* test: retain current fixtures across d325 conflict cuts

* test: repair d325 prompt and fixture contracts

* test: restore d325 fixture paths and method bindings

* test(infra): retain shutdown promise ownership

* test: document d325 partial mock isolation

* test: prune explained d325 mock 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 channel: reef Channel integration: reef commands Command implementations extensions: codex extensions: qa-lab 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