Skip to content

test(cli,config,ui): remove low-value tests (batch d356) - #178987

Merged
steipete merged 34 commits into
mainfrom
tcr/land-d356-1792552866
Oct 21, 2026
Merged

steipete merged 34 commits into
mainfrom
tcr/land-d356-1792552866

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Test fixtures and repeated assertions carry unnecessary duplication across CLI, config, sidebar, worker, gateway, channel, script, and board suites.

User Impact

No production or user-visible behavior change. This batch compacts tests and reuses test-only fixtures; it does not change runtime code, configuration, dependencies, or public APIs.

Why This Change Was Made

Replay campaign batch d356 onto pinned main f88c606. All 30 supplied commits were applied in order, with only the conflict adjustments listed below. Keep distinct behavioral checks and main's newer regression coverage while removing repetitive test plumbing.

Replay adjustments

  • Sidebar pinned agents: retain main's navigationDrawerToggle helper and chat.startup response while moving the test body into a helper; retain the branch's compact mobile-class check.
  • Sidebar pull requests: drop the conflicting file rewrite entirely; keep main's richer fixtures, captures, and current navigation helper.
  • Config paths: retain every main-added model fallback row and diagnostic grammar assertion; share the fallback data without removing cases.
  • Second config commit: drop conflicting rewrites of channel-capabilities, channel-configured, config-paths, and control-ui-link-base. Earlier compaction in those files remains; main's additional channel/bootstrap, shorthand, and public-origin tests remain.
  • Logs follow-file-change: drop the conflicting rewrite; main's log-rotation test stays unchanged.
  • Hosted CI exposed a mock-capture issue in the shared-harness MCP loopback rewrite; drop that file rewrite and retain main's complete isolated loopback tests.
  • Rebase for GitHub merge conflict onto f88c606: drop the errors.test.ts rewrite in the Teams shard, preserving main's real Connector HTTP tests and updated retry/error contracts from c622b70. Other replay changes are unchanged.
  • No entire commit was skipped. One follow-up commit preserves the current sidebar startup fixture after extraction.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <all changed TS/JS files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <all changed TS/JS files>: passed, exit 0.
  • git diff --check f88c606: passed.
  • CI-only operator instruction: no local Vitest, check-changed, tsgo, coverage, or Testbox runs. Hosted openclaw/ci-gate is the behavioral proof and merge gate. Independent review runs during CI.
  • Independent review completed in two passes. Both findings were rejected against current source: installed Solid 2 exports merge (ui/node_modules/solid-js/types/index.d.ts), and the Talk catalog schema explicitly declares aliases, voices, and transports optional (packages/gateway-protocol/src/schema/channels.ts). No accepted/actionable finding remains. The later rebase only drops the conflicted Teams test rewrite and retains main's replacement.
  • First hosted run https://github.com/openclaw/openclaw/actions/runs/39539640761 caught fixture typing, unbound test methods, consistent-return violations, a direct vi.hoisted export, mock-export isolation requirements, and absent-vs-undefined subprocess assertion differences. Repaired these from the job logs without running local tests. Two focused independent repair reviews completed clean (P0-P2). Fresh-head CI validates the repairs; the failing prior head is not passing proof.
  • Second hosted run https://github.com/openclaw/openclaw/actions/runs/39540699557 passed the repaired test/lint/type jobs; its remaining ratchet failure requested removal of 15 exact stale mock-export baseline rows. Those rows were removed verbatim from the job evidence, with no added exceptions or changed source. Independent review of the exact baseline shrink completed clean. PostgreSQL jobs were still pending at diagnosis; final-head CI remains the merge gate.
  • Production LOC: +0/-0. Tests and test support: +5557/-8809 (net -3252). Mock-export baseline metadata: +0/-15. 97 changed files.
  • No CODEOWNERS patterns match the changed paths.
  • This is test-only; no visual product change or new screenshot proof is claimed.

Per-shard replay inventory

The counts below are static source counts on the actual replay versus pinned main, not executed test counts. Declarations count it/test calls (including table declarations); table expansion is not inferred. LOC includes shard-local test support. The source reports contain no measured coverage totals: they explicitly say coverage was not run under CI-only instructions. Therefore no <=1% coverage-drop claim is made.

z0603: LOC 1218 → 978 (-240); declarations 20 → 20
  • src/cli/runtime-cleanup-scope.retirement.test.ts
  • src/cli/runtime-cleanup-scope.test.ts
  • src/cli/signal-exit-barrier.test.ts
  • src/cli/skills-cli.clawhub-install.e2e.test.ts
  • src/cli/skills-cli.sag.process.test.ts
  • src/cli/skills-library-input.test.ts
  • src/cli/skills-search-cli.test.ts
  • src/cli/startup-trace.test.ts

Source-report validation/coverage statement: Formatting, git diff --check, and plain oxlint passed (exit 0). No production or external support files changed. Tests, coverage, and check-changed were not run, per CI-only mode; hosted CI remains pending.

z0602: LOC 1221 → 974 (-247); declarations 27 → 22
  • ui/src/pages/config/config-page-update-report.test.ts
  • ui/src/pages/config/config-page.memory-route.test.ts
  • ui/src/pages/config/curated-settings.test.tsx
  • ui/src/pages/config/memory-page.browser.test.ts
  • ui/src/pages/config/talk-render.test.ts
  • ui/src/pages/config/updates-page.confirmation.test.ts
  • ui/src/pages/config/updates.test-support.ts
  • ui/src/pages/config/view.themes.browser.test.ts

Source-report validation/coverage statement: Plain oxlint exited 0; formatting and diff checks passed. No production/support changes or bug fixes. Tests, coverage, and typechecking were not run under CI-only instructions.

z0605: LOC 1082 → 811 (-271); declarations 8 → 8
  • ui/src/e2e/sidebar-contract.test-support.ts
  • ui/src/e2e/sidebar-new-conversation.e2e.test.ts
  • ui/src/e2e/sidebar-pinned-agents.e2e.test.ts
  • ui/src/e2e/sidebar-plugin-order.e2e.test.ts
  • ui/src/e2e/sidebar-profileless-scope.e2e.test.ts
  • ui/src/e2e/sidebar-rail-alignment.e2e.test.ts
  • ui/src/e2e/sidebar-refresh-availability.e2e.test.ts
  • ui/src/e2e/sidebar-restart-recovery.e2e.test.ts

Source-report validation/coverage statement: Plain oxlint exited 0; formatting and diff checks passed. Tests, coverage, and check-changed were not run, per CI-only mode.

z0607: LOC 1208 → 1015 (-193); declarations 24 → 22
  • ui/src/components/agent-avatar-hat.test.ts
  • ui/src/components/agent-row-chip.test.ts
  • ui/src/components/agent-scope-control.test.tsx
  • ui/src/components/app-sidebar-catalog-menu.test.tsx
  • ui/src/components/app-sidebar.owner-query.test.ts
  • ui/src/components/app-sidebar.personal-agent-scope.test.ts
  • ui/src/components/app-sidebar.pinned-agents.test.ts
  • ui/src/components/app-sidebar.sessions.test.ts
  • ui/src/test-helpers/agent-sidebar.test-support.ts

Source-report validation/coverage statement: Plain oxlint exited 0; formatting and diff checks passed. Tests and coverage were not run, per CI-only instructions.

z0608: LOC 1211 → 973 (-238); declarations 58 → 57
  • src/config/channel-capabilities.test.ts
  • src/config/channel-configured.test.ts
  • src/config/config-paths.test.ts
  • src/config/config.model-ref-validation.test.ts
  • src/config/config.sandbox-docker.test.ts
  • src/config/config.utility-model.test.ts
  • src/config/config.web-search-provider.test.ts
  • src/config/control-ui-link-base.test.ts

Source-report validation/coverage statement: Plain oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and check-changed were not run, per CI-only instructions.

z0609: LOC 1211 → 882 (-329); declarations 28 → 27
  • test/scripts/check-deadcode-reporting.test.ts
  • test/scripts/check-deprecated-api-usage.test.ts
  • test/scripts/check-docs-mdx.test.ts
  • test/scripts/check-dynamic-import-warts.test.ts
  • test/scripts/check-file-utils.test.ts
  • test/scripts/check-line-cap-ratchet.test.ts
  • test/scripts/check-madge-import-cycles.test.ts
  • test/scripts/check-no-conflict-markers.test.ts

Source-report validation/coverage statement: Formatting, diff-check, and plain oxlint passed. Tests, coverage, and check-changed were not run, per CI-only mode.

z0613: LOC 1207 → 890 (-317); declarations 25 → 25
  • ui/src/lib/board/grid.test.ts
  • ui/src/lib/board/widget-sandbox-host.test.ts

Source-report validation/coverage statement: Oxlint exited 0; formatting and diff checks passed. Tests and coverage were not run under CI-only instructions.

z0610: LOC 1210 → 1059 (-151); declarations 19 → 19
  • src/gateway/server-methods/chat-send-attachments.private-skills.test.ts
  • src/gateway/server-methods/chat-send-attachments.test-support.ts
  • src/gateway/server-methods/chat-send-auth-policy.test.ts
  • src/gateway/server-methods/chat-send-command-replies.test.ts
  • src/gateway/server-methods/chat-send-hidden-question.test.ts
  • src/gateway/server-methods/chat-send-history-delivery.test-support.ts
  • src/gateway/server-methods/chat-send-interrupt.test.ts
  • src/gateway/server-methods/chat-send-late-followup.test.ts

Source-report validation/coverage statement: Formatting, git diff --check, and plain oxlint passed. Tests, coverage, and typechecking were not run, per CI-only mode. No bug or flake fixes.

z0614: LOC 1049 → 790 (-259); declarations 36 → 36
  • extensions/msteams/src/auth-coverage.test.ts
  • extensions/msteams/src/channel-config.account-mutations.test.ts
  • extensions/msteams/src/conversation-store-helpers.test.ts
  • extensions/msteams/src/conversation-store-state.test.ts
  • extensions/msteams/src/conversation-store.shared.test.ts
  • extensions/msteams/src/format.test.ts
  • extensions/msteams/src/graph-group-management.test.ts

Source-report validation/coverage statement: Formatting, plain oxlint, and diff checks passed. Tests, coverage, and typechecking were not run, per CI-only instructions. No production or external support files changed; no bug fixes.

z0606: LOC 899 → 653 (-246); declarations 25 → 20
  • src/cli/machine-output-modes.test.ts
  • src/cli/mcp-cli.cleanup.test.ts
  • src/cli/mcp-cli.import-boundary.test.ts
  • src/cli/message-plugin-cleanup.process.test.ts
  • src/cli/models-cli.lazy.test.ts
  • src/cli/nodes-cli.plugin-registration.test.ts

Source-report validation/coverage statement: Oxlint exited 0; formatting and git diff --check passed. Tests, coverage, and typechecks were not run, per CI-only mode. No bug fixes were attempted.

z0612: LOC 1207 → 1012 (-195); declarations 17 → 15
  • src/infra/update-runner-git-admission.test-support.ts
  • src/infra/update-runner-git-cleanup.test.ts
  • src/infra/update-runner-git-node-preflight.test.ts
  • src/infra/update-runner.test.ts
  • src/infra/update-runtime-path-index.test.ts
  • src/infra/update-startup-discovery.test.ts
  • src/infra/update-startup.test-support.ts
  • src/infra/warning-filter.test.ts

Source-report validation/coverage statement: Oxlint exited 0; formatting and diff checks passed. Tests, coverage, and check-changed were not run, per CI-only mode. Coordinator review and hosted CI remain pending.

z0611: LOC 1217 → 970 (-247); declarations 27 → 25
  • src/worker/browser-runtime.test.ts
  • src/worker/native-worker-authority.test.ts
  • src/worker/native-worker.test-support.ts
  • src/worker/node-supervisor-protocol.test.ts
  • src/worker/worker-connection-endpoint.test.ts
  • src/worker/worker-deploy-entry.test.ts
  • src/worker/worker-fault-injection.cleanup.test.ts
  • src/worker/worker.transcript-failure.test.ts

Source-report validation/coverage statement: Plain oxlint, oxfmt, and git diff --check passed. Tests, coverage, and check-changed were not run, per CI-only mode. No production/support changes or bug fixes. Coordinator follow-up: hosted CI verification and acceptance of the target shortfall.

z0616: LOC 1203 → 884 (-319); declarations 37 → 28
  • src/channels/plugins/account-config-mutation.msteams.test.ts
  • src/channels/plugins/account-config-mutation.test.ts
  • src/channels/plugins/account-key-policy.test.ts
  • src/channels/plugins/acp-configured-binding-consumer.test.ts
  • src/channels/plugins/acp-stateful-target-driver.test.ts
  • src/channels/plugins/binding-targets.test.ts
  • src/channels/plugins/chat-target-prefixes.test.ts
  • src/channels/plugins/config-helpers.test.ts

Source-report validation/coverage statement: Formatting, plain oxlint, and diff checks passed. Tests, coverage, and typechecks were not run, per CI-only mode.

@clawsweeper

clawsweeper Bot commented Oct 21, 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 21, 2026 03:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T04:08:37.889280Z 2583ea4 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 channel: msteams Channel integration: msteams app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes docker Docker and sandbox tooling size: XL labels Oct 21, 2026
@steipete
steipete force-pushed the tcr/land-d356-1792552866 branch from e463a6c to fb12703 Compare October 21, 2026 03:37
@steipete
steipete disabled auto-merge October 21, 2026 03:44
@steipete
steipete enabled auto-merge (squash) October 21, 2026 03:49
@steipete
steipete disabled auto-merge October 21, 2026 04:00
@steipete
steipete enabled auto-merge (squash) October 21, 2026 04:04
@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 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates repeated test setup and assertions across CLI, config, channels, Gateway, workers, tooling, and Control UI suites.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Source inspection and successful hosted test lanes support the consolidation, with no actionable finding; validation remains incomplete while the aggregate CI gate is pending.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only cleanup changes no shipped behavior; exact-head hosted test results support validation without requiring new product media.
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-authored direction is established, and removing repeated test plumbing provides maintenance value without changing product behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-directed test cleanup is useful, and inspection found no actionable introduced defect; exact-head CI is still pending.

Priority: P3
Reviewed head: 2583ea4b6286b907fa6f69274444bb56a2d90041

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed test suites supply synthetic configuration, network responses, lifecycle events, and UI interactions to existing production owners, then check their observable results.

flowchart LR
  A[Synthetic fixtures] --> B[Tests and shared test helpers]
  B --> C[Existing production owners]
  C --> D[Observable results]
  D --> E[Contract assertions]
  E --> F[Hosted CI]
Loading

Technical review

Best possible solution:

Land the test-only consolidation with its retained behavioral assertions once the existing exact-head CI gate passes.

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

This PR claims test-maintenance improvements rather than a user-visible bug; source comparison and hosted CI are the relevant evidence.

Is this the best way to solve the issue?

Consolidating fixtures and case tables within existing suites fits the stated maintenance goal, and the inspected changes retain distinct lifecycle, authorization, configuration, and UI contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4adb225357c2.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned change scope: The verified introduction range contains only tests, test support, and shrink-only mock-export metadata; production code, dependencies, configuration defaults, and public APIs are unchanged. (2583ea4b6286)
  • MCP regression contracts retained: The compacted suite retains accepted and rejected DELETE responses, JSON and text diagnostics, Doctor reporting, unchanged configuration after failed verification, and discovery-error precedence from fix(mcp): surface failed session cleanup in CLI checks #173830. (src/cli/mcp-cli.cleanup.test.ts, 2583ea4b6286)
  • Sidebar regression purpose preserved: The shared fixture preserves the bounded request-loop observer, legacy participant cases, explicit empty-owner selection, and same-ID human/agent distinction introduced by fix(ui): stop sidebar refresh loops with legacy session participants #172575. (ui/src/test-helpers/agent-sidebar.test-support.ts:37, 2583ea4b6286)
  • Current-main behavior checked: Current main still joins MCP cleanup and reports uncertainty with recovery guidance; this PR reorganizes the tests protecting that behavior. (src/cli/mcp-cli-probe.ts:85, 4adb225357c2)
  • Exact-head validation: Hosted changed-node, UI, UI E2E, lint, type, and baseline-ratchet checks succeeded on the reviewed head; PostgreSQL conformance shards 2/3 and 3/3 remained in progress, and openclaw/ci-gate remained pending. (2583ea4b6286)
  • Repository policy applied: Read the root and applicable ancestor policies, test-audit guidance, and pr-simplify steps 1–3; no maintainer-notes directory exists, no changed path matches CODEOWNERS, and the installed Solid cheat sheet is unavailable locally. (AGENTS.md, 2583ea4b6286)

Likely related people:

  • Peter Steinberger: Raw commit c60db01 adds src/cli/startup-trace.test.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c60db01a455d; files: src/cli/startup-trace.test.ts)
  • Montrell Cruse: Raw commit 4b8021d adds src/cli/mcp-cli.cleanup.test.ts:18 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4b8021d375eb; files: src/cli/mcp-cli.cleanup.test.ts)
  • Jason (Json): Raw commit a7bddbc adds ui/src/components/app-sidebar.owner-query.test.ts:120 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a7bddbc2fee6; files: ui/src/components/app-sidebar.owner-query.test.ts)
  • Dallin Romney: Raw commit 1ca2750 adds src/worker/native-worker-authority.test.ts:22 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1ca275087fde; files: src/worker/native-worker-authority.test.ts)
  • Vincent Koc: Raw commit c1ee660 adds src/cli/startup-trace.test.ts:9 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c1ee660b858b; files: src/cli/startup-trace.test.ts)

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 and support +5491/-8743; mock-export baseline +0/-15 The verified introduction range removes 3252 net test/support lines through consolidation without adding production machinery or baseline exceptions.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no intended user-visible runtime 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 cleanup with no intended user-visible runtime 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 21, 2026, 12:25 AM ET / 04:25 UTC.

@steipete
steipete merged commit cef02ca into main Oct 21, 2026
147 checks passed
@steipete
steipete deleted the tcr/land-d356-1792552866 branch October 21, 2026 04:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…8987)

* test(cli): deslop z0603 tests

* test(cli): deslop z0603 tests

* test(cli): deslop z0603 tests

* test(config): deslop z0602 tests

* test(config): deslop z0602 tests

* test(config): deslop z0602 tests

* test(sidebar): deslop z0605 tests

* test(sidebar): deslop z0605 tests

* test(ui): deslop z0607 tests

* test(ui): deslop z0607 tests

* test(config): deslop z0608 tests

* test(config): deslop z0608 tests

* test(scripts): deslop z0609 tests

* test(scripts): deslop z0609 tests

* test(board): deslop z0613 tests

* test(board): deslop z0613 tests

* test(gateway): deslop z0610 tests

* test(gateway): deslop z0610 tests

* test(gateway): deslop z0610 tests

* test(msteams): deslop z0614 tests

* test(cli): deslop z0606 tests

* test(cli): deslop z0606 tests

* test(infra): deslop z0612 tests

* test(infra): deslop z0612 tests

* test(infra): deslop z0612 tests

* test(worker): deslop z0611 tests

* test(worker): deslop z0611 tests

* test(worker): deslop z0611 tests

* test(channels): deslop z0616 tests

* test(channels): deslop z0616 tests

* test(sidebar): preserve current startup fixture in compacted test

* test: repair compacted fixture contracts found by CI

* test: preserve isolated mock contracts in compacted suites

* test: prune stale mock export baseline entries
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 channel: msteams Channel integration: msteams cli CLI command changes docker Docker and sandbox tooling 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