Skip to content

test(ui,cli,browser,cron): remove low-value tests (batch d071) - #170246

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d071-1791838472
Oct 12, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d071-1791838472

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes redundant test permutations and implementation-level replays from ten previously validated test-audit shards.

User Impact

No production behavior, public API, or UI appearance changes. Retained tests continue to cover the distinct security, regression, authority, and lifecycle contracts.

Why This Change Was Made

Replayed all ten campaign commits onto main 529b4d75b7030592d7e0718fa63fb9db16ce8ec3, preserving their messages. All applied cleanly: no conflicts, skipped commits, or dropped hunks. The only non-test change reduces the timeout-race baseline for model-preflight.runtime.test.ts from two occurrences to one.

Production LOC: +0 / -0. Test LOC: +723 / -5628 (net -4905). Test baseline metadata: +1 / -1. No CODEOWNERS-owned paths are touched.

Evidence

Focused local validation passed: pnpm test <all 62 replay-touched test files> --maxWorkers=1 ran 771 tests across 62 files / 11 Vitest groups, all passing, in 561.55 seconds wall time. Installed oxfmt --write / oxfmt --check, plain oxlint -c .oxlintrc.json, and git diff --check against the pinned landing base passed. The earlier run was intentionally interrupted to restore review findings; the final run covers the complete corrected batch. No timeouts, retries, skips, or assertions were weakened. Hosted openclaw/ci-gate owns broad/type-aware proof and CI timing; those results are pending at submission. No Testbox/Crabbox allocation was requested for this landing.

The slow local groups were cron (133.95s) and database-backed plugin tests (122.62s), which retain real worker/storage, delivery, and artifact-rendering coverage. Other group durations: unit-fast 0.668s, desktop Gateway 16.54s, CLI 13.18s, UI 10.50s, browser UI 6.40s, diffs 35.80s, browser plugin 27.90s, messaging 70.55s, and QA 44.20s.

The table below records actual changed-file LOC and declaration counts against the landing base, not the larger original shard inventory. Coverage totals are historical in-shard before/after evidence, not a new coverage measurement on main.

Shard Changed tests Test LOC Declarations Historical covered statements; branches; functions
x1379 5 3016 → 2454 (-562) 87 → 60 (-27) 2685 → 2691 (+6); 1376 → 1377 (+1); 774 → 775 (+1)
x1376 8 2337 → 1916 (-421) 86 → 60 (-26) 426 → 426 (0); 315 → 315 (0); 85 → 85 (0)
x1380 6 1652 → 1320 (-332) 71 → 54 (-17) 615 → 615 (0); 405 → 404 (-1); 147 → 147 (0)
x1363 5 2927 → 2013 (-914) 92 → 55 (-37) 2150 → 2150 (0); 1474 → 1473 (-1); 430 → 430 (0)
x1383 7 1978 → 1552 (-426) 82 → 58 (-24) 863 → 862 (-1); 588 → 585 (-3); 160 → 160 (0)
x1378 6 2688 → 2008 (-680) 85 → 53 (-32) 940 → 940 (0); 570 → 570 (0); 193 → 193 (0)
x1384 5 changed, 6 audited 2297 → 1939 (-358) 75 → 63 (-12) 914 → 914 (0); 749 → 747 (-2); 171 → 171 (0)
x1385 6 2118 → 1558 (-560) 83 → 59 (-24) 638 → 638 (0); 420 → 420 (0); 124 → 124 (0)
x1386 7 3656 → 3175 (-481) 81 → 65 (-16) 964 → 964 (0); 738 → 737 (-1); 175 → 175 (0)
x1387 6 2423 → 2252 (-171) 75 → 64 (-11) 1005 → 1005 (0); 474 → 474 (0); 202 → 202 (0)

The independent review raised 13 potential contract losses; all were addressed by restoring focused original tests/table rows before publication. These retain retired-local cleanup recovery, evaluation authority checks, pairing transport/path/secret rejection, restricted and pending-page eligibility, post-confirmation revocation, CLI admin scope, manifest/runtime schema parity, plain-command authorization, stale-thread isolation, explicit-empty fallback behavior, token timer expiry, privileged creation, and visibility-driven presence clearing. In particular, relay-command-handler.test.ts is now unchanged from the landing base. No production changes were needed. A fresh independent review of the correction delta was scoped-clean at P2 and above; no findings were rejected.

Shard file inventory and original validation notes

All names below have the .test.ts suffix.

  • x1379, ui/src/components/board/: board-view-sizing, board-view.browser, board-view, board-widget-cell-mcp-app, board-widget-frame.
  • x1376, extensions/nextcloud-talk/src/: api-credentials, bot-preflight, core, inbound.behavior, message-actions, room-info, setup, webhook-spool.
  • x1380, src/cli/: session-ref, skills-library-cli, system-cli, tagline, telemetry-cli, users-cli. The original shard also tested the unchanged update-dry-run-state.process file.
  • x1363, src/cron/isolated-agent/: current-session-completion, delivery-target, model-preflight.runtime, run-fallback-policy, subagent-followup. Also adjusts config/test-timeout-race-baseline.txt shrink-only. Its result Markdown was absent; coverage totals were recovered from the saved before/after artifacts and final comparison log.
  • x1383, ui/src/lib/: presenter, provider-quota-summary, session-display, session-method-access, session-viewer-presence, sidebar-zone, toast.
  • x1378, extensions/diffs/src/: browser.runtime, config, language-hints, render, tool, viewer-client.
  • x1384, extensions/browser/chrome-extension/modules/: native-bootstrap, relay-command-handler, relay-core, tab-access-events.navigation, tab-access, tab-document-provenance. Original shard included unchanged relay-auth-v2.
  • x1385, extensions/browser/src/cli/: browser-cli-inspect, browser-cli-manage, browser-cli-manage.timeout-option, browser-cli-shared, browser-cli-state.option-collisions, browser-cli.lazy.
  • x1386, extensions/qa-lab/src/live-transports/matrix/substrate/: client, config, events, fault-proxy, harness.runtime, recording-proxy, sync.
  • x1387, src/gateway/desktop/: attachment, node-stream-broker, observe-bridge, rfb-preauth, rfb-probe, rfb-view-only-filter. Original shard included unchanged computer-process.

Original shard reports recorded no coverage drop above the 1% budget. Declaration targets were intentionally not met where independent retained contracts prevented further safe deletion. x1376 and x1387 recorded unrelated baseline dead-export failures; these are historical notes, not claims about this PR's CI. The x1379 Chromium per-case coverage and x1387 nested-project case coverage used aggregate coverage fallback; x1383 used individual-file measurements after combined translation transforms were incomparable.

@clawsweeper

clawsweeper Bot commented Oct 12, 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 12, 2026 21:12
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates and removes test cases across the UI, CLI, browser, cron, plugins, and desktop Gateway.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful production-neutral consolidation with reported harness validation, but six independent regression contracts lose coverage.
Proof confidence 🦐 gold shrimp (3/6) This test-only cleanup changes no shipped behavior requiring live media; the author reports retained suites passing, and current-head CI remains pending.
Patch quality 🦪 silver shellfish (2/6) 6 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes
Reason: The owner-directed cleanup reduces redundant maintenance cost without changing product behavior; the repository's test-retention policy requires preserving distinct contracts.

Merge readiness

⛔ Needs changes before merge - 12 items remain

Keep this useful test cleanup open, but restore six independent contract checks that the retained coverage does not replace.

Priority: P2
Reviewed head: d48f8421d5ae954a04383b124eadc92894b30276

Before merge

  • Retain nonempty-archive and malformed-registry preservation checks (P2) - The deleted table is the remaining coverage for a registry with sessions={} and a nonempty pendingArchives queue, and for unknown or malformed registry shapes. Retained background cases use pending sessions or an exactly empty registry, so they cannot detect cleanup discarding archive custody or accepting an unknown shape. These are independent persisted-state contracts explicitly preserved by fix(browser): recover after harmless Chrome extension cleanup fails #151037 and required by the test-audit retention policy. Restore focused rows asserting blocked=true and unchanged storage.
  • Preserve canonical configuration precedence over deprecated aliases (P2) - Removing the conflicting-value case leaves no assertion that defaults={fileFormat:'png',imageFormat:'pdf'} resolves to PNG. Alias-only and default-only tests would still pass if the alias wrongly overrode the operator's canonical preference. Keep this independent public configuration compatibility contract, preferably as a small row in the retained schema/defaults suite.
  • Retain the Gateway-row account precedence regression (P2) - The removed test supplies a key naming cards and a Gateway row naming ops, requiring 'Alice · ops'; it also covers an account-less key whose account exists only on the row. Retained cases and account-label E2E fixtures have matching key/row identities, so preferring the parsed key could pass them while displaying the wrong account. Restore the focused authoritative-row cases from fix(ui): disambiguate multi-account session labels #124228.
  • Keep alias remapping coverage across a new Gateway hello (P2) - The deleted reconnect case watches 'main', then changes hello.mainSessionKey from agent:main:main to agent:work:home and checks the new declaration. Remaining hello/client supersession tests watch the literal agent:main:visible and keep the same main-session mapping; the browser test stays on one connection. They cannot detect retaining the old resolved alias and declaring presence in the wrong session after reconnect. Restore this composition-level identity check.
  • Retain the cron-owner plugin-canonical target regression (P2) - The deleted alias case resolves alerts to Bncr:tgBot:-1003891624016:6278285192 and asserts that cron returns the complete target. This guards the previously reported stripping defect fixed by fix(cron): preserve plugin delivery targets #87929. Shared target-resolution tests stop before cron's selectedTarget/prefix handling, and retained cron cases exercise generic normalized targets. Restore this focused regression so reintroducing unconditional prefix stripping is detected.
  • Keep an owning-boundary check for disabled thread inheritance (P2) - The removed case gives the same recipient a stored thread-2 and calls resolveDeliveryTarget with inheritSessionThread=false, requiring threadId to remain undefined. The retained same-recipient case requires inheritance, while different-recipient cases suppress it for another reason. Failure-alert tests only assert that a mocked callback receives false. Removing the opt-out condition in delivery-target.ts would therefore escape these retained checks and route an unthreaded failure notification back into the failed topic. Restore the direct opt-out case.
  • Explain or restore the original intent of Retired browser custody tests - fix(browser): recover after harmless Chrome extension cleanup fails #151037: Automatic cleanup may recover only harmless state; nonempty, unknown, and malformed registries must remain preserved.
  • Explain or restore the original intent of Session account-label tests - fix(ui): disambiguate multi-account session labels #124228: Consume the Gateway's recorded account identity, using key parsing only before the row arrives.
  • Explain or restore the original intent of Viewer presence reconnect tests - fix(gateway): declare viewer presence explicitly instead of deriving it from subscriptions #116001: Declare actual viewed sessions and redeclare them after reconnect; lost-acknowledgment recovery was subsequently strengthened by fix(ui): recover viewer presence after a lost acknowledgment #156255.
  • Explain or restore the original intent of Canonical versus deprecated diffs configuration - unknown: Current source explicitly prioritizes canonical fileFormat over deprecated aliases; historical git -S/blame inspection could not resolve exact introduction because older blobs were unavailable.
  • Explain or restore the original intent of Cron thread-inheritance opt-out - unknown: Failure notification callers intentionally disable remembered-thread inheritance; exact introduction was not resolved by the available history.
  • Explain or restore the original intent of Cron plugin-canonical target regression - fix(cron): preserve plugin delivery targets #87929: Preserve provider-looking prefixes returned by plugin target resolvers instead of stripping them during cron resolution.

Findings

  • [P2] Retain nonempty-archive and malformed-registry preservation checks — extensions/browser/chrome-extension/modules/native-bootstrap.test.ts:93-94
  • [P2] Preserve canonical configuration precedence over deprecated aliases — extensions/diffs/src/config.test.ts:57-59
  • [P2] Retain the Gateway-row account precedence regression — ui/src/lib/session-display.test.ts:58-60

Provenance

Agent review details

How this fits together

The changed suites exercise production owners with controlled inputs and check their results; the timeout baseline records remaining test-timeout exceptions.

flowchart LR
Fixtures[Controlled inputs] --> Tests[Retained test suites]
Tests --> Owners[Production owners]
Owners --> Results[Observable results]
Results --> Assertions[Contract assertions]
Assertions --> CI[Regression detection]
Loading

Technical review

Best possible solution:

Keep the consolidation while restoring focused coverage for the six independent contracts.

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

Source inspection establishes the six coverage losses; this test-only change introduces no runtime defect to reproduce, and execution was prohibited.

Is this the best way to solve the issue?

Consolidating redundant permutations is appropriate, but independent custody, identity, compatibility, and routing contracts must retain their own checks.

Full review comments:

  • [P2] Retain nonempty-archive and malformed-registry preservation checks — extensions/browser/chrome-extension/modules/native-bootstrap.test.ts:93-94
    The deleted table is the remaining coverage for a registry with sessions={} and a nonempty pendingArchives queue, and for unknown or malformed registry shapes. Retained background cases use pending sessions or an exactly empty registry, so they cannot detect cleanup discarding archive custody or accepting an unknown shape. These are independent persisted-state contracts explicitly preserved by fix(browser): recover after harmless Chrome extension cleanup fails #151037 and required by the test-audit retention policy. Restore focused rows asserting blocked=true and unchanged storage.
    Confidence: 0.97
  • [P2] Preserve canonical configuration precedence over deprecated aliases — extensions/diffs/src/config.test.ts:57-59
    Removing the conflicting-value case leaves no assertion that defaults={fileFormat:'png',imageFormat:'pdf'} resolves to PNG. Alias-only and default-only tests would still pass if the alias wrongly overrode the operator's canonical preference. Keep this independent public configuration compatibility contract, preferably as a small row in the retained schema/defaults suite.
    Confidence: 0.94
  • [P2] Retain the Gateway-row account precedence regression — ui/src/lib/session-display.test.ts:58-60
    The removed test supplies a key naming cards and a Gateway row naming ops, requiring 'Alice · ops'; it also covers an account-less key whose account exists only on the row. Retained cases and account-label E2E fixtures have matching key/row identities, so preferring the parsed key could pass them while displaying the wrong account. Restore the focused authoritative-row cases from fix(ui): disambiguate multi-account session labels #124228.
    Confidence: 0.96
  • [P2] Keep alias remapping coverage across a new Gateway hello — ui/src/lib/session-viewer-presence.test.ts:317-320
    The deleted reconnect case watches 'main', then changes hello.mainSessionKey from agent:main:main to agent:work:home and checks the new declaration. Remaining hello/client supersession tests watch the literal agent:main:visible and keep the same main-session mapping; the browser test stays on one connection. They cannot detect retaining the old resolved alias and declaring presence in the wrong session after reconnect. Restore this composition-level identity check.
    Confidence: 0.92
  • [P2] Retain the cron-owner plugin-canonical target regression — src/cron/isolated-agent/delivery-target.test.ts:325-327
    The deleted alias case resolves alerts to Bncr:tgBot:-1003891624016:6278285192 and asserts that cron returns the complete target. This guards the previously reported stripping defect fixed by fix(cron): preserve plugin delivery targets #87929. Shared target-resolution tests stop before cron's selectedTarget/prefix handling, and retained cron cases exercise generic normalized targets. Restore this focused regression so reintroducing unconditional prefix stripping is detected.
    Confidence: 0.98
  • [P2] Keep an owning-boundary check for disabled thread inheritance — src/cron/isolated-agent/delivery-target.test.ts:495-497
    The removed case gives the same recipient a stored thread-2 and calls resolveDeliveryTarget with inheritSessionThread=false, requiring threadId to remain undefined. The retained same-recipient case requires inheritance, while different-recipient cases suppress it for another reason. Failure-alert tests only assert that a mocked callback receives false. Removing the opt-out condition in delivery-target.ts would therefore escape these retained checks and route an unthreaded failure notification back into the failed topic. Restore the direct opt-out case.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Consolidated desktop and board lifecycle checks keeps the original intent (unknown: Retained fragmented RFB traffic and inactive/offscreen MCP app cases absorb the removed framing and mounted-view checks.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test extensions/browser/chrome-extension/modules/native-bootstrap.test.ts --maxWorkers=1
  • pnpm test extensions/diffs/src/config.test.ts --maxWorkers=1
  • pnpm test ui/src/lib/session-display.test.ts ui/src/lib/session-viewer-presence.test.ts --maxWorkers=1
  • pnpm test src/cron/isolated-agent/delivery-target.test.ts --maxWorkers=1
  • pnpm check:changed

What I checked:

PR surface

Tests -4905, Other 0. Total -4905 across 62 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 61 717 5622 -4905
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 62 718 5623 -4905

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests +717/-5622, net -4905 The reduction is substantial and production-neutral, but deletion volume does not justify removing independent regression contracts.

Labels

Label changes:

  • add P2: The cleanup loses specific regression checks without changing shipped runtime behavior.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The cleanup loses specific regression checks without changing shipped runtime behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 12, 2026, 5:20 PM ET / 21:20 UTC.

@steipete
steipete merged commit 9f142db into main Oct 12, 2026
131 of 138 checks passed
@steipete
steipete deleted the tcr/land-d071-1791838472 branch October 12, 2026 21:24
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…law#170246)

* test(ui): deslop x1379 tests

* test(nextcloud-talk): deslop x1376 tests

* test(cli): deslop x1380 tests

* test(config): deslop x1363 tests

* test(ui): deslop x1383 tests

* test(diffs): deslop x1378 tests

* test(browser): deslop x1384 tests

* test(browser): deslop x1385 tests

* test(qa-lab): deslop x1386 tests

* test(desktop): deslop x1387 tests

* test: retain independent contracts in batch d071
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: nextcloud-talk Channel integration: nextcloud-talk cli CLI command changes extensions: browser extensions: diffs extensions: qa-lab gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant