Skip to content

test(core,ui,plugins): remove low-value tests (batch d258) - #176648

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d258-1792367231
Oct 19, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d258-1792367231

Conversation

@steipete

@steipete steipete commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated fixture construction and assertion scaffolding make these tests harder to maintain. This batch consolidates those patterns and removes duplicate cases while retaining distinct authority, recovery, protocol, and lifecycle checks.

User Impact

No production behavior change. Only tests and test-support files change; no dependency, configuration, or public API changes.

Why This Change Was Made

Replays campaign batch d258 onto pinned main a70b7c23104ada5d7d1a21b245dec72623a78a7e. Applied 29 of 30 listed commits, preserving their messages, followed by three focused corrective commits. OpenCode commit d6224c73b870e60ba1aa730d876a9ae7ff97452f was skipped: all four files conflicted extensively with newer main auth/catalog/replay-policy coverage.

Conflict and review decisions:

  • Preserved current-main chat viewport-resize and pane-retirement tests. Consolidated only the already-covered layout-scroll case into its equivalent retained row.
  • Dropped second-pass server-endpoint-compaction and second/third-pass cache-TTL edits, retaining current-main budget matrices, rejection recovery, replay seeds, damaged-input cases, and checkpoint/byte bounds.
  • Restored the seventeen files listed below to pinned main after CI/review exposed changed matcher semantics, incorrect PDF retention expectations, or insufficient justification for removing distinct authority/diagnostic coverage.
  • Fixed the raw main reset fixture key and navigation contribution kind. Repaired scope-array types, mock-call narrowing, Solid disposal, and required popup callback typing.
  • Rejected two review findings using current source: lifecycle generations are strings (src/infra/agent-events.ts), and isRecord remains used by orphan-recovery assertions. All corrective reviews completed clean through P2.

No touched path matches current CODEOWNERS rules.

Evidence

CI-only validation: changed-file oxfmt --write, plain oxlint -c .oxlintrc.json, and git diff --check exited 0. Local tests, typechecks, check-changed, builds, coverage, and Testbox were not run. Hosted openclaw/ci-gate is the runtime proof and merge gate.

Initial runs 39178753824 and 39180665065 exposed fixture/type failures; their affected reductions were repaired or dropped. Run 39181869148 passed typechecks and runtime test jobs (PostgreSQL conformance was still pending at observation), while type-aware lint rejected six more changed files; those reductions were dropped. Its separate mock-export ratchet failure is in src/cli/program/root-help.test.ts, outside this diff. Line-budget diagnostics were non-blocking warnings. No pre-existing-failure merge exception is claimed without the required main-CI evidence. Fresh CI follows the final corrective push.

Production LOC: +0 / -0. Test files: +7556 / -11183. Test-support files: +541 / -862. Combined: +8097 / -12045, net -3948 lines across 59 files. Static declarations 482 → 406; static expanded cases 641 → 636. These counts are not execution results and undercount dynamic tables.

Per-shard final replay inventory and source evidence

LOC includes test support and compares pinned main with the final candidate. Source reports have no numeric coverage totals: tests/coverage were not run under CI-only mode, so no <=1% coverage claim is made.

Shard LOC before → after Declarations Static cases Diff + / - Coverage evidence
x8108 2481 → 2053 37 → 36 60 → 58 +1160 / -1588 Not run (CI-only source report)
x8110 1751 → 1310 42 → 38 47 → 47 +635 / -1076 Not run (CI-only source report)
x8111 2047 → 1652 49 → 38 69 → 69 +1371 / -1766 Not run (CI-only source report)
x8112 2476 → 1874 26 → 24 31 → 31 +1080 / -1682 Not run (CI-only source report)
x8113 1865 → 1607 49 → 41 77 → 76 +565 / -823 Not run (CI-only source report)
x8114 1242 → 958 29 → 26 30 → 30 +226 / -510 Not run (CI-only source report)
x8115 2594 → 2320 47 → 41 58 → 59 +929 / -1203 Not run (CI-only source report)
x8117 1131 → 935 28 → 23 38 → 38 +475 / -671 Not run (CI-only source report)
x8118 1552 → 1267 36 → 31 41 → 41 +561 / -846 Not run (CI-only source report)
x8119 2772 → 2053 130 → 102 179 → 176 +816 / -1535 Not run (CI-only source report)
x8120 1384 → 1318 9 → 6 11 → 11 +279 / -345 Not run (CI-only source report)

Skipped shard x8109: no final file/LOC/declaration delta; coverage not run in source report.

Dropped file-level reductions

  • extensions/memory-core/src/dreaming.test.ts
  • extensions/signal/src/monitor/event-handler.inbound-context.test.ts
  • extensions/signal/src/monitor/event-handler.reply-session-conflict.test.ts
  • src/agents/embedded-agent-runner/skill-runtime.library-read.test.ts
  • src/process/spawn-utils.test.ts
  • ui/src/pages/model-providers/view.test.ts
  • src/agents/embedded-agent-runner/sessions-yield.orchestration.test-support.ts
  • src/state/openclaw-agent-db.committed-read.test.ts
  • ui/src/pages/chat/components/chat-pdf-preview.test.ts
  • src/agents/embedded-agent-runner/server-endpoint-compaction.test.ts
  • test/scripts/pr-main-refresh.test.ts
  • src/gateway/server.chat-abort-settlement.test.ts
  • src/process/terminal-pty.test.ts
  • ui/src/pages/chat/components/chat-message-embed-policy.test.ts
  • ui/src/plugins/control-ui-contributions.test.ts
  • ui/src/pages/chat/components/chat-question-card.test.tsx
  • ui/src/pages/chat/components/chat-reply-attribution.browser.test.tsx

x8108

  • ui/src/plugins/control-ui-dashboard.test.ts (+303 / -427)
  • ui/src/plugins/control-ui-host.test.ts (+346 / -474)
  • ui/src/plugins/control-ui-navigation.test.ts (+93 / -157)
  • ui/src/plugins/control-ui-runtime.test.ts (+178 / -265)
  • ui/src/plugins/control-ui-session-summary.test.ts (+240 / -265)

x8110

  • extensions/memory-core/src/dreaming-command.test.ts (+56 / -109)
  • extensions/memory-core/src/dreaming-consolidation-projects.test.ts (+40 / -99)
  • extensions/memory-core/src/dreaming-consolidation.test-support.ts (+40 / -0)
  • extensions/memory-core/src/dreaming-consolidation.test.ts (+125 / -345)
  • extensions/memory-core/src/dreaming-dreams-file.test.ts (+174 / -245)
  • extensions/memory-core/src/dreaming-narrative.test.ts (+200 / -278)

x8111

  • ui/src/pages/model-providers/data.test.ts (+328 / -460)
  • ui/src/pages/model-providers/load.test.ts (+181 / -247)
  • ui/src/pages/model-providers/model-providers-page.installed-agents.test.ts (+406 / -460)
  • ui/src/pages/model-providers/profiles-view.test.tsx (+256 / -368)
  • ui/src/pages/model-providers/route.test.ts (+200 / -231)

x8112

  • src/gateway/server.agent.gateway-server-agent-b.test.ts (+181 / -271)
  • src/gateway/server.channels-start-outcomes.test.ts (+210 / -303)
  • src/gateway/server.chat.orphaned-recovery.test.ts (+30 / -121)
  • src/gateway/server.models-voicewake-misc.test.ts (+217 / -307)
  • src/gateway/server.plugin-http-role-scopes.test.ts (+205 / -259)
  • src/gateway/server.sessions.reset-concurrency.test.ts (+161 / -250)
  • src/gateway/server.sessions.reset-models.test.ts (+76 / -171)

x8113

  • src/process/orphaned-process.test.ts (+88 / -170)
  • src/process/owned-stdio.windows.test.ts (+118 / -146)
  • src/process/respawn-child-runner.test.ts (+114 / -179)
  • src/process/spawn-diagnostics.test-support.ts (+42 / -0)
  • src/process/spawn-secret-input.test.ts (+57 / -125)
  • src/process/terminal-pty-bun.test.ts (+98 / -132)
  • src/process/terminal-pty-node.test.ts (+48 / -71)

x8114

  • extensions/signal/src/monitor/access-policy.test.ts (+53 / -148)
  • extensions/signal/src/monitor/event-handler.mention-gating.test.ts (+88 / -228)
  • extensions/signal/src/monitor/event-handler.partial-delivery.test.ts (+85 / -134)

x8115

  • src/state/openclaw-agent-db-disposal.test.ts (+67 / -104)
  • src/state/openclaw-agent-db-maintenance.test.ts (+196 / -257)
  • src/state/openclaw-agent-db-module-identity.test.ts (+25 / -38)
  • src/state/openclaw-agent-db-open-authority.test.ts (+125 / -159)
  • src/state/openclaw-agent-db-readonly-scope.test.ts (+358 / -467)
  • src/state/openclaw-agent-db-registry-listing.settled.test.ts (+97 / -107)
  • src/state/openclaw-agent-db.open-timing.test.ts (+61 / -71)

x8117

  • ui/src/pages/chat/components/chat-message-reactions.test.ts (+24 / -36)
  • ui/src/pages/chat/components/chat-position-rail-scroll.test.tsx (+210 / -291)
  • ui/src/pages/chat/components/chat-read-aloud.test.tsx (+90 / -131)
  • ui/src/pages/chat/components/chat-selection-popup.test.ts (+151 / -213)

x8118

  • src/agents/embedded-agent-runner/runs.force-clear-terminal.test.ts (+94 / -96)
  • src/agents/embedded-agent-runner/runs.generation.test.ts (+195 / -377)
  • src/agents/embedded-agent-runner/runs.liveness.test.ts (+138 / -163)
  • src/agents/embedded-agent-runner/sandbox-skills.test.ts (+134 / -210)

x8119

  • extensions/imessage/src/monitor/inbound-processing.context.test.ts (+73 / -145)
  • extensions/imessage/src/monitor/inbound-processing.systemPrompt.test-support.ts (+60 / -125)
  • extensions/imessage/src/monitor/ingress.test.ts (+225 / -334)
  • extensions/imessage/src/monitor/monitor-provider.echo-cache.test-support.ts (+75 / -159)
  • extensions/imessage/src/monitor/recovery-cursor.test-support.ts (+63 / -112)
  • extensions/imessage/src/monitor/remote-host.test.ts (+53 / -112)
  • extensions/imessage/src/monitor/sanitize-outbound.test-support.ts (+223 / -398)
  • extensions/imessage/src/monitor/self-chat-dedupe.test.ts (+44 / -150)

x8120

  • test/scripts/pr-gh-async.test.ts (+127 / -143)
  • test/scripts/pr-git-maintenance.test.ts (+114 / -134)
  • test/scripts/pr-main-refresh.test-support.ts (+38 / -68)

@clawsweeper

clawsweeper Bot commented Oct 18, 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 18, 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-19T01:05:57.509561Z 06bb86b 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 18, 2026 23:59
@openclaw-barnacle openclaw-barnacle Bot added channel: imessage Channel integration: imessage channel: signal Channel integration: signal app: web-ui App: web-ui gateway Gateway runtime extensions: memory-core Extension: memory-core agents Agent runtime and tooling size: XL labels Oct 19, 2026
@steipete
steipete disabled auto-merge October 19, 2026 00:04
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates fixtures and assertions and removes duplicate test cases across core, plugins, and the Control UI.

Example: A PDF attachment receives renewed bytes under the same attachment identity.

  • Before: The test checks the replacement blob URL and revocation of the old URL.
  • After: The consolidated assertion additionally requires a different iframe, causing valid iframe reuse to fail.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful maintenance direction, but exact-head validation exposes introduced assertion and fixture errors.
Proof confidence 🦪 silver shellfish (2/6) This maintainer-authored test-only change requires no shipped-runtime media or persisted-data migration.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixture setup and duplicate assertions increase maintenance work.
Reason: The maintainer-authored direction is approved, and reducing duplication has value when distinct contracts remain intact.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep this maintainer-authored PR open: the test consolidation is useful, but three verified changes make valid behavior fail its tests.

Priority: P3
Reviewed head: 7167bece5751964617cfafabe0137c5e60c4506a

Before merge

  • Preserve omitted-field semantics in yield assertions (P2) - toMatchObject requires each expected key to exist even when its expected value is undefined. The outer-candidate result legitimately omits requesterContinuationSettled, so this replacement fails where the previous property read followed by toBeUndefined passed. The same conversion breaks the refused/unregistered wait and runtime-continuation cases at lines 263 and 319. Exact-head CI reports these failures. Keep separate toBeUndefined checks for optional fields and match only the present fields.
  • Update the remount caller to use the new disposal method (P2) - The import now selects solid-render.tsx, whose returned handle exposes dispose rather than unmount. The retained typed-answer remount case still calls mounted?.unmount() at line 504, so it throws before checking draft preservation; exact-head UI CI confirms the TypeError. Change that caller to dispose, matching the updated afterEach cleanup.
  • Separate PDF blob replacement from iframe replacement (P2) - For the changed-bytes case, the final call passes retained=false and requires current !== frame plus frame.isConnected=false. The existing renderer updates the ready iframe's src when the blob changes and can retain that DOM node. The base test checked the new URL and old URL revocation without requiring node replacement, and exact-head CI fails this new assertion. Assert mandatory node identity only for unchanged bytes and keep URL/revocation checks independent.

Findings

  • [P2] Preserve omitted-field semantics in yield assertions — src/agents/embedded-agent-runner/sessions-yield.orchestration.test-support.ts:142-145
  • [P2] Update the remount caller to use the new disposal method — ui/src/pages/chat/components/chat-question-card.test.tsx:6
  • [P2] Separate PDF blob replacement from iframe replacement — ui/src/pages/chat/components/chat-pdf-preview.test.ts:151-154

Provenance

  • Broader historical test rationale: original intent not found (unknown: Supplied provenance and scoped git history identify prior authority, recovery, and lifecycle work, but unavailable historical blobs prevented completing every introduction trace.)
Agent review details

How this fits together

These test suites supply synthetic requests, events, and state to existing runtime owners and check their responses, lifecycle, authorization, and UI behavior.

flowchart LR
  A[Test fixtures] --> B[Existing runtime owners]
  B --> C[Consolidated assertions]
  C --> D[CI results]
Loading

Technical review

Best possible solution:

Retain the consolidation while restoring optional-field assertions, completing the mount-helper cutover, and separating PDF URL changes from iframe identity.

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

The pinned diff, helper implementations, and exact-head CI annotations establish the three reported test failures; no target code was executed during this review.

Is this the best way to solve the issue?

Shared fixtures and tables fit the existing owners, but consolidation must preserve omitted-field semantics, cleanup APIs, and the PDF renderer's existing identity contract.

Full review comments:

  • [P2] Preserve omitted-field semantics in yield assertions — src/agents/embedded-agent-runner/sessions-yield.orchestration.test-support.ts:142-145
    toMatchObject requires each expected key to exist even when its expected value is undefined. The outer-candidate result legitimately omits requesterContinuationSettled, so this replacement fails where the previous property read followed by toBeUndefined passed. The same conversion breaks the refused/unregistered wait and runtime-continuation cases at lines 263 and 319. Exact-head CI reports these failures. Keep separate toBeUndefined checks for optional fields and match only the present fields.
    Confidence: 1
  • [P2] Update the remount caller to use the new disposal method — ui/src/pages/chat/components/chat-question-card.test.tsx:6
    The import now selects solid-render.tsx, whose returned handle exposes dispose rather than unmount. The retained typed-answer remount case still calls mounted?.unmount() at line 504, so it throws before checking draft preservation; exact-head UI CI confirms the TypeError. Change that caller to dispose, matching the updated afterEach cleanup.
    Confidence: 1
  • [P2] Separate PDF blob replacement from iframe replacement — ui/src/pages/chat/components/chat-pdf-preview.test.ts:151-154
    For the changed-bytes case, the final call passes retained=false and requires current !== frame plus frame.isConnected=false. The existing renderer updates the ready iframe's src when the blob changes and can retain that DOM node. The base test checked the new URL and old URL revocation without requiring node replacement, and exact-head CI fails this new assertion. Assert mandatory node identity only for unchanged bytes and keep URL/revocation checks independent.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 77a403f1c153.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/agents/embedded-agent-runner/run.shared-integration.test.ts --maxWorkers=1
  • pnpm --dir ui test src/pages/chat/components/chat-question-card.test.tsx src/pages/chat/components/chat-pdf-preview.test.ts --maxWorkers=1
  • pnpm tsgo:ui
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1e2d50c adds src/state/openclaw-agent-db.committed-read.test.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1e2d50c66324; files: src/state/openclaw-agent-db.committed-read.test.ts)

PR surface

Tests -3797. Total -3797 across 76 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 76 5808 9605 -3797
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 76 5808 9605 -3797

Review metrics

Metric Value Why it matters
Production versus tests Production +0/-0; tests and support +11630/-17389 The reduction stays entirely within validation code, consistent with the stated maintenance scope.

Labels

Label changes:

  • add P3: This is test maintenance with no shipped behavior change; its introduced test failures require repair before merging.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is test maintenance with no shipped behavior change; its introduced test failures require repair before merging.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 18, 2026, 8:17 PM ET / October 19, 2026, 00:17 UTC.

@steipete
steipete enabled auto-merge (squash) October 19, 2026 00:25
@steipete
steipete disabled auto-merge October 19, 2026 00:30
@steipete
steipete enabled auto-merge (squash) October 19, 2026 00:40
@steipete
steipete disabled auto-merge October 19, 2026 00:48
@steipete
steipete enabled auto-merge (squash) October 19, 2026 01:01
@steipete
steipete merged commit c5111f4 into main Oct 19, 2026
121 checks passed
@steipete
steipete deleted the tcr/land-d258-1792367231 branch October 19, 2026 01:23
steipete added a commit that referenced this pull request Oct 19, 2026
Register the documented maintainer CLI from #176797 using the existing executable entry pattern. Remove the unused fixture left by #176648 after its diagnostic suite reductions were dropped; keep the original diagnostic tests intact.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…176648)

* test(control-ui): deslop x8108 tests

* test(control-ui): deslop x8108 tests

* test(control-ui): deslop x8108 tests

* test(memory-core): deslop x8110 tests

* test(memory-core): deslop x8110 tests

* test(gateway): deslop x8112 tests

* test(gateway): deslop x8112 tests

* test(gateway): deslop x8112 tests

* test(model-providers): deslop x8111 tests

* test(model-providers): deslop x8111 tests

* test(model-providers): deslop x8111 tests

* test(signal): deslop x8114 tests

* test(signal): deslop x8114 tests

* test(process): deslop x8113 tests

* test(process): deslop x8113 tests

* test(process): deslop x8113 tests

* test(state): deslop x8115 tests

* test(state): deslop x8115 tests

* test(state): deslop x8115 tests

* test(imessage): deslop x8119 tests

* test(imessage): deslop x8119 tests

* test(chat): deslop x8117 tests

* test(chat): deslop x8117 tests

* test(chat): deslop x8117 tests

* test(agents): deslop x8118 tests

* test(agents): deslop x8118 tests

* test(agents): deslop x8118 tests

* test(pr): deslop x8120 tests

* test(pr): deslop x8120 tests

* test: retain boundary proof and repair d258 fixtures

* test: repair remaining d258 fixture typing

* test: drop d258 reductions rejected by type-aware lint
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
Register the documented maintainer CLI from openclaw#176797 using the existing executable entry pattern. Remove the unused fixture left by openclaw#176648 after its diagnostic suite reductions were dropped; keep the original diagnostic tests intact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: imessage Channel integration: imessage channel: signal Channel integration: signal extensions: memory-core Extension: memory-core gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant