Skip to content

test(core,ui,plugins): remove low-value tests (batch d018) - #167240

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d018-1791457804
Oct 8, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d018-1791457804

Conversation

@steipete

@steipete steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

This maintainer-requested test cleanup removes repeated setup, duplicate behavior cases, and implementation-level assertions from ten validated campaign shards.

User Impact

There is no user-visible runtime change. Distinct authorization, privacy, cancellation, delivery, and lifecycle regression cases remain; retained cases from retired split suites move into their existing owner suites.

Why This Change Was Made

Batch d018 replays all ten requested commits onto main at b925148b83b7ebddb32e1dd68769d6588d16f800. All commits applied in order without conflicts or skipped commits. Existing main changes were preserved. One subsequent rebase included main's orphan-export fix f6c34cd2a5cdaba11017a46f72ff3a9c611e4f0e; git range-diff confirms all eleven commits (ten batch commits plus review corrections) remained patch-identical. Follow-up review retained four narrowly scoped contracts described below. Only test code, test support, and obsolete test inventory entries change. No CODEOWNERS rule matches the changed paths.

The replay diff is +4,183 / -8,455 lines (net -4,272) across 78 files: runtime production +0/-0, tests and support +4,183/-8,452, and CI inventory tooling +0/-3. The test-support subtotal includes four removed entries in the database-worker test inventory.

Review adjustments

The full diff review raised six P2 findings. Four were accepted: retained the raw command and picker thread-parent denial cases, the configured/requested proxy-scope intersection case without a declared-scope header, and the prepared reasoning-final lane assertion; enriched the retained v1 outbox migration case with the original failed-send error and attachment bytes. These restore four executed cases and strengthen one existing case without restoring the retired split suites. A focused review of these corrections found no actionable P0–P2 issues.

Two findings were rejected after checking the owner and surviving tests. Incognito admission, update, and removal all use the same reader/writer, whose unconditional scrub is protected by the retained queue-update and store-owner privacy tests. The permission lifecycle table still changes sessionKey for both success and rejection, and production checks selection ownership before inspecting an unavailable patch result; the deleted null-result row duplicated that guard.

Evidence

  • Final head 05834c927564e93eb273cc20fc58f71d1469feae: 566 tests passed across 44 files (43 surviving changed tests plus the CI inventory owner), using CI=1 pnpm test <files> on Blacksmith Testbox tbx_01m4dpzwzaky4jn94ze8cywrbq. Testbox run.
  • oxfmt --write <changed files>, plain oxlint -c .oxlintrc.json <changed files>, and git diff --check: pass on the final tree.
  • The final check:changed --base b925148b83b7ebddb32e1dd68769d6588d16f800 -- <changed paths> passed formatting, ratchets, boundary guards, all 27 core test type-check shards, and production UI types. It was interrupted during extension test types because the wrapper's temporary full checkout disappeared; the remaining extension/script/dead-export/type-aware-lint checks are not claimed as passing on this final head. No code diagnostic preceded that interruption. Hosted openclaw/ci-gate remains the merge gate under the campaign's infrastructure-gap policy.
  • The earlier replay passed 560 focused tests. Its broad gate passed all core/UI/extension/script types, then reported the untouched LocalRemoteShellSpawnResult export. Main had already removed that export in f6c34cd2a5cdaba11017a46f72ff3a9c611e4f0e, which this branch includes after rebase. The four review-corrected files and inventory test also passed before the patch-identical rebase.
  • Full-diff review: six P2 findings; four addressed and two rejected with owner/source evidence above. Focused review of all four corrected files: no actionable P0–P2 findings. No runtime behavior or visual UI changes.

Original shard evidence follows. These are the campaign's before/after measurements, not a new coverage measurement on this rebased head. LOC and declaration counts describe the original shard inventory; the replay diff above is authoritative for this PR.

Shard Test LOC before → after Declarations before → after Executed tests before → after
w1163 5,040 → 4,739 56 → 52 201 → 158
w1167 3,776 → 3,324 54 → 47 79 → 60
w1165 1,658 → 1,257 55 → 38 65 → 46
w1164 4,008 → 3,532 55 → 49 79 → 65
w1162 2,550 → 2,048 55 → 44 87 → 66
w1169 1,350 → 1,137 53 → 41 56 → 42
w1171 2,871 → 2,741 52 → 47 75 → 64
w1166 5,205 → 5,042 55 → 51 73 → 65
w1168 3,415 → 2,797 55 → 41 91 → 45
w1173 2,562 → 2,012 52 → 39 65 → 42

w1163 additionally removes 495 lines from exclusive case helpers (3,305 → 2,810); helper-inclusive declarations are 142 → 119. w1173 additionally removes a redundant shared-helper case and its unused parameter.

Coverage limits: w1166 compares only 1/16 original files; 15 were excluded following a baseline RPC timeout. Both reduced snapshots passed, but those excluded files have no comparable coverage claim. w1168 used a separately repaired baseline (d8344f4bb6e) that fixes a stale documentation reference in qa/scenarios/plugins/skill-owner-direct-edit-live.yaml. Original changed-check runs for w1162, w1163, w1168, and w1171 were incomplete because of infrastructure failures. w1173's original changed check found five unused test-helper exports also reproduced on its baseline. Fresh replay validation is reported above separately.

Per-shard files and original coverage totals

w1163

  • ui/src/components/app-sidebar.background-scope.test.ts
  • ui/src/components/app-sidebar.bootstrap-race.test.ts
  • ui/src/components/app-sidebar.catalog-discovery.test.ts
  • ui/src/components/app-sidebar.catalog-hidden-pages.test.ts
  • ui/src/components/app-sidebar.catalog-import.test.ts
  • ui/src/components/app-sidebar.catalog-scope.test.ts
  • ui/src/components/app-sidebar.interactions.test.ts
  • ui/src/components/app-sidebar.lineage-freshness.test.ts
  • ui/src/components/app-sidebar.lineage-successor.test.ts
  • ui/src/components/app-sidebar.projection-memo.test.ts
  • ui/src/components/app-sidebar.session-feedback.test.ts
  • ui/src/test-helpers/app-sidebar-cases/basics.ts
  • ui/src/test-helpers/app-sidebar-cases/footer-status.ts
  • ui/src/test-helpers/app-sidebar-cases/group-mutations.ts
  • ui/src/test-helpers/app-sidebar-cases/interactions.ts
  • ui/src/test-helpers/app-sidebar-cases/new-group-dialog.ts
  • ui/src/test-helpers/app-sidebar-cases/section-reordering.ts
  • ui/src/test-helpers/app-sidebar-cases/session-mutations.ts
  • ui/src/test-helpers/app-sidebar-cases/sidebar-scroll.ts
  • scripts/lib/ci-proof-test-inventory.mts
covered statements 11543 -> 11542 (-1); branches 9232 -> 9228 (-4); functions 2537 -> 2537 (0)

w1167

  • extensions/telegram/src/bot-message-dispatch.delivery-transcript.test.ts
  • extensions/telegram/src/bot-message-dispatch.directive-delivery.test.ts
  • extensions/telegram/src/bot-message-dispatch.draft-finalization.test.ts
  • extensions/telegram/src/bot-message-dispatch.fallback-topic-media.test.ts
  • extensions/telegram/src/bot-message-dispatch.final-delivery-lifecycle.test.ts
  • extensions/telegram/src/bot-message-dispatch.native-question.test.ts
  • extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.progress-card.test.ts
  • extensions/telegram/src/bot-message-dispatch.progress-command-detail.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.reasoning-room-events.test.ts
  • extensions/telegram/src/bot-message-dispatch.reply-targets.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.status-reactions.test.ts
  • scripts/lib/ci-proof-test-inventory.mts
  • test/vitest/vitest.extension-database-workers-paths.mjs
covered statements 4559 -> 4559 (0); branches 3356 -> 3356 (0); functions 923 -> 923 (0)
no per-file drops

w1165

  • src/gateway/terminal/session-manager.agent-lifecycle.test.ts
  • src/gateway/terminal/session-manager.detach.test.ts
  • src/gateway/terminal/session-manager.eviction.test.ts
  • src/gateway/terminal/session-manager.intro-banner.test.ts
  • src/gateway/terminal/session-manager.open-cancellation.test.ts
  • src/gateway/terminal/session-manager.output-ring.test.ts
  • src/gateway/terminal/session-manager.test.ts
covered statements 491 -> 490 (-1); branches 292 -> 290 (-2); functions 105 -> 105 (0)

w1164

  • packages/agent-core/src/agent-loop.async-tools.test.ts
  • packages/agent-core/src/agent-loop.steering.test.ts
  • packages/agent-core/src/agent-loop.test.ts
  • packages/agent-core/src/agent-loop.tool-batch-admission.test.ts
covered statements 986 -> 986 (0); branches 702 -> 701 (-1); functions 193 -> 193 (0)

w1162

  • ui/src/pages/chat/chat-pane-session-controls.model.test.ts
  • ui/src/pages/chat/chat-pane-session-controls.permissions.test.ts
  • ui/src/pages/chat/chat-pane-session-controls.test.ts
  • ui/src/pages/chat/composer-persistence.failed-attachments.test.ts
  • ui/src/pages/chat/composer-persistence.incognito.test.ts
  • ui/src/pages/chat/composer-persistence.presence.test.ts
  • ui/src/pages/chat/composer-persistence.test.ts
covered statements 7684 -> 7630 (-54);
branches 5375 -> 5348 (-27);
functions 1214 -> 1206 (-8)

w1169

  • extensions/synology-chat/src/channel.pairing.test.ts
  • extensions/synology-chat/src/channel.test.ts
covered statements 532 -> 532 (0); branches 294 -> 294 (0); functions 133 -> 133 (0)
no per-file drops

w1171

  • extensions/discord/src/monitor/message-handler.ack-policy.test.ts
  • extensions/discord/src/monitor/message-handler.context-history.test.ts
  • extensions/discord/src/monitor/message-handler.debounce-policy.test.ts
  • extensions/discord/src/monitor/message-handler.preflight-owned-threads.test.ts
  • extensions/discord/src/monitor/message-handler.queue.test.ts
  • extensions/discord/src/monitor/native-command.guild-guards.test.ts
  • extensions/discord/src/monitor/native-command.interaction-boundary.test.ts
covered statements 2743 -> 2743 (0); branches 2058 -> 2058 (0); functions 557 -> 557 (0)
no per-file drops

w1166

  • src/gateway/server.auth.compat-baseline.test.ts
  • src/gateway/server.auth.trusted-proxy-device-autoapprove.test.ts
  • src/gateway/server.chat-adopted-failure.test.ts
  • src/gateway/server.chat-cli-auth.test.ts
  • src/gateway/server.chat-command-context.test.ts
covered statements 20420 -> 20420 (0); branches 11252 -> 11246 (-6); functions 3978 -> 3978 (0)

w1168

  • extensions/qa-lab/src/scenario-catalog.approval.test.ts
  • extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
  • extensions/qa-lab/src/scenario-catalog.delegation.test.ts
  • extensions/qa-lab/src/scenario-catalog.prompt-evidence.test.ts
  • extensions/qa-lab/src/scenario-catalog.test.ts
  • extensions/qa-lab/src/suite-run-isolated.cleanup.test.ts
  • extensions/qa-lab/src/suite-run-isolated.nested.test.ts
  • extensions/qa-lab/src/suite-run-isolated.runtime.test.ts
  • extensions/qa-lab/src/suite-runtime-parity-runner.cleanup.test.ts
  • extensions/qa-lab/src/suite-runtime-parity-runner.control-ui.test.ts
covered statements 2393 -> 2393 (0); branches 1522 -> 1522 (0); functions 537 -> 537 (0)
no per-file drops

w1173

  • extensions/openai/openai-provider.models.test.ts
  • extensions/openai/openai-provider.test.ts
  • extensions/openai/test-support/model-service-tiers.test-support.ts
covered statements 691 -> 689 (-2); branches 590 -> 590 (0); functions 158 -> 156 (-2)

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: telegram Channel integration: telegram app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts extensions: openai extensions: qa-lab channel: synology-chat size: XL labels Oct 8, 2026
@steipete
steipete enabled auto-merge (squash) October 8, 2026 13:06
@steipete
steipete disabled auto-merge October 8, 2026 13:09
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 8, 2026, 9:51 AM ET / 13:51 UTC (Revision 2).

ClawSweeper review

What this changes

This PR consolidates regression cases into existing suites and removes redundant tests, unused test support, and retired test inventory entries.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no identified blocking defect, supported by historical harness results and bounded coverage evidence.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This maintainer-requested cleanup changes no production behavior or authority boundary, so live user-flow proof is unnecessary; reported harness results remain tied to their earlier revision. No persisted-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
Reason: The requested maintenance reduces repeated fixtures and assertions while consolidating valuable regressions at existing owners; it introduces no product surface.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this maintainer-requested cleanup has concrete maintenance value, and the inspected changes reveal no blocking defect. Historical validation and incomplete coverage comparisons limit review confidence.

Priority: P3
Reviewed head: a927217ca66dac3f99fd932004051fcfee018f72

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.

Findings

None.

Tests

  • Missing end-to-end proof: No runtime E2E scenario is required for this maintainer-requested test-only change. Reported focused execution belongs to the earlier revision; current-head completion was not independently established, and tests were not run during this read-only review.
Agent review details

How this fits together

OpenClaw’s automated tests check agent execution, Gateway access, channel delivery, and browser state. Test inventories route selected suites into CI; this cleanup changes those checks without changing the shipped runtime.

flowchart TD
  A[Regression scenarios] --> B[Consolidated test suites]
  C[Shared test fixtures] --> B
  D[Test inventories] --> E[CI test selection]
  E --> B
  B --> F[Behavior assertions]
  F --> G[Validation results]
Loading

Technical review

Best possible solution:

Keep meaningful regressions at their existing test owners and let the normal CI gate qualify the pinned candidate.

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

Not applicable: this PR cleans up tests rather than fixing a reported runtime defect.

Is this the best way to solve the issue?

Yes for the inspected consolidations: moving distinct regressions into existing owner suites avoids another implementation path; the supplied coverage comparisons have explicitly bounded scope.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness. Added test files: 67.

Security

None.

Evidence

What I checked:

  • Pinned change scope: The introduced delta contains 67 test files, nine test-support files, and two inventory files; no shipped production implementation, dependency, configuration, or stored-data format changes. (a927217ca66d)
  • Current-main necessity and drift: The fetched main delta has no changed paths overlapping this PR’s introduced paths. The cleanup remains distinct; supplied merged related PRs establish earlier contracts rather than superseding this batch. (ffb01e30ff3d)
  • Retained review corrections: GitHub’s exact-head commit patch restores Discord thread-parent command/picker denial, prepared reasoning-final routing, proxy scope intersection without a declared-scope header, and failed-send attachment/error bytes in the existing migration case. (src/gateway/server.auth.trusted-proxy-device-autoapprove.test.ts:471, a927217ca66d)
  • Privacy and stale-selection dispositions: The shared outbox writer unconditionally retires Incognito input, with surviving store-owner and queue-update coverage. Permission selection checks ownership before examining an unavailable patch result, supporting removal of the duplicate stale-selection null-result row. (ui/src/lib/chat/outbox-store.ts:579, a927217ca66d)
  • Validation attribution: The fully retrieved PR body reports 566 passing tests on earlier head 05834c927564e93eb273cc20fc58f71d1469feae and explicitly disclaims completion of the interrupted broad gate. The linked Testbox workflow metadata is cancelled and uses a separate workflow SHA; its metadata alone cannot verify capsule test completion. Current-head CI is pending in the supplied context.
  • Re-review and history limitations: The previous structured review records no findings or published rank-up moves. Comparing its earlier SHA locally failed because that object is unavailable; lazy acquisition returned HTTP 403. Some deeper history searches also encountered missing promisor blobs, so no patch-identical rebase or exhaustive introduction claim is made. (a927217ca66d)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests -4269, Other -3. Total -4272 across 78 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 77 4166 8435 -4269
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 3 -3
Total 78 4166 8438 -4272

Labels

Label changes:

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

Label justifications:

  • P3: This is test maintenance with no shipped runtime behavior change or urgent user-facing failure.
  • 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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T13:11:51.536Z sha 05834c927564e93eb273cc20fc58f71d1469feae :: blocked before merge. :: none

@steipete
steipete force-pushed the tcr/land-d018-1791457804 branch from 05834c9 to a927217 Compare October 8, 2026 13:44
@steipete
steipete enabled auto-merge (squash) October 8, 2026 13:45
@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 8, 2026
@steipete
steipete disabled auto-merge October 8, 2026 13:53
@steipete

steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

The remaining CI failure on a927217ca66dac3f99fd932004051fcfee018f72 is pre-existing on main. The completed CI run has only these failures:

Check Cause Clean-main evidence
QA Smoke CI (profile 1/4) gateway-smoke: installed mock-auth bootstrap requests runtime-artifact synchronization and is refused by the non-free-port guard at src/cli/update-cli/update-command-service-publication.ts:255. Reproduced on detached main d0194c3401f9c225dfd24d232715011e7dbf3f5d, Node 24.19.0, in an independent private-directory checkout on Blacksmith Testbox, lease tbx_01m4dtcd7g9y82zrbs47948jsy.
openclaw/ci-gate Aggregates the QA failure above. All other jobs in the completed CI run are non-failing.

The baseline started with a clean checkout and used the CI preparation and profile selection:

CI=1 OPENCLAW_BUILD_PRIVATE_QA=1 pnpm build qaRuntime
CI=1 OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_ENABLE_PRIVATE_QA_CLI=1 OPENCLAW_DISABLE_BUNDLED_PLUGINS=0 OPENCLAW_QA_REDACT_PUBLIC_METADATA=1 OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS=180000 OPENCLAW_QA_SUITE_WORKER_START_STAGGER_MS=1500 NODE_OPTIONS=--max-old-space-size=16384 timeout --signal=TERM --kill-after=15s 10m node openclaw.mjs qa run --repo-root . --qa-profile smoke-ci --concurrency 10 --output-dir .artifacts/d018-private-main-qa --scenario telegram-help-command --scenario telegram-whoami-command --scenario gateway-smoke

The build changes tracked extensions/workboard/openclaw.plugin.json. The ensuing Gateway smoke script reports the same dirty_runtime_postbuild_inputs and UpdatePreMutationError as CI. Source inspection also shows mock-auth bootstrap occurs while the QA fixture still holds its placeholder port reservation. The failing scenario, startup/publication code, Workboard manifest, and build owner are unchanged by this PR.

Baseline limitation: the two Telegram flow cases additionally encountered Testbox artifact-permission refusals. The independently launched gateway-smoke script reached the same auth-bootstrap failure and stack location as CI; that matching script failure is the evidence used here.

The earlier missing system-agent cleanup helper was separately reproduced on main and resolved upstream by 19f37f076862830f9b8953287f94a4725e3b8908. This PR was rebased to include it; all eleven patches remained identical under git range-diff, and those build/type failures cleared in the fresh CI run.

Landing this test-only batch under the operator-authorized pre-existing-failure rule. The QA failure will be added to the coordinator's main-repair ledger.

@steipete
steipete merged commit 2bc6d56 into main Oct 8, 2026
140 of 143 checks passed
@steipete
steipete deleted the tcr/land-d018-1791457804 branch October 8, 2026 14:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…167240)

* test(ui): deslop w1163 tests

* test(telegram): deslop w1167 tests

* test(gateway): deslop w1165 tests

* test(agent-core): deslop w1164 tests

* test(ui): deslop w1162 tests

* test(synology-chat): deslop w1169 tests

* test(discord): deslop w1171 tests

* test(gateway): deslop w1166 tests

* test(qa-lab): deslop w1168 tests

* test(openai): deslop w1173 tests

* test: retain reviewed boundary coverage in batch d018
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: discord Channel integration: discord channel: synology-chat channel: telegram Channel integration: telegram extensions: openai 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. scripts Repository scripts 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