Skip to content

test(sessions,ui,infra): remove low-value tests (batch d328) - #178500

Merged
steipete merged 34 commits into
mainfrom
tcr/land-d328-1792508776
Oct 20, 2026
Merged

steipete merged 34 commits into
mainfrom
tcr/land-d328-1792508776

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Consolidate repetitive test fixtures, repeated assertions, and overlapping test cases across the sessions, Control UI, daemon/CLI, activity, infrastructure, decisions, integration, agent, and script suites. Preserve distinct lifecycle, security, rollback, rendering, and ordering contracts. No product behavior change is intended.

Replayed the 30 supplied campaign commits onto pinned main 620b8fb. All commits contributed changes; no entire commit was skipped.

Rebased again onto current main fcdb4cd after GitHub reported a conflict. Preserved current-main behavior and dropped cleanup files implicated by late CI fixture/type failures.

Conflict decisions

  • Kept current main unchanged in src/config/sessions/session-transcript-worker-lanes.test.ts for both z0268 commits: main has extracted the fixture owner and removed the older local wrappers.
  • Kept current main unchanged in src/config/sessions/session-transcript-worker-readers.test.ts: main has additional Proxy serialization cases; did not replace them with the older campaign shape.
  • Kept current main unchanged in ui/src/e2e/chat-cold-load-anchor.e2e.test.ts for both z0271 commits: retain the newer title trace, reconciliation diagnostics, and setup.
  • In src/infra/dev-install-branch.test.ts, preserved main's four-row main/master/detached/empty branch table while adapting it to the consolidated fixture helper.
  • In ui/src/pages/chat/components/chat-html-preview-assets.test.ts, retained main's additional empty base-href row as well as the external base-href row; kept the non-conflicting fixture consolidation.
  • Dropped later conflicting z0277 rewrites of chat-html-preview-assets.test.ts and chat-media-playback.test.ts; kept their first-commit cleanup and main's newer asset-security, playback backoff, bounded-retry, and final-HEAD assertions.

Per-shard evidence

Late CI and rebase drops (these files retain current main unchanged): src/infra/deferred-plugin-migrations.test.ts, src/infra/delivery-queue-health.test.ts, src/agents/bash-tools.exec-notify.test.ts, src/cli/daemon-cli/response.test.ts, src/config/sessions/session-transcript-reconcile.sql-observer.test-support.ts, test/scripts-update-gateway.test.ts, ui/src/e2e/chat-child-attention.e2e.test.ts, ui/src/e2e/chat-composer-undo-redo.e2e.test.ts, ui/src/pages/activity/session-activity-view.test.ts, ui/src/pages/activity/session-activity-view.browser.test.ts, ui/src/pages/chat/components/chat-forwarded-attribution.test.ts, ui/src/pages/chat/components/chat-forwarded-disclosure.browser.test.ts, ui/src/pages/chat/components/chat-image-loading.browser.test.tsx, ui/src/pages/chat/components/chat-media-playback.test.ts, and ui/src/test-helpers/control-ui-cold-load-event-stream.ts.

The decision test helper now preserves the literal unavailable reason instead of widening it. The mock-export baseline shrink removes only the 11 exact stale entries reported by CI after their factories were repaired or documented; no allowances were added.

The final current-main restorations, literal-reason typing, and exact baseline shrink passed independent P0–P2 review. Formatting, plain changed-file oxlint, and git diff --check passed again on the final candidate. Fresh-head hosted CI remains the validation gate; earlier-head results are not presented as final-head proof.

Numbers below are counted from the actual replayed tree against the pinned base, not copied from the earlier campaign snapshot. Declarations are source-counted it/test calls (parameterized rows are not expanded). Test-support and E2E fixture files are included in test LOC. The shard reports explicitly say tests and coverage were not run under CI-only instructions; there is no coverage totals line to claim.

Shard Files changed Test LOC before → after Declaration delta Coverage
z0268 5 697 → 660 (-37) 0 (8 → 8) Not run (CI-only)
z0271 5 1242 → 925 (-317) 0 (13 → 13) Not run (CI-only)
z0275 8 1899 → 1500 (-399) 0 (18 → 18) Not run (CI-only)
z0272 7 1710 → 1288 (-422) 0 (31 → 31) Not run (CI-only)
z0267 7 1830 → 1435 (-395) 0 (9 → 9) Not run (CI-only)
z0274 3 835 → 663 (-172) -2 (12 → 10) Not run (CI-only)
z0273 6 924 → 695 (-229) -2 (25 → 23) Not run (CI-only)
z0278 8 1891 → 1519 (-372) -4 (45 → 41) Not run (CI-only)
z0277 4 640 → 570 (-70) 0 (14 → 14) Not run (CI-only)
z0276 7 1243 → 998 (-245) -5 (11 → 6) Not run (CI-only)
z0281 7 1391 → 1160 (-231) -1 (24 → 23) Not run (CI-only)
z0283 9 1880 → 1694 (-186) -2 (23 → 21) Not run (CI-only)

Production LOC: +0 / -0. Test and test-support LOC: +4985 / -8060, net -3075. 76 test/support files changed. Configuration-only change: shrink the obsolete mock-export baseline entries reported by CI.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • Plain node_modules/.bin/oxfmt --write <changed files>: passed.
  • Plain node_modules/.bin/oxlint -c .oxlintrc.json <changed TS/JS files>: passed (exit 0).
  • git diff --check against the pinned base: passed.
  • Per operator CI-only rule, no local Vitest, check-changed, tsgo, coverage, Crabbox, or Testbox runs. Hosted openclaw/ci-gate is the required runtime/typecheck gate.
  • Independent full-diff review completed. Restored delegated-authority cleanup assertions, no-output-timeout retry guidance, and absent-roster attribution coverage; the three-file restoration diff passed a follow-up P0–P2 review.
  • Rejected three findings against current source: clearConfigCache() is a no-op in src/config/io.runtime.ts; the original stoppedServiceState call also used its empty top-level environment default; Solid 2 explicitly supports array-valued class (installed cheatsheet and repository Solid guidance).
  • Plain oxlint emits one warning at the unchanged reactive callback in config-form-fixtures.tsx; exit status is 0.
  • CI's mock-export ratchet flagged 11 partial factories changed by the consolidation. The follow-up preserves the real PTY exports and explains intentional live config, RPC, service, audit, and subprocess isolation without changing their stubbed behavior. It passed a focused P0–P2 review. No ratchet baseline was weakened.
  • CI also caught an undefined assistant fixture reference during report-facts test collection. Restored main's inline role: "assistant" literal; no test case or assertion was removed.
  • CODEOWNERS: no changed path matches the current CODEOWNERS rules.
Files by shard

z0268

  • src/config/sessions/session-transcript-read-pools.test.ts
  • src/config/sessions/session-transcript-reconcile.admission.test.ts
  • src/config/sessions/session-transcript-reconcile.fixtures.test-support.ts
  • src/config/sessions/session-transcript-reconcile.scheduling.test.ts
  • src/config/sessions/session-transcript-report-facts.test.ts

z0271

  • ui/src/e2e/chat-code-block-fences.e2e.test.ts
  • ui/src/e2e/chat-collapsed-reply-reveal.e2e.test.ts
  • ui/src/e2e/chat-composer-accessory-focus.e2e.test.ts
  • ui/src/e2e/chat-composer-picker-layout.e2e.test.ts
  • ui/src/e2e/chat-composer-predictions.e2e.test.ts

z0275

  • ui/src/e2e/update-confirmation.e2e.test.ts
  • ui/src/e2e/update-external-supervisor.e2e.test.ts
  • ui/src/e2e/update-git-revisions.e2e.test.ts
  • ui/src/e2e/update-run.e2e.test.ts
  • ui/src/e2e/update-stale-git-refresh-proof.e2e.test.ts
  • ui/src/e2e/usage-export-recovery.e2e.test.ts
  • ui/src/e2e/usage-known-zero-cost.e2e.test.ts
  • ui/src/e2e/usage-overview.e2e.test.ts

z0272

  • src/cli/daemon-cli/lifecycle-action-preflight.test.ts
  • src/cli/daemon-cli/lifecycle-fallback.test.ts
  • src/cli/daemon-cli/lifecycle-safe-restart.test.ts
  • src/cli/daemon-cli/register-service-commands.test.ts
  • src/cli/daemon-cli/restart-health-external.test.ts
  • src/cli/daemon-cli/start-repair.test.ts
  • src/cli/daemon-cli/lifecycle.test-helpers.ts

z0267

  • ui/src/test-helpers/board-provider.ts
  • ui/src/test-helpers/chat-model.ts
  • ui/src/test-helpers/config-form-fixtures.tsx
  • ui/src/test-helpers/control-ui-e2e.test.ts
  • ui/src/test-helpers/application-context-fixtures.ts
  • ui/src/test-helpers/board-ops.ts
  • ui/src/test-helpers/chat-layout-menu.ts

z0274

  • ui/src/pages/activity/route.test.ts
  • ui/src/pages/activity/session-activity-media.test.ts
  • ui/src/pages/activity/activity-page.test-support.ts

z0273

  • src/infra/dev-install-branch.test.ts
  • src/infra/device-bootstrap.worker.test.ts
  • src/infra/device-pairing-approval-policy.test.ts
  • src/infra/device-pairing-identity.test.ts
  • src/infra/device-pairing.ingress-approval.test.ts
  • src/infra/device-bootstrap.pruning.test.ts

z0278

  • src/decisions/compatibility.test.ts
  • src/decisions/runtime-v2.test.ts
  • src/decisions/runtime.admission.test.ts
  • src/decisions/validation-v2.test.ts
  • src/decisions/catalog.test-support.ts
  • src/decisions/contract.test-support.ts
  • src/decisions/registry-adoption.test.ts
  • src/decisions/runtime.preparation.test.ts

z0277

  • ui/src/pages/chat/components/chat-effort-picker.service-tiers.test.tsx
  • ui/src/pages/chat/components/chat-github-publication.test.ts
  • ui/src/pages/chat/components/chat-html-preview-assets.test.ts
  • ui/src/pages/chat/components/chat-forwarded-avatar.browser.test.ts

z0276

  • test/progress-card-channel-literals.integration.test.ts
  • test/qa-convex-credential-payload-validation.test.ts
  • test/scripts-update-gateway-legacy.test.ts
  • test/storage-locations-r2.test.ts
  • test/subagent-progress-telegram-retirement.integration.test.ts
  • test/signal-approval-forwarding.integration.test.ts
  • test/runtime-proof.test-support.ts

z0281

  • src/agents/bash-tools.exec-launch-policy.integration.test.ts
  • src/agents/bash-tools.exec-live-state-sqlite-guard.test.ts
  • src/agents/bash-tools.exec-source-authority.test.ts
  • src/agents/bash-tools.exec-approval-followup.incognito.test.ts
  • src/agents/bash-tools.exec-approval-output.test.ts
  • src/agents/bash-tools.exec.egress-closure.test.ts
  • src/agents/bash-tools.notify-on-exit-ack.test.ts

z0283

  • test/scripts/tsgo-ci-continuation.test.ts
  • test/scripts/tsgo-core-test-shards.test.ts
  • test/scripts/type-suppression-inventory.test.ts
  • test/scripts/typecheck-inert.test.ts
  • test/scripts/script-fixture-files.test-support.ts
  • test/scripts/tsgo-shard-cancellation.test.ts
  • test/scripts/update-channel-switch-fixture.test.ts
  • test/scripts/update-compat-cleanup.test.ts
  • test/scripts/update-compat-external-bindings.test.ts

@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 15:13
@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-20T17:09:51.977131Z efa13e0 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 cli CLI command changes agents Agent runtime and tooling size: XL labels Oct 20, 2026
@steipete
steipete disabled auto-merge October 20, 2026 15:15
@steipete
steipete enabled auto-merge (squash) October 20, 2026 15:15
@steipete
steipete disabled auto-merge October 20, 2026 15:20
@steipete
steipete enabled auto-merge (squash) October 20, 2026 15:27
@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 test fixtures and assertions across session, UI, CLI, infrastructure, decision, and script suites.

Example: A foreground transcript reader closes while another database remains usable.

  • Before: Tests repeat worker creation, observation, and cleanup setup.
  • After: Tests share that setup while retaining worker-exit, unrelated-database, and pool-reuse assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful cleanup with no identified defect; affected execution and test-type validation are still pending.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only PR changes no shipped behavior; its body explicitly delegates test execution to hosted CI, whose exact-head gate remains pending.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated test machinery while preserving the existing product contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open as useful maintainer-directed test cleanup; no concrete introduced defect was found.

Priority: P3
Reviewed head: 8aa3867c2c532967b8cbafa0f978e5a9c68defdf

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed tests supply synthetic inputs to existing runtime and UI owners and inspect their results, lifecycle behavior, and rendered output.

flowchart TD
  F[Synthetic fixtures] --> T[Focused tests]
  T --> R[Runtime owners]
  T --> U[Control UI]
  R --> A[Contract assertions]
  U --> A
  A --> C[CI gate]
Loading

Technical review

Best possible solution:

Land the consolidation after the existing exact-head validation gate passes, preserving the retained behavioral contracts.

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

This PR proposes behavior-preserving test cleanup rather than a product bug fix; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Shared fixtures and existing production owners are appropriate replacements for repeated setup, and the examined consolidations retain their distinct lifecycle, rejection, recovery, and rendering assertions.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Foreground transcript-reader tests keeps the original intent (dbfa55e: Prevent database cleanup hangs by joining foreground readers and revoking pending reads for the closing store.)
  • Decision admission tests keeps the original intent (6e91ef2: Reserve capacity for requested evaluations while retaining physical slots until canceled callbacks settle.)
  • Board fixtures keeps the original intent (06480d7: Provide board operations for dashboard integration; the helper subsequently moved from ui/src/lib/board/mock-ops.ts.)
  • Source-updater tests keeps the original intent (8953498: Prepare replacements before stopping the service and preserve source, dependencies, runtime, and recovery custody on failure.)
  • Live-state SQLite guard tests keeps the original intent (006d64d: Recognize variable-bearing file URIs before allowing external SQLite processes to start against live state.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 06480d7 adds ui/src/lib/board/mock-ops.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 06480d767cef; files: ui/src/lib/board/mock-ops.ts)
  • Josh Avant: Raw commit dbfa55e adds src/config/sessions/session-transcript-read-pools.test.ts:32 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dbfa55ec6574; files: src/config/sessions/session-transcript-read-pools.test.ts)
  • Vincent Koc: Raw commit 6e91ef2 adds src/decisions/runtime-v2.test.ts:86 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6e91ef2573b5; files: src/decisions/runtime-v2.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 +6,977/-10,941, net -3,964. The reduction comes from fixture reuse, consolidated cases, and removed capture scaffolding without adding production machinery.

Labels

Label changes:

  • add P3: This is test maintenance with no intended user-visible runtime change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • 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 intended user-visible runtime change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • 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, 11:44 AM ET / 15:44 UTC.

@steipete
steipete disabled auto-merge October 20, 2026 15:48
@steipete
steipete enabled auto-merge (squash) October 20, 2026 15:51
@steipete
steipete disabled auto-merge October 20, 2026 16:12
@steipete
steipete enabled auto-merge (squash) October 20, 2026 16:16
@steipete
steipete disabled auto-merge October 20, 2026 16:58
@steipete
steipete force-pushed the tcr/land-d328-1792508776 branch from 811c1f6 to efa13e0 Compare October 20, 2026 17:06
@steipete
steipete enabled auto-merge (squash) October 20, 2026 17:06
@steipete
steipete merged commit 3a304be into main Oct 20, 2026
123 checks passed
@steipete
steipete deleted the tcr/land-d328-1792508776 branch October 20, 2026 17:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…w#178500)

* test(sessions): deslop z0268 tests

* test(sessions): deslop z0268 tests

* test(ui): deslop z0271 tests

* test(ui): deslop z0271 tests

* test(ui): deslop z0275 tests

* test(daemon-cli): deslop z0272 tests

* test(daemon-cli): further deslop z0272 tests

* test(ui): deslop z0267 tests

* test(ui): deslop z0267 tests

* test(ui): deslop z0267 tests

* test(activity): deslop z0274 tests

* test(activity): deslop z0274 tests

* test(activity): deslop z0274 tests

* test(infra): deslop z0273 tests

* test(infra): deslop z0273 tests

* test(infra): deslop z0273 tests

* test(decisions): deslop z0278 tests

* test(decisions): deslop z0278 tests further

* test(decisions): consolidate z0278 contract proof

* test(chat): deslop z0277 tests

* test(chat): deslop z0277 tests

* test(chat): deslop z0277 tests

* test(integration): deslop z0276 tests

* test(integration): deslop z0276 tests

* test(integration): deslop z0276 tests

* test(agents): deslop z0281 tests

* test(agents): deslop z0281 tests

* test(agents): deslop z0281 tests

* test(scripts): deslop z0283 tests

* test(scripts): deslop z0283 tests

* test: retain distinct safety and attribution regressions

* test: preserve mock exports and document isolation

* test(sessions): restore inline assistant fixture role

* test: retain current fixtures and shrink stale mock baseline
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 cli CLI command changes 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