Skip to content

test(runtime,ui): remove low-value tests (batch d342) - #178793

Merged
steipete merged 35 commits into
mainfrom
tcr/land-d342-1792531116
Oct 21, 2026
Merged

steipete merged 35 commits into
mainfrom
tcr/land-d342-1792531116

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces repetitive fixtures and low-value duplicate test code across the runtime and Control UI without changing production behavior.

User Impact

No user-visible behavior change, configuration migration, or production-code change. Existing security, authority, cancellation, lifecycle, and rendering contracts remain the retention bar.

Why This Change Was Made

Replays all 30 supplied campaign commits for batch d342 onto main, most recently rebased onto 29ce97ac8d162eb44ea993d72918c4f4e7582724 (original pinned main 8f0973e37405d683e242e217f4d7c30a1efc4118). Consolidates setup and equivalent assertion sequences and shares narrowly scoped test fixtures. Conflicting file changes were omitted rather than overwriting newer main coverage or reviving retired tests. No whole commit was skipped.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <75 changed TS/TSX files>: passed; no additional changes.
  • node_modules/.bin/oxlint -c .oxlintrc.json <75 changed TS/TSX files>: exit 0.
  • git diff --check 8f0973e37405d683e242e217f4d7c30a1efc4118: passed.
  • Per operator CI-only instructions, no local runtime tests, coverage, typecheck, check-changed, or Testbox runs. Local test wall time: not measured. Hosted openclaw/ci-gate is the runtime acceptance gate; CI duration is available in this PR's checks.
  • Independent review found four valid issues; their affected files were restored to pinned main. The correction review is scoped-clean for P0–P2. A fifth unused-import finding was rejected: fs.access remains in use, and plain oxlint passes.
  • Production LOC: +0/-0. Tests and test helpers: +5,505/-8,067, net -2,562 across 75 files. No baseline or production seam changes.
  • No changed path matches the pinned base's CODEOWNERS rules.

Per-shard replay totals

LOC includes test helpers. Declaration counts are static it/test call-site counts (including parameterized declarations), not executed or expanded case counts. They describe the final replay versus pinned main, not the earlier individual shard report snapshot.

Shard Files LOC before → after Declarations before → after Diff + / - Coverage totals
z0430 3 381 → 330 8 → 8 +170 / -221 Not run: CI-only
z0431 6 1133 → 956 28 → 27 +350 / -527 Not run: CI-only
z0432 7 1302 → 1028 43 → 37 +729 / -1003 Not run: CI-only
z0433 8 1266 → 1075 27 → 18 +734 / -925 Not run: CI-only
z0434 8 1464 → 1079 11 → 11 +616 / -1001 Not run: CI-only
z0435 6 906 → 704 6 → 6 +354 / -556 Not run: CI-only
z0436 6 1137 → 853 15 → 19 +592 / -876 Not run: CI-only
z0437 4 854 → 634 9 → 9 +292 / -512 Not run: CI-only
z0438 9 1452 → 1186 8 → 7 +877 / -1143 Not run: CI-only
z0439 8 1451 → 1218 30 → 25 +375 / -608 Not run: CI-only
z0440 5 974 → 820 22 → 22 +209 / -363 Not run: CI-only
z0441 5 1066 → 941 33 → 33 +207 / -332 Not run: CI-only

The supplied shard reports contain no measured coverage totals: each explicitly states that tests and coverage were not run under CI-only instructions. No coverage-retention percentage is claimed. Most original shard reports fell below their earlier 25% reduction target; this replay does not force further deletions to reach that target.

Files by shard

z0430

  • ui/src/components/markdown-dom-ref.test.ts
  • ui/src/components/markdown-highlight.test.tsx
  • ui/src/components/markdown-session-links.test.ts

z0431

  • src/gateway/chat-input-recovery.test.ts
  • src/gateway/cli-session-history.claude-snapshot.test.ts
  • src/gateway/client.device-auth.test.ts
  • src/gateway/client.identity.test.ts
  • src/gateway/composer-prediction-completion.test.ts
  • src/gateway/config-reload.telegram-policy.test.ts

z0432

  • src/logging/diagnostic-support-bundle.test.ts
  • src/logging/diagnostic-worker-gc-profile.test.ts
  • src/logging/log-file-path.test.ts
  • src/logging/log-file-size-cap.test.ts
  • src/logging/log-tail-redaction.test.ts
  • src/logging/logger-env.test.ts
  • src/logging/logger-file-transport.test.ts

z0433

  • src/agents/harness/settled-turn-finalization-result.test.ts
  • src/agents/harness/tool-authority.runtime.participants.test.ts
  • src/agents/harness/tool-authority.runtime.test-support.ts
  • src/agents/harness/tool-invocation.test.ts
  • src/agents/harness/tool-result-facts.test-support.ts
  • src/agents/harness/tool-result-facts.test.ts
  • src/agents/harness/tool-surface-bridge.diagnostics.test.ts
  • src/agents/harness/workspace-context.test.ts

z0434

  • ui/src/e2e/chat-reasoning-visibility.e2e.test.ts
  • ui/src/e2e/chat-reconnect-continuity.real-gateway.e2e.test.ts
  • ui/src/e2e/chat-reply-preview-recovery.e2e.test.ts
  • ui/src/e2e/chat-restart-resume.e2e.test.ts
  • ui/src/e2e/chat-retained-pane-escape.e2e.test.ts
  • ui/src/e2e/chat-retained-pane-hydration.e2e.test.ts
  • ui/src/e2e/chat-scope-read-gates.e2e.test.ts
  • ui/src/e2e/chat-send-ack-ownership.e2e.test.ts

z0435

  • ui/src/e2e/new-session-page.catalog-bootstrap.e2e.test.ts
  • ui/src/e2e/new-session-page.device-stop.e2e.test.ts
  • ui/src/e2e/new-session-page.fast-mode-preferences.e2e.test.ts
  • ui/src/e2e/new-session-page.host-remediation.e2e.test.ts
  • ui/src/e2e/new-session-page.incognito-navigation.e2e.test.ts
  • ui/src/e2e/new-session-page.navigation-fixtures.test-support.ts

z0436

  • src/cron/service.cross-tick-admission.test.ts
  • src/cron/service.failure-alert-notifications.test.ts
  • src/cron/service.list-page-sort-guards.test.ts
  • src/cron/service.manual-delivery.test.ts
  • src/cron/service.removal-postcommit.test.ts
  • src/cron/service.schedule-maintenance.test.ts

z0437

  • src/acp/control-plane/manager.cancel-session.incognito.worker.test.ts
  • src/acp/control-plane/manager.cancel-session.producer-custody.worker.test.ts
  • src/acp/control-plane/manager.cancel-session.test.ts
  • src/acp/control-plane/manager.turn-delivery.test.ts

z0438

  • ui/src/e2e/chat-lifecycle.test-support.ts
  • ui/src/e2e/chat-source-previews.e2e.test.ts
  • ui/src/e2e/chat-source-previews.test-support.ts
  • ui/src/e2e/chat-split-narrow.e2e.test.ts
  • ui/src/e2e/chat-startup-wait.e2e.test.ts
  • ui/src/e2e/chat-steer-deferred-custody.e2e.test.ts
  • ui/src/e2e/chat-steer-deferred-custody.real-gateway.e2e.test.ts
  • ui/src/e2e/chat-stop-owned-exec.real-gateway.e2e.test.ts
  • ui/src/e2e/chat-stop-response-ownership.e2e.test.ts

z0439

  • ui/src/pages/chat/offline-account-scope.test.ts
  • ui/src/pages/chat/outbox-legacy-account.test.ts
  • ui/src/pages/chat/processes-panel-data.test.ts
  • ui/src/pages/chat/route-resolution-handoff.test.ts
  • ui/src/pages/chat/route-resolution-identity.test.ts
  • ui/src/pages/chat/route-resolution.test-support.ts
  • ui/src/pages/chat/session-approval-projection.test.ts
  • ui/src/pages/chat/session-prefetch.test-support.ts

z0440

  • ui/src/app/router-outlet-solid.test.tsx
  • ui/src/app/server-prefs.tab-icon.test.ts
  • ui/src/app/service-worker-refresh.runtime.test.ts
  • ui/src/app/session-placement-startup.test-support.ts
  • ui/src/app/shell-layout-traits-solid.test.tsx

z0441

  • extensions/slack/src/monitor/allow-list.test.ts
  • extensions/slack/src/monitor/auth.test.ts
  • extensions/slack/src/monitor/dm-auth.test.ts
  • extensions/slack/src/monitor/event-scope.test.ts
  • extensions/slack/src/monitor/http-handler.test.ts
Conflict resolution: omitted file changes

For each entry below, retained the entire pre-pick current-main/replayed file and omitted this commit's changes to that file; other nonconflicting changes in the same commit remain. Markdown overlaps depended on absent helper refactors; Gateway/logging overlaps included newer assertions; Cron overlaps would revive moved/retired tests; service-worker overlap included newer activation cases.

  • 8ef32f9f2df7: ui/src/components/markdown-element-refs-solid.test.ts, ui/src/components/markdown-file-tooltip.browser.test.ts, ui/src/components/markdown-human-mentions.test.ts, ui/src/components/markdown-json.test.ts, ui/src/components/markdown-streaming.test.ts.
  • 89bf91f41f70: ui/src/components/markdown-element-refs-solid.test.ts, ui/src/components/markdown-human-mentions.test.ts, ui/src/components/markdown-streaming.test.ts.
  • 6dd0745fede3: src/logging/level-filter.test.ts.
  • 272d0347f2c2478d4ad718f014069a481ef00b62: src/gateway/chat-input-recovery.test.ts, src/gateway/config-reload-plan.test.ts.
  • 032ddba5a05043559ac112cfeaf42454d24b07ac: src/gateway/chat-input-recovery.test.ts, src/gateway/config-reload-plan.test.ts.
  • a4944b47ed43a5c52f2d7952e1d0cc9375dadc11: src/cron/service.scheduler-regressions.test.ts.
  • 41d86747ad25a0ff338d26a6651cf95e54fbd2cd: src/cron/service.scheduler-regressions.test.ts.
  • 7e0b8024e5ce563c6f7aea661aedf90977ba8b41: src/cron/service.scheduler-regressions.test.ts.
  • 4cfcca578621440d76efd47b4c0d26d1af7bbaba: ui/src/app/service-worker-refresh.runtime.test.ts.

Review corrections

Restored these files exactly to pinned main rather than retaining unsafe cleanup: src/acp/control-plane/manager.operator-model-policy.test.ts, src/acp/control-plane/manager.initialize-session.test.ts, src/acp/control-plane/manager.terminal-signals.test.ts, src/agents/harness/tool-authority.runtime.admission.test.ts. This preserves policy-change notifications, host-admission publication/cleanup security checks, failed-initialization rollback, and queued same-ID terminal custody. All 30 supplied commits were replayed; this separate corrective commit drops their changes in these four files. Final static checks pass on 75 files; no local runtime tests were run.

CI correction

On head 37b70138b238, checks-node-changed-4 found two batch-caused test assertion errors. The JSON warning case checked unescaped quotes against serialized JSON; the corrected case asserts the decoded message, preserving the compact-case raw-text assertion. The subprocess case grouped an absent error property into toMatchObject; it now separately asserts result.error is undefined and exit status is zero, matching the original contract. Both focused corrections passed independent P0–P2 review and the permitted static checks. No local tests were run; the new exact head receives fresh hosted CI.

Typecheck, lint, and E2E corrections

The completed run on b9c52f2b047d reported seven failed jobs; all logs were inspected once. Restored these additional files exactly to pinned main, dropping their cleanup: src/cron/service.execution-identity.test.ts, src/gateway/config-reload.operation-policy.test.ts, ui/src/app/server-prefs.test-support.ts, ui/src/app/server-prefs.adoption.test.ts, ui/src/app/shell-viewport.test.ts, ui/src/e2e/new-session-page.attachment-url-lifecycle.e2e.test.ts, ui/src/e2e/new-session-page.draft-handoff.e2e.test.ts. This preserves definedness narrowing, literal config types, mutable fixture setup, shared mock signatures, FileReader method capture, and new-session-scoped attachment selection. Kept the remaining cleanup while restoring a bound MockWebSocket.terminate() method and using the existing createTestGatewayClient(request) fixture in both replacement branches. No cast, suppression, retry, timeout, or weakened assertion was added.

Relevant failed-job evidence: core type 1, core type 3, core type 4, core type 5, core lint 1, core lint 2, and UI E2E. The earlier logging assertion correction passed its test shard on this run.

Both subsequent correction reviews are scoped-clean for P0–P2. Final local formatting, plain oxlint, and diff checks pass. Runtime/typecheck proof remains the fresh-head hosted gate. All 30 supplied commits were replayed; five follow-up commits preserve reviewed contracts and repair CI-proven regressions.

Final mock-handler contract correction

On 9ff329b451f3, core type 3 exposed the remaining signature mismatch in the short-session request mock: its unused parameter required Record<string, unknown>, but GatewayRequestHandler accepts optional unknown. The mock now matches that public callable contract, without a cast or runtime change. Its independent P0–P2 review is scoped-clean. On that prior head, this was the only failed job reported; the final head is 06b4434166096117c65a3fc34563124e80ec46af and awaits fresh CI acceptance.

Settlement on current main

Rebased onto 29ce97ac8d162eb44ea993d72918c4f4e7582724 to include 5d80482379b376f9ad921b6acff0df9bc2ce8c80, which fixes the unrelated typescript(unbound-method) error in src/flows/doctor-repair-flow.ts:73 reported by core lint 2. The old aggregate gate failed only for that stripe. The cancelled context job had completed every executed step successfully, including its evidence check.

Preserved current main's entire config-reload.operation-policy.test.ts at all three replay conflicts, retaining its newer tool-policy cases. The final PR patch is byte-for-byte identical to the previously reviewed patch (SHA-256 453ff8a589a52bafa99dc4faae7bb446dd829a32d276b6155b3889088f1ea7ab). No additional batch fix or assertion/timeout change was needed. Plain oxlint 1.87.0, oxfmt 0.72.0, and git diff --check pass on the final 75-file diff. Existing matching dependencies were reused read-only; no install was modified. CI-only: no local tests, typechecks, or leases. Current head: b681be72c17c845067b0d6fbde159addbb850820; exact-head CI is the acceptance proof.

@clawsweeper

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

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T00:36:05.522923Z b681be7 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: slack Channel integration: slack app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 20, 2026
@steipete
steipete disabled auto-merge October 20, 2026 21:35
@steipete
steipete enabled auto-merge (squash) October 20, 2026 21:39
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates repeated fixtures and assertions across runtime, Slack, and Control UI tests without changing production code.

Example: A streamed reply survives a browser reconnect and is then stopped.

  • Before: The regression repeats transcript and request assertions inline.
  • After: Shared assertions still check one retained partial reply, its original run identity, and an independent follow-up.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source supports a coherent cleanup; executable validation remains unsettled.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only change is outside the ordinary live-behavior proof gate; the body reports static checks and delegates executable acceptance to hosted CI.
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 test setup and equivalent assertions increase maintenance work.
Reason: The maintainer-authored direction is approved, and the patch reduces duplication while retaining substantive contract checks.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored cleanup open; source review found no concrete introduced defect in the retained test contracts.

Priority: P3
Reviewed head: 37b70138b23807f6e93f1ef36148046760adfe4d

Before merge

None.

Findings

None.

Agent review details

How this fits together

These suites feed synthetic requests, transport faults, and lifecycle events through runtime owners and browser fixtures, then assert observable results and cleanup.

flowchart LR
  A[Test fixtures] --> B[Runtime owners]
  A --> C[Control UI browser]
  C --> D[Gateway transport]
  D --> B
  B --> E[State and delivery results]
  E --> F[Contract assertions]
  C --> F
Loading

Technical review

Best possible solution:

Retain the focused fixture consolidation and existing behavioral assertions, then merge when the existing CI gate passes.

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

This PR addresses test duplication rather than a reported product failure; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The consolidation reuses existing fixtures and preserves the inspected independent failure cases without introducing another production owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Logging transport regressions keeps the original intent (b74ea7c: Remove private transport controls while exercising secured native I/O and preserving lifecycle and failure coverage.)
  • Reconnect continuity keeps the original intent (5da0c55: Prove browser socket-loss recovery, durable partial-reply retention after Stop, and an independent next turn.)
  • Requester and cancellation authority keeps the original intent (fd2a6ca: Preserve requester identity, same-requester reconnect, and authority lifetime across execution admission.)
  • Cron maintenance keeps the original intent (18fd29f: Consolidate repeated fixtures while retaining scheduling, rollback, failure, and ordering regressions.)
  • Gateway identity admission keeps the original intent (de7c3b7: Prepare runtime device identity before transport creation and retain read-only and cancellation behavior.)
  • Incognito navigation keeps the original intent (b065262: Preserve private drafts and attachments across route navigation without sending them.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and helpers +5,988/-8,749; net −2,761. The reduction comes from fixture reuse and consolidation without adding production machinery.

Labels

Label changes:

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

Label justifications:

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

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 5:56 PM ET / 21:56 UTC.

@steipete
steipete disabled auto-merge October 20, 2026 22:14
@steipete
steipete enabled auto-merge (squash) October 20, 2026 22:17
@steipete
steipete disabled auto-merge October 20, 2026 22:47
@steipete
steipete enabled auto-merge (squash) October 20, 2026 22:54
@steipete
steipete disabled auto-merge October 20, 2026 23:14
@steipete
steipete enabled auto-merge (squash) October 20, 2026 23:17
@steipete
steipete force-pushed the tcr/land-d342-1792531116 branch from 06b4434 to b681be7 Compare October 21, 2026 00:31
@steipete
steipete merged commit f70a4ba into main Oct 21, 2026
126 of 127 checks passed
@steipete
steipete deleted the tcr/land-d342-1792531116 branch October 21, 2026 00:41
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
* test(markdown): deslop z0430 tests

* test(markdown): deslop z0430 tests

* test(logging): deslop z0432 tests

* test(logging): deslop z0432 tests

* test(gateway): deslop z0431 tests

* test(gateway): deslop z0431 tests

* test(gateway): deslop z0431 tests

* test(ui): deslop z0435 tests

* test(ui): deslop z0435 tests

* test(harness): deslop z0433 tests

* test(harness): deslop z0433 tests

* test(harness): deslop z0433 tests

* test(cron): deslop z0436 tests

* test(cron): deslop z0436 tests

* test(cron): deslop z0436 tests

* test(acp): deslop z0437 tests

* test(acp): deslop z0437 tests

* test(acp): deslop z0437 tests

* test(chat): deslop z0439 tests

* test(chat): deslop z0439 tests

* test(chat): deslop z0439 tests

* test(ui): deslop z0434 tests

* test(ui): deslop z0434 tests

* test(ui): deslop z0438 tests

* test(ui): deslop z0438 tests

* test(ui): deslop z0438 tests

* test(ui): deslop z0440 tests

* test(ui): deslop z0440 tests

* test(ui): deslop z0440 tests

* test(slack): deslop z0441 tests

* test: retain authority and lifecycle regression coverage

* test(logging): preserve warning assertion semantics

* test: preserve typed fixtures and narrowing contracts

* test: retain bound mocks and scoped navigation fixtures

* test(chat): match gateway request fixture contract
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: slack Channel integration: slack 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