Skip to content

test(core,ui): remove low-value tests (batch d172) - #174255

Merged
steipete merged 34 commits into
mainfrom
tcr/land-d172-1792156270
Oct 16, 2026
Merged

steipete merged 34 commits into
mainfrom
tcr/land-d172-1792156270

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces repeated test setup and assertion boilerplate across the selected campaign shards while preserving distinct contracts and newer main coverage.

User Impact

No production behavior changes. Only tests and test-support files change; there are no migrations or operator actions.

Why This Change Was Made

Consolidates repeated fixtures and assertions, removes duplicate cases where stronger coverage remains, and shares test-only helpers. This is batch d172, replayed onto main at c5aabc24a6ed9c2c235440d04e2966c3b6ae3ccf.

Evidence

  • Local changed-file oxfmt and plain oxlint: passed; git diff --check: passed.
  • Per the explicit CI-only instruction, no local Vitest, check-changed, tsgo, coverage, or Testbox/Crabbox runs. Hosted openclaw/ci-gate is the runtime/type proof and merge gate.
  • The source shard reports also say coverage was not run in CI-only mode. No measured coverage-preservation claim is made. Their declaration/case counts describe the initial shard snapshots, not this later three-commit replay.
  • Final replay diff: production +0/-0 LOC; test/support +9289/-14475 LOC (-5186 net); mock-export baseline +0/-2 rows, 56 files.
  • Independent review runs alongside CI; auto-merge is pinned to the pushed head.
  • No CODEOWNERS-listed files are changed.

Replay decisions

29 source commits replayed (with the file exclusions below and CI repairs); 01589b8802a3db9e9686649197a0d2086ab6b873 skipped because all four worktree test rewrites conflicted with newer coverage.

  • CI repair: the initial hosted run exposed missing image profile-rematerialization flags, an absent-property assertion mismatch, stale helper references, type-aware lint errors, and mock-export ratchets. Restored the original fixture flags and undefined assertion, fixed narrow callback/spy/union/tuple types and retained two explicit isolation comments with the exact corresponding baseline rows removed. No local tests or typechecks were run. Initial run: https://github.com/openclaw/openclaw/actions/runs/38908343013. The repaired head must pass fresh CI.
  • Additional CI-driven exclusions: worker-session-tool-executor.test.ts and its send test, board-document.test.ts, board-view.browser.test.ts, board-widget-cell-plugin.test.ts, image.resources.test.ts, and authorized-beta-focused-evidence.test.ts retain base versions; their rewrites left missing helpers, incomplete fixtures, or unnecessary generic-only seams.
  • CI follow-up: made optional execution cleanup callbacks return promises and kept socket termination receiver-bound; no timeout, retry, assertion, or production behavior changed.
  • Independent review completed three full passes. Two findings were rejected against current source: describeMessageTool is required by ChannelMessageActionAdapter (types.core.ts), and the installed TypeScript JSON.stringify overloads return string. This local JSON writer is called only with objects. No accepted/actionable review finding remains.
  • Outbound send: retained main's plugin media fixtures, still-used mirror helper, and explicit-reply table row; dropped conflicting singleton conversion and helper deletion.
  • State: retained the literal legacy participants schema in the initial fixture refactor; excluded later participants/integrity rewrites and all pending-input schema changes to retain main's newer migration/rollback coverage.
  • CI: retained main's expanded build-scope and unowned-execution cases; excluded the later ci-known-main-red rewrites.
  • Worktrees (x7146): excluded the entire shard. Late CI exposed absent-property assertion changes followed by lifecycle cleanup failures in service.test.ts; retained all four test files from main and removed the now-unused support helper.
  • Infra: dropped all bootstrap, identity, and pairing changes after plain lint exposed stale helper calls left by automatic merges; retained the other four device test files.
  • Gateway chat injection: retained captioned and blank-caption cases with the first shared assertion helper; excluded subsequent conflicting rewrites of that file.
  • Rebase onto current main: retained board-widget-frame.test.ts and board-widget-frame.resilience.test.ts entirely from main after conflict; removed their now-unused task-created bridge fixture.
  • Board: retained first-pass view/view-retention cleanup; excluded their conflicting follow-up rewrites. Other board changes apply.
Per-shard changed files, replay LOC and declaration deltas, and source coverage notes

Declaration counts below are static it/test call-site counts, not expanded runtime case counts.

x7148

Replay test/support LOC: +1509/-2573 (-1064 net). Static declarations: 92 → 81 (-11).

Source report coverage note: Plain oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and check-changed were not run, as required by CI-only mode.

  • src/channels/plugins/helpers.test.ts
  • src/channels/plugins/message-action-dispatch.registry.test.ts
  • src/channels/plugins/message-actions.test.ts
  • src/channels/plugins/package-state-probes.test.ts
  • src/channels/plugins/read-only.test.ts
  • src/channels/plugins/session-conversation.test.ts
  • src/channels/plugins/setup-contract.test.ts
  • src/channels/plugins/setup-helpers.test.ts

x7153

Replay test/support LOC: +1211/-1776 (-565 net). Static declarations: 55 → 45 (-10).

Source report coverage note: Formatting, diff-check, and plain oxlint passed. Tests, coverage, and typechecking were not run under CI-only mode; hosted CI remains pending. Coordinator decision: accept this conservative reduction or request a broader cut.

  • src/gateway/server-methods/chat-send-message-injection.isolated-gateway.test.ts
  • src/gateway/server-methods/chat-send-message-injection.test.ts
  • src/gateway/server-methods/chat-send-ordering.test.ts
  • src/gateway/server-methods/chat-send-pending-input-withdrawal.test.ts
  • src/gateway/server-methods/chat-send-pending-inputs.test-support.ts
  • src/gateway/server-methods/chat-send-pending-inputs.test.ts
  • src/gateway/server-methods/chat-send-pre-admission.test.ts

x7143

Replay test/support LOC: +789/-1205 (-416 net). Static declarations: 19 → 20 (1).

Source report coverage note: Plain oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and typechecks were not run, per CI-only mode. No bug/flake fixes. Coordinator follow-up: hosted CI proof and acceptance of the below-target reduction.

  • src/gateway/worker-environments/worker-session-tool-executor.test-support.ts
  • src/gateway/worker-environments/worker-tool-authority.test.ts
  • src/gateway/worker-environments/worker-turn-attachments.boundary.test.ts
  • src/gateway/worker-environments/worker-turn-context-engine.test.ts
  • src/gateway/worker-environments/worker-turn-detached-context.test.ts

x7145

Replay test/support LOC: +223/-434 (-211 net). Static declarations: 17 → 16 (-1).

Source report coverage note: Oxlint exited 0; formatting and diff checks passed. Tests, coverage, and typechecks were not run under CI-only mode. No bug/flake fixes.

  • src/infra/device-auth-store.client.test.ts
  • src/infra/device-identity-async.test.ts
  • src/infra/device-pairing-churn.test.ts
  • src/infra/device-pairing-join-code.worker.test.ts

x7149

Replay test/support LOC: +1080/-1945 (-865 net). Static declarations: 79 → 70 (-9).

Source report coverage note: Formatting, git diff --check, and plain oxlint passed (exit 0). Tests, coverage, and typechecks were not run, per CI-only mode. The 25%-per-file target remains unmet. Further deletion needs stronger evidence of redundant coverage; distinct security, authority, lifecycle, and routing cases were retained.

  • src/infra/outbound/outbound-audit.test.ts
  • src/infra/outbound/outbound-policy.test.ts
  • src/infra/outbound/outbound-send-service.test.ts
  • src/infra/outbound/outbound-session.integration.test.ts
  • src/infra/outbound/outbound-session.test-helpers.ts
  • src/infra/outbound/outbound-session.test.ts

x7150

Replay test/support LOC: +1040/-1745 (-705 net). Static declarations: 66 → 56 (-10).

Source report coverage note: Oxlint exited 0; formatting and diff checks passed. Tests and coverage were not run, per CI-only instructions.

  • src/media-understanding/apply.test.ts
  • src/media-understanding/attachments.cache.test.ts
  • src/media-understanding/attachments.media-store-ref.test.ts
  • src/media-understanding/image.runtime-profile.test.ts
  • src/media-understanding/image.test.ts

x7151

Replay test/support LOC: +991/-1312 (-321 net). Static declarations: 46 → 42 (-4).

Source report coverage note: Oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and check-changed were not run, per CI-only instructions. No bugs/flakes fixed.

  • src/state/openclaw-agent-execution.close-wedge.test.ts
  • src/state/openclaw-agent-execution.creation-witness.test.ts
  • src/state/openclaw-agent-execution.registration.test.ts
  • src/state/openclaw-agent-json-predicate-schema.test.ts
  • src/state/openclaw-agent-participants-migration.test.ts

x7147

Replay test/support LOC: +1260/-1843 (-583 net). Static declarations: 53 → 45 (-8).

Source report coverage note: Oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and check-changed were not run, per CI-only instructions.

  • test/scripts/apple-app-i18n.test.ts
  • test/scripts/barnacle-auto-response.test.ts
  • test/scripts/bench-agent-concurrency.test.ts
  • test/scripts/bench-cli-startup.test.ts
  • test/scripts/bench-gateway-concurrency-cli.test.ts
  • test/scripts/bench-gateway-installed.test.ts

x7152

Replay test/support LOC: +943/-1295 (-352 net). Static declarations: 36 → 37 (1).

Source report coverage note: Plain oxlint, formatting, and diff-check passed. Tests and coverage were not run, per CI-only mode.

  • test/scripts/ci-git-owner.test-support.ts
  • test/scripts/ci-hourly.test.ts
  • test/scripts/ci-known-main-red.test.ts
  • test/scripts/ci-linux-git.test.ts
  • test/scripts/ci-node-test-plan.commands.test.ts

x7155

Replay test/support LOC: +243/-347 (-104 net). Static declarations: 44 → 44 (0).

Source report coverage note: oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and check-changed were not run, per CI-only mode. Coordinator decision: accept the smaller preservation-first reduction or request deeper restructuring.

  • ui/src/components/board/board-view-retention.test.ts
  • ui/src/components/board/board-view.test.ts
  • ui/src/components/board/board-widget-cell-mcp-app.test.ts
  • ui/src/components/board/board-widget-cell.test-support.ts

@clawsweeper

clawsweeper Bot commented Oct 16, 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.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 13:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T14:27:28.895028Z fcef481 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 app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 16, 2026
@steipete
steipete disabled auto-merge October 16, 2026 13:37
@steipete
steipete enabled auto-merge (squash) October 16, 2026 13:44
@steipete
steipete force-pushed the tcr/land-d172-1792156270 branch from 4541de1 to 7e0feb6 Compare October 16, 2026 13:53
@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 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates repeated test fixtures and assertions across core and UI suites without changing production code.

Example: A device requests operator.admin and later reconnects requesting operator.pairing.

  • Before: A standalone test checks that the original pairing request ID remains usable.
  • After: A shared table checks the same request-ID behavior alongside the explicit-subset case.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no concrete introduced defect found; available validation is harness-based and the hosted gate has not completed.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only cleanup requires no contributor live demonstration; hosted test validation remains incomplete, and measured coverage equivalence is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixtures and assertions increase test maintenance cost.
Reason: The maintainer-authored direction is approved, and the verified scope reduces test code without adding a production surface.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: the test consolidation has clear maintenance value, and no concrete introduced correctness or security defect was identified.

Priority: P3
Reviewed head: 7e0feb6391f472643466b64f00797ec4d1ad91bc

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed test infrastructure supplies synthetic requests, files, and lifecycle events to existing production owners and checks their observable results.

flowchart LR
  A[Test scenarios] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Observable results]
  D --> E[Contract assertions]
  E --> F[Hosted CI gate]
Loading

Technical review

Best possible solution:

Retain the consolidation and land through the existing exact-head CI gate with established handling for inherited failures.

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

This PR addresses test maintenance rather than a product defect; static inspection and existing hosted results were reviewed without executing tests.

Is this the best way to solve the issue?

Shared fixtures and parameterized cases fit the maintenance goal, and inspected lifecycle, pairing, retry, migration, and attachment boundaries retain their substantive assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 10ee98441845.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Jason (Json): Raw commit 8c1ea03 adds ui/src/components/board/board-widget-cell-mcp-app.test.ts:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 8c1ea03da099; files: ui/src/components/board/board-widget-cell-mcp-app.test.ts)

PR surface

Tests -3793, Other -2. Total -3795 across 58 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 57 5856 9649 -3793
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 58 5856 9651 -3795

Review metrics

Metric Value Why it matters
Production versus test changes Production +0/-0; tests and support +9,369/-14,694 The introduced diff removes 5,325 net test/support lines through consolidation; the two baseline-row deletions are excluded.

Labels

Label changes:

  • add P3: This is maintenance cleanup with no production behavior change or demonstrated user-facing 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 maintenance cleanup with no production behavior change or demonstrated user-facing 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 16, 2026, 10:11 AM ET / 14:11 UTC.

@steipete
steipete disabled auto-merge October 16, 2026 14:17
@steipete
steipete enabled auto-merge (squash) October 16, 2026 14:22
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Oct 16, 2026
@steipete
steipete merged commit 9222917 into main Oct 16, 2026
139 checks passed
@steipete
steipete deleted the tcr/land-d172-1792156270 branch October 16, 2026 14:39
steipete added a commit that referenced this pull request Oct 16, 2026
Hourly 38916811035 reported the route inventories as unused, but Vite
loads them through runnerImport and embeds them in the offline shell.
Keep that runtime contract and model the actual named property reads in
Knip through its existing MJS compiler. Preserve Vite discovery and
TypeScript declaration-to-source mapping; add no ignores.

Make four remaining declarations private after #174279 and #174260
removed external logging consumers and #174255 consolidated fixtures.
Their internal callers and behavior remain intact. I18nController was
already removed by #174263.

Proof: all three deadcode export scans have zero findings; the original
baseline had six. The guard passes with pnpm test
test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 (5.67s).
Existing route/build/cache tests and 148 owner/importer cases pass
(199.76s for the owner batch). Owning typechecks, typed lint, boundary
lint, and formatting pass. Negative control and P2 review recorded in
PR evidence.

P2 autoreview is scoped-clean with no actionable findings.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* test(gateway): deslop x7143 tests

* test(gateway): deslop x7143 tests

* test(gateway): deslop x7143 tests

* test(outbound): deslop x7149 tests

* test(outbound): deslop x7149 tests

* test(scripts): deslop x7147 tests

* test(scripts): deslop x7147 tests

* test(scripts): deslop x7147 tests

* test(state): deslop x7151 tests

* test(state): deslop x7151 tests

* test(state): deslop x7151 tests

* test(ci): deslop x7152 tests

* test(ci): deslop x7152 tests

* test(ci): deslop x7152 tests

* test(channels): deslop x7148 tests

* test(channels): deslop x7148 tests

* test(worktrees): deslop x7146 tests

* test(worktrees): deslop x7146 tests

* test(infra): deslop x7145 tests

* test(infra): deslop x7145 tests

* test(infra): deslop x7145 tests

* test(gateway): deslop x7153 tests

* test(gateway): deslop x7153 tests

* test(gateway): deslop x7153 tests

* test(media-understanding): deslop x7150 tests

* test(media-understanding): deslop x7150 tests

* test(media-understanding): deslop x7150 tests

* test(board): deslop x7155 tests

* test(board): deslop x7155 tests

* test(infra): preserve current device regression fixtures

* test: repair d172 fixtures from hosted CI evidence

* test(board): drop unused bridge fixture after rebase

* test: preserve promise and socket fixture contracts

* test(worktrees): preserve lifecycle fixtures after CI failure
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…w#174358)

Hourly 38916811035 reported the route inventories as unused, but Vite
loads them through runnerImport and embeds them in the offline shell.
Keep that runtime contract and model the actual named property reads in
Knip through its existing MJS compiler. Preserve Vite discovery and
TypeScript declaration-to-source mapping; add no ignores.

Make four remaining declarations private after openclaw#174279 and openclaw#174260
removed external logging consumers and openclaw#174255 consolidated fixtures.
Their internal callers and behavior remain intact. I18nController was
already removed by openclaw#174263.

Proof: all three deadcode export scans have zero findings; the original
baseline had six. The guard passes with pnpm test
test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 (5.67s).
Existing route/build/cache tests and 148 owner/importer cases pass
(199.76s for the owner batch). Owning typechecks, typed lint, boundary
lint, and formatting pass. Negative control and P2 review recorded in
PR evidence.

P2 autoreview is scoped-clean with no actionable findings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui 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