Skip to content

test(core,plugins,ui): remove low-value tests (batch d295) - #177339

Merged
steipete merged 31 commits into
mainfrom
tcr/land-d295-1792415491
Oct 19, 2026
Merged

steipete merged 31 commits into
mainfrom
tcr/land-d295-1792415491

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This batch consolidates repeated test fixtures, setup, assertions, and table cases across existing suites. It keeps the behavioral boundaries while reducing test-only repetition. No production code, public APIs, dependencies, or runtime defaults change.

Replayed 27 of the 30 selected commits onto pinned main b429fdd74d69ad362f23588314deeba0306c21e4, with follow-up test-helper type/lint fixes. Test-only diff: +2,515 / -3,912 lines (net -1,397) across 19 files, plus two deleted obsolete mock-baseline rows in one config file. Total net: -1,399 lines. Production and shared-support diff: 0 / 0. The independently scoped shard cleanups are the stages of this batch; no new framework or production abstraction is introduced.

Shard accounting

LOC and declaration counts below are recomputed from this PR against its pinned base, not copied from earlier campaign snapshots. Declarations are lexical it/test declarations, not expanded/executed cases. Table consolidation can lower declarations without removing input rows.

Shard Changed files Test LOC before → after Declarations before → after
x8598 dashboards-page.test.tsx skipped unchanged
x8603 test/helpers/qa-gateway-cleanup-lifecycle.test.ts; test/helpers/run-node-script.test.ts 255 → 191; 205 → 178 1 → 1; 4 → 4
x8605 extensions/bonjour/src/advertiser.test.ts 454 → 366 19 → 19
x8606 extensions/meta/index.test.ts 452 → 392 12 → 12
x8608 src/infra/command-explainer/extract.test.ts 441 → 330 16 → 16
x8607 extensions/microsoft-foundry/image-generation-provider.test.ts 450 → 410 15 → 15
x8610 test/e2e/qa-lab/runtime/webchat-media-artifacts.e2e.test.ts 435 → 325 1 → 1
x8609 src/gateway/provider-browser-auth/callback.test.ts; persistence.integration.test.ts 214 → 160; 226 → 187 8 → 4; 1 → 1
x8611 src/media-generation/runtime-shared.test.ts 431 → 321 16 → 13
x8613 extensions/mistral/realtime-transcription-provider.test.ts 423 → 319 8 → 6
x8612 extensions/github/index.test.ts 465 → 348 16 → 10
x8614 src/acp/translator.disconnects.test.ts; translator.event-ledger.test.ts 214 → 157; 206 → 179 5 → 5; 3 → 3
x8604 ui/src/pages/logs/logs-page.test.tsx 458 → 345 13 → 11
x8616 src/web-fetch/runtime.test.ts 414 → 311 13 → 13
x8618 packages/session-url-contract/src/focus.test.ts; index.test.ts 206 → 149; 205 → 153 3 → 4; 8 → 8
x8617 extensions/raft/src/gateway.test.ts 413 → 349 7 → 6

In-shard coverage totals: unavailable for every listed shard. Each supplied shard report explicitly states that tests and coverage were not run under the operator's CI-only override. There is no measured coverage or <=1% coverage-drop claim for this batch. Some reports describe earlier shard revisions; the table above is the actual final replay delta.

Conflict decisions

  • Skipped 4689df58d28 (x8598 dashboards): current main has a substantially different test harness. Kept main's complete dashboard lifecycle, pagination, and route tests rather than transplanting the conflicting fixture rewrite.
  • Applied 403c4c0c9ec (x8606 Meta), retaining main's explicit 4096 output-cap case and all newer catalog, authored-alias, and transport cases. Skipped follow-up f0f4d34bdad, whose fixed-model helper conflicts with main's multi-model resolver.
  • Applied f4febe3ee42 (x8607 Foundry), updating main-added cases to the consolidated mock names and retaining main's removal of the duplicate environment-header assertion. Skipped follow-up 20cebbef38f, whose larger fixture/table rewrite conflicts with newer custom-deployment cases.
  • All other selected commits applied in order without conflict. No production seams were removed. The only baseline change is the exact two-row shrink required after fixing the Foundry and web-fetch mocks.

Evidence and review

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <19 changed files>: passed (exit 0).
  • node_modules/.bin/oxlint -c .oxlintrc.json <19 changed files>: passed (exit 0).
  • git diff --check b429fdd74d69ad362f23588314deeba0306c21e4: passed (exit 0).
  • Per the explicit CI-only rule, no local Vitest, check-changed, typecheck, coverage, or Testbox runs. Local test wall time: not run. Hosted CI provides runtime/type proof and recorded CI timings.
  • Independent isolated review completed at P0–P2 scope. One P2 concern rejected after source inspection: the reviewer inferred an earlier separate temp-tracker teardown, but current test/helpers/qa-gateway-cleanup.test.ts registers exactly one afterEach; createFixtureLifetime and its imported preparation module register none. That single hook joins fixture work and removes its roots, so the captured hook does not discard another teardown on this base.
  • Initial CI exposed TS2532 in Bonjour's first-call fixture lookup. Added an explicit missing-call error guard; repeated formatting, plain oxlint, and whitespace checks pass. Fresh-head hosted CI is the type/runtime proof. The initial metadata check also required the exact problem-section heading; corrected, and the replacement check passed.
  • Subsequent type-aware CI lint caught an unbound server.getConnections reference and an unnecessary generic DOM-query wrapper. Bound the server method before promisifying it and removed the wrapper in favor of direct typed DOM queries. Repeated only the permitted local formatting/plain lint/whitespace checks; fresh CI remains the full proof.
  • The next extension-lint pass caught direct WebSocket data stringification in the Mistral fixture. Dropped that simplification hunk and restored the original Buffer/Buffer-array/ArrayBuffer normalization. All preceding type/lint repairs passed on the next hosted run.
  • The completed baseline pass flagged two changed mock factories (Foundry HTTP and web-fetch provider discovery). Both now preserve the actual module's exports while overriding the same fixture functions. All runtime tests, UI tests, and typechecks passed before this final narrow mock/lint repair; final-head CI supplies its fresh proof. No baseline or assertion was weakened.
  • On the next head every test, typecheck, and lint job passed. The mock-export check then identified exactly two obsolete baseline rows for those repaired factories. Removed only those exact rows from config/test-mock-exports-baseline.txt, as emitted by the hosted check. The broad baseline scan is not run locally under CI-only mode.
  • Required merge gate: openclaw/ci-gate, pinned-head squash auto-merge.
  • None of the changed paths matches an explicit CODEOWNERS rule.

Risk is confined to test fidelity and fixture behavior. Retained coverage includes authentication/origin rejection, restart/deduplication, cancellation/cleanup ordering, ACP replay/recovery, media fallback policy, and UI log lifecycle behavior. No user-facing release note is needed for test-only changes.

@clawsweeper

clawsweeper Bot commented Oct 19, 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 19, 2026 13:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T14:30:00.959636Z d775964 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 gateway Gateway runtime plugin: bonjour Plugin integration: bonjour extensions: mistral channel: raft Channel integration: Raft extensions: meta Extension: meta extensions: microsoft-foundry extensions: github GitHub plugin: link previews and reader size: XL labels Oct 19, 2026
@steipete
steipete disabled auto-merge October 19, 2026 13:21
@steipete
steipete enabled auto-merge (squash) October 19, 2026 13:23
@steipete
steipete disabled auto-merge October 19, 2026 13:30
@steipete
steipete enabled auto-merge (squash) October 19, 2026 13:31
@steipete
steipete disabled auto-merge October 19, 2026 13:41
@steipete
steipete enabled auto-merge (squash) October 19, 2026 13:48
@steipete
steipete disabled auto-merge October 19, 2026 14:02
@steipete
steipete enabled auto-merge (squash) October 19, 2026 14:03
@steipete
steipete disabled auto-merge October 19, 2026 14:15
@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 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates test fixtures and assertions and removes two obsolete mock-export baseline entries.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no definite source finding; the exact-head UI failure remains unclassified.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only change adds no shipped behavior requiring contributor media proof; hosted validation remains subject to its existing CI gate.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixtures and assertions increase test maintenance cost.
Reason: The maintainer-authored direction reduces repetition within existing owners without changing product behavior.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored test cleanup open; source review found no definite introduced defect, but the reviewed head has an unclassified UI CI failure.

Priority: P3
Reviewed head: b4ad503f43b88913fc2715043f201cbcd8a39743

Before merge

None.

Findings

None.

Agent review details

How this fits together

The affected suites feed synthetic requests, events, and lifecycle transitions into existing OpenClaw owners and assert their responses, persistence, and cleanup.

flowchart LR
  A[Synthetic fixtures] --> B[Consolidated test suites]
  B --> C[Existing production owners]
  C --> D[Responses and lifecycle outcomes]
  D --> E[Independent assertions]
Loading

Technical review

Best possible solution:

Retain the test-only consolidation after attributing the reviewed head’s UI failure and satisfying the required merge gate.

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

This is behavior-preserving test maintenance rather than a runtime bug report; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Consolidating fixtures within existing suites is appropriate, and inspection found no definite loss of a distinct behavioral boundary.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Logs lifecycle tests keeps the original intent (7dd5b52: The Solid migration preserved Logs controls and lifecycle behavior; subsequent boot-bound cursor recovery in fix(ci): repair Go setup and browser lifecycle owners #172828 remains covered.)
  • Browser-auth callback and persistence tests keeps the original intent (e52d47f: Browser login binds callbacks to origin, lifetime, cancellation, and restart, with success following credential persistence.)
  • Raft, Bonjour, and session URL tests keeps the original intent (915e37b: The earlier consolidation retained distinct lifecycle, authentication, storage, and malformed-input contracts; this diff continues that approach.)
  • Mistral realtime fixture keeps the original intent (4963095: Reconnect tests use actual loopback WebSockets and advance retry time only after observing closure, then wait for delivered transcripts.)
  • GitHub reader tests keeps the original intent (b5ef99d: Progressive reader requests preserve resource identity and independent sections; their adaptation and rejection cases remain represented.)
  • Media candidate lifecycle keeps the original intent (13721a1: One shared lifecycle preserves ordered attempts, missing and skipped candidates, generation failures, and preparation-error propagation.)
  • WebChat artifact matrix keeps the original intent (a178285: Generated documents must produce named attachment outcomes while unsupported formats remain rejected; direct assertions replace the intermediate verdict object.)
  • QA cleanup and subprocess fixtures keeps the original intent (605e682: Fixture cleanup joins outstanding work before resets and deletion; the imported cleanup suite currently registers one teardown hook.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -1397, Other -2. Total -1399 across 20 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 19 2476 3873 -1397
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 20 2476 3875 -1399

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests +2476/-3873 The net test reduction comes from local fixture and assertion consolidation; two additional deletions shrink mock-export metadata.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no demonstrated user-facing runtime regression.
  • 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 cleanup with no demonstrated user-facing runtime regression.
  • 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 19, 2026, 10:21 AM ET / 14:21 UTC.

@steipete
steipete force-pushed the tcr/land-d295-1792415491 branch from b4ad503 to d775964 Compare October 19, 2026 14:24
@steipete
steipete enabled auto-merge (squash) October 19, 2026 14:24
@steipete
steipete merged commit 17bef10 into main Oct 19, 2026
112 checks passed
@steipete
steipete deleted the tcr/land-d295-1792415491 branch October 19, 2026 14:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
…177339)

* test(helpers): deslop x8603 tests

* test(helpers): deslop x8603 tests

* test(helpers): deslop x8603 tests

* test(bonjour): deslop x8605 tests

* test(meta): deslop x8606 tests

* test(command-explainer): deslop x8608 tests

* test(microsoft-foundry): deslop x8607 tests

* test(qa-lab): deslop x8610 tests

* test(gateway): deslop x8609 tests

* test(gateway): deslop x8609 tests

* test(gateway): deslop x8609 tests

* test(media-generation): deslop x8611 tests

* test(media-generation): deslop x8611 tests

* test(mistral): deslop x8613 tests

* test(mistral): deslop x8613 tests

* test(github): deslop x8612 tests

* test(github): deslop x8612 tests

* test(acp): deslop x8614 tests

* test(acp): deslop x8614 tests

* test(logs): deslop x8604 tests

* test(logs): deslop x8604 tests

* test(logs): deslop x8604 tests

* test(web-fetch): deslop x8616 tests

* test(session-url-contract): deslop x8618 tests

* test(raft): deslop x8617 tests

* test(raft): deslop x8617 tests

* test(raft): deslop x8617 tests

* test(bonjour): guard missing service creation in fixture

* test: resolve type-aware lint in consolidated fixtures

* test: preserve buffer handling and real mock exports

* test: prune repaired mock export baseline entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: raft Channel integration: Raft extensions: github GitHub plugin: link previews and reader extensions: meta Extension: meta extensions: microsoft-foundry extensions: mistral gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: bonjour Plugin integration: bonjour 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