Skip to content

test(agents,gateway,sdk,ui): remove low-value tests (batch d206) - #175294

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d206-1792221741
Oct 17, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d206-1792221741

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Consolidates repeated test fixtures and equivalent assertions in campaign batch d206.

User Impact

No production behavior, public API, configuration, or visual changes. Changes are tests, test-support code, and a shrink-only mock-exception baseline update. Existing distinct authority, durability, recovery, ordering, and lifecycle scenarios are retained; declarations are sometimes folded into tables or shared registrations.

Why This Change Was Made

Replay the selected 29 campaign commits onto pinned main 61de5dacdabb58640ab51b682d5ed032d4d60118, retaining current-main additions. Applied 28 commits; skipped 332ba5c272665be66b9a9be14c4bbbda2f5b6b10 (x7506) because its channel fixture consolidation assumes earlier helpers absent from main and conflicts broadly with the current recovery tests.

Conflict decisions:

  • x7506: dropped the whole commit; both channel files remain exactly main's version.
  • x7514: dropped all edits to src/node-host/node-worker-turn-store.test.ts, retaining main's newer durable receipt, container, and predecessor-upgrade coverage and fixture start/finish contract. Kept the other eight files, including cleanly merged transfer/workspace changes.
  • x7519: dropped edits to packages/sdk/src/index.test.ts and transport.test.ts in all three SDK commits, and run-event-replay.recovery.test.ts in the latter two. Current main expanded wait-status/reconnect scenarios and recovery timing instrumentation win. Kept all nonconflicting SDK files.
  • First rebase onto current main: dropped all x7525 edits to ui/src/e2e/avatar-initial-emoji.e2e.test.ts across the three UI commits. Main now uses autosave; retained that current interaction contract rather than reintroducing the removed Save button.
  • All other commits applied without conflicts. No production seam was removed.
  • CI repair: dropped all cleanup edits to src/infra/package-update-integrity-hasher.test.ts, src/infra/package-update-publication-boundary.test.ts, ui/src/e2e/background-presentation.e2e.test.ts, and ui/src/e2e/background-work.real-gateway.test-support.ts. Their pinned-base implementations remain intact. Repaired missing imports/fixture return fields, readonly construction, typed literal/tuple/callback contracts, mock-isolation reasons, method binding, and the offscreen multi-iframe locator. Added this: void to the existing closure-only Codex test-harness sender.

CODEOWNERS: no changed paths match the current CODEOWNERS rules.

Evidence

CI-only validation, as requested: pnpm install --frozen-lockfile --prefer-offline passed; direct node_modules/.bin/oxfmt --write <59 existing changed files> passed (no additional diff); direct node_modules/.bin/oxlint -c .oxlintrc.json <59 existing changed TS files> exited 0; git diff --check 61de5dacdabb58640ab51b682d5ed032d4d60118 exited 0.

No local Vitest, check-changed, typecheck, build, coverage, or Testbox runs were performed. No Testbox leases were created. Runtime proof and CI timing are pending hosted openclaw/ci-gate on this head. Independent review runs during CI.

The source shard reports explicitly say coverage was not run under CI-only mode; there are no in-shard coverage totals to quote and no measured <=1% coverage claim. Their metrics describe an earlier pass; the following LOC and declaration deltas are freshly measured for the cumulative replay against the pinned base. Declaration counts are simple static line-start it/test call counts, not expanded case counts, and omit multiline typed declarations. Fewer declarations must not be read as deleted scenarios.

Production LOC: +0/-0. Test and test-support LOC: +10,666/-15,516, net -4,850 across 60 files (including one deleted support file). Mock-exception baseline: +0/-4 in one additional file, for a total net reduction of 4,854 lines across 61 files.

First hosted run: 39013891914 exposed fixture/type/lint regressions; repaired in 9aa93f757919f74b2e5ab2cc71f45e1344f5d07e. The same run also has an unrelated missing import in ui/src/components/link-reader-metadata.test.ts (./link-reader-panel.ts), outside this diff. Current main 3a539a9b9ab9f5b48cadd97bc377cc191b566c9e still contains that import and has no file at that path. This is source evidence only, not the requested runnable baseline proof; no inherited-failure merge exception is claimed. New-head CI remains authoritative.

Full independent review completed in four passes. Accepted five findings: restored the original Code Mode bridge lifecycle and MCP suites, compaction-handoff authority proof, and dispatch-error display-sanitization proof by dropping those four files' cleanup; restored the same-client start-and-steer request in the FIFO test. Rejected the cutoff-mode finding after direct source/caller inspection: raw/JSON cutoff modes already had no callers at the pinned base; only the URL-encoded cutoff case exists and remains unchanged in the untouched supervisor suite.

The second hosted run 39014469848 passed the repaired UI E2E and most other jobs. Its remaining batch issues were the session-list request fixture's unknown narrowing, an unbound fixture update method, and the dispatch-error fixture context type; fixed or dropped in the final correction. Other failures were outside this diff: link-reader metadata import, plugin install-record fixture types, and exec-scope mock exports. Rebased onto repaired main 61de5dacdabb58640ab51b682d5ed032d4d60118 without conflicts, rather than bypassing those checks. The latest exact-head CI run is 39015689352 at c503ec1d18478f1b730956bc24e1256298170119; final correction review finished scoped-clean (no actionable P0–P2 findings). No inherited-failure/admin exception is claimed.

Final CI follow-up: the last job in run 39015689352 exposed five timeouts in the changed test/gateway-subagent-restart.e2e.test.ts. Dropped that file's entire cleanup, restoring the reviewed main implementation without changing timers/assertions. Main commit 98375d4b624 fixed the remaining unrelated exec-scope mock-isolation marker. Rebased without conflicts onto 61de5dacdabb58640ab51b682d5ed032d4d60118, repeated permitted formatting/plain-lint/diff gates successfully, and re-armed the new head 0d3896a515defe9754da02a483a5478306f7c4b7. Hosted CI is the final runtime gate.

Final ratchet repair: CI on 0d3896a515defe9754da02a483a5478306f7c4b7 requested removal of exactly four obsolete rows in config/test-mock-exports-baseline.txt, matching the explicitly isolated mocks in assistant-transcript-repair and delivery tests. Removed only those four CI-identified rows; the independent hook-helper exception remains. This is a shrink-only baseline change, with no weakened guard.

Per-shard files and cumulative replay metrics
Shard Test/support LOC before → after Added / removed Static declarations before → after Coverage totals
x7512 3633 → 2793 +1194 / -2034 57 → 47 Not run (CI-only source report)
x7516 2979 → 2615 +1036 / -1400 25 → 22 Not run (CI-only source report)
x7506 Unchanged +0 / -0 Unchanged Not run (CI-only source report); commit skipped
x7514 3049 → 2651 +707 / -1105 21 → 20 Not run (CI-only source report)
x7518 3846 → 3372 +1479 / -1953 55 → 48 Not run (CI-only source report)
x7522 2551 → 2282 +1203 / -1472 28 → 27 Not run (CI-only source report)
x7519 2149 → 1731 +960 / -1378 17 → 17 Not run (CI-only source report)
x7520 3630 → 2864 +1575 / -2341 69 → 63 Not run (CI-only source report)
x7521 1785 → 1524 +843 / -1104 7 → 6 Not run (CI-only source report)
x7525 2817 → 2008 +742 / -1551 18 → 18 Not run (CI-only source report)
x7523 1926 → 1675 +927 / -1178 48 → 43 Not run (CI-only source report)

x7512

  • src/agents/command/assistant-transcript-repair.test.ts
  • src/agents/command/attempt-execution.announce.test-support.ts
  • src/agents/command/attempt-execution.cli-mcp.test.ts
  • src/agents/command/attempt-execution.cli.test-support.ts
  • src/agents/command/cli-compaction.test-support.ts
  • src/agents/command/cli-compaction.test.ts
  • src/agents/command/delivery.test.ts

x7516

  • test/gateway-restart.test-support.ts
  • test/gateway-rpc-exporters.test.ts
  • test/gateway-steer-fifo.e2e.test.ts
  • test/gateway-widget-restart.e2e.test.ts
  • test/git-hooks-pre-commit.test.ts

x7506

Skipped; no files changed.

x7514

  • src/node-host/node-worker-supervisor.fixture.test-support.ts
  • src/node-host/node-worker-supervisor.settlement.test-support.ts
  • src/node-host/node-worker-supervisor.test-support.ts
  • src/node-host/node-worker-transfer-client.fixture.test-support.ts
  • src/node-host/node-worker-transfer-client.git.test.ts
  • src/node-host/node-worker-transfer-client.lifetime.test.ts
  • src/node-host/node-worker-transfer-client.test.ts
  • src/node-host/node-worker-workspace-manifest.test.ts

x7518

  • extensions/codex/src/app-server/canonical-fork-native.test-support.ts
  • extensions/codex/src/app-server/canonical-fork.test-support.ts
  • extensions/codex/src/app-server/client-catalog-preview.test.ts
  • extensions/codex/src/app-server/client-runtime.test.ts
  • extensions/codex/src/app-server/client-startup-lifetime.test.ts
  • extensions/codex/src/app-server/client.test.ts
  • extensions/codex/src/app-server/compact.test-support.ts
  • extensions/codex/src/app-server/test-support.ts

x7522

  • src/infra/package-update-filesystem.test.ts
  • src/infra/package-update-lifecycle.test.ts
  • src/infra/package-update-overrides.e2e.test.ts
  • src/infra/package-update-publication-durability.test.ts
  • src/infra/package-update-publication-ownership.test.ts
  • src/infra/package-update-publication.test-support.ts
  • src/infra/package-update-sync.test-support.ts

x7519

  • packages/sdk/src/chat-stream.test.ts
  • packages/sdk/src/index.e2e.test.ts
  • packages/sdk/src/package.e2e.test-support.ts
  • packages/sdk/src/run-events-terminal.test.ts
  • packages/sdk/src/run-reconnect.websocket.test.ts

x7520

  • ui/src/lib/sessions/index-list.test.ts
  • ui/src/lib/sessions/index-subscriptions.test.ts
  • ui/src/lib/sessions/index-supplemental-reconcile.test.ts
  • ui/src/lib/sessions/list-options.test.ts
  • ui/src/lib/sessions/navigation.test.ts
  • ui/src/lib/sessions/pull-request-state.test.ts

x7521

  • src/gateway/server-methods/chat-send-commentary-media.test.ts
  • src/gateway/server-methods/chat-send-diagnostics.test.ts
  • src/gateway/server-methods/chat-send-direct-followup.test.ts
  • src/gateway/server-methods/chat-send-global-identity.test.ts

x7525

  • ui/src/e2e/board-a2ui.e2e.test.ts
  • ui/src/e2e/board-a2ui.test-support.ts
  • ui/src/e2e/board-browser.test-support.ts
  • ui/src/e2e/board-mcp-app.e2e.test.ts
  • ui/src/e2e/board-split-transcript.e2e.test.ts
  • ui/src/e2e/browser-auth-recovery.e2e.test.ts
  • ui/src/e2e/browser-route-handoff.e2e.test.ts

x7523

  • src/agents/code-mode.controlled-tool.test-support.ts
  • src/agents/code-mode.test.ts
  • src/agents/code-mode.wait.test.ts

@clawsweeper

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-17T08:18:13.797491Z 0d3896a 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.

@steipete
steipete enabled auto-merge (squash) October 17, 2026 07:27
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL labels Oct 17, 2026
@steipete
steipete disabled auto-merge October 17, 2026 07:28
@steipete
steipete force-pushed the tcr/land-d206-1792221741 branch from d5c2e6f to 0095613 Compare October 17, 2026 07:30
@steipete
steipete enabled auto-merge (squash) October 17, 2026 07:30
@steipete
steipete disabled auto-merge October 17, 2026 07:36
@steipete
steipete enabled auto-merge (squash) October 17, 2026 07:39
@steipete
steipete disabled auto-merge October 17, 2026 07:45
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates test fixtures and assertions across agents, Gateway, Codex, SDK, updates, node workers, and UI suites.

Example: Running the repository checks after consolidating transcript-repair mocks.

  • Before: The mock factories match their grandfathered baseline entries.
  • After: New isolation annotations exempt three factories, but their retained baseline entries make the shrinking-baseline check fail.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful test consolidation, held back by two source-established baseline failures and incompletely attributable CI failures.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR changes tests and fixtures only; supplied validation is CI-only and does not claim a changed user-visible runtime behavior.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated test setup while keeping production behavior unchanged.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this maintainer-directed test consolidation has value, but it leaves two obsolete baseline records that cause CI checks to fail.

Priority: P3
Reviewed head: 9aa93f757919f74b2e5ab2cc71f45e1344f5d07e

Before merge

  • Prune baseline entries for the newly exempted mock factories (P2) - The new isolation annotations exclude the persistence, runtime-loader, and logging factories from the mock inventory, but their three entries remain in config/test-mock-exports-baseline.txt. The checker returns exit 1 when baseline entries disappear from that inventory, so this change makes check:test-mock-exports fail even if every test passes. Remove those three obsolete entries while retaining the still-active hook-helper entry.
  • Remove the obsolete compaction max-lines exception (P2) - The consolidation reduces cli-compaction.test.ts to 926 physical lines, below the 1,000-line test limit, but its max-lines baseline entry remains. The exact-head baseline job explicitly flags this entry as stale, and the checker treats stale entries as failures. Delete this entry from the baseline.

Findings

  • [P2] Prune baseline entries for the newly exempted mock factories — src/agents/command/assistant-transcript-repair.test.ts:16-20
  • [P2] Remove the obsolete compaction max-lines exception — config/max-lines-baseline.txt:212
Agent review details

How this fits together

These tests exercise runtime owners through synthetic tools, transports, filesystem fixtures, and browser interactions; CI consumes their results and enforces shrinking exception baselines.

flowchart LR
  A[Test scenarios] --> B[Shared fixtures]
  B --> C[Runtime owners]
  C --> D[Observed results]
  D --> E[Contract assertions]
  F[Exception baselines] --> G[CI checks]
  E --> G
Loading

Technical review

Best possible solution:

Retain the test consolidation and remove the obsolete exception entries without weakening either baseline check.

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

The baseline defects follow directly from the changed fixtures and checker implementations, with the stale compaction entry independently confirmed by exact-head CI annotations; no target code was executed.

Is this the best way to solve the issue?

Shared fixtures and table-driven cases fit the repository’s test-value policy, but the corresponding exception inventories must shrink with the tests.

Full review comments:

  • [P2] Prune baseline entries for the newly exempted mock factories — src/agents/command/assistant-transcript-repair.test.ts:16-20
    The new isolation annotations exclude the persistence, runtime-loader, and logging factories from the mock inventory, but their three entries remain in config/test-mock-exports-baseline.txt. The checker returns exit 1 when baseline entries disappear from that inventory, so this change makes check:test-mock-exports fail even if every test passes. Remove those three obsolete entries while retaining the still-active hook-helper entry.
    Confidence: 0.99
  • [P2] Remove the obsolete compaction max-lines exception — config/max-lines-baseline.txt:212
    The consolidation reduces cli-compaction.test.ts to 926 physical lines, below the 1,000-line test limit, but its max-lines baseline entry remains. The exact-head baseline job explicitly flags this entry as stale, and the checker treats stale entries as failures. Delete this entry from the baseline.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Assistant transcript repair keeps the original intent (61429ef: Preserve delivered assistant finals through transcript-write failures and recover them without duplicate appends.)
  • SDK packed-consumer fixtures keeps the original intent (e928762: Exercise external SDK consumers through packed packages; later work preserved isolated package preparation and cleanup.)
  • Codex startup lifetime keeps the original intent (4343400: Keep healthy peer turns alive when a shared client's startup request times out or is canceled.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:test-mock-exports --base d2fe433
  • pnpm check:max-lines-ratchet --base d2fe433
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f525bee adds src/agents/command/assistant-transcript-repair.test.ts:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f525bee2b46f; files: src/agents/command/assistant-transcript-repair.test.ts)
  • Vincent Koc: Raw commit e928762 adds packages/sdk/src/package.e2e.test-support.ts:59 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e928762b9da2; files: packages/sdk/src/package.e2e.test-support.ts)
  • Jason (Json): Raw commit 4343400 adds extensions/codex/src/app-server/client-startup-lifetime.test.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4343400a52b4; files: extensions/codex/src/app-server/client-startup-lifetime.test.ts)

PR surface

Tests -2694. Total -2694 across 65 files. Added test files: 6.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 65 6630 9324 -2694
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 65 6630 9324 -2694

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and support +12,127/-17,604, net -5,477. The verified pinned diff reduces test maintenance surface without adding product-runtime code.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no product-runtime behavior change.
  • 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:

  • P3: This is test-maintenance cleanup with no product-runtime behavior change.
  • 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 17, 2026, 3:57 AM ET / 07:57 UTC.

@steipete
steipete force-pushed the tcr/land-d206-1792221741 branch from 9aa93f7 to c503ec1 Compare October 17, 2026 07:59
@steipete
steipete enabled auto-merge (squash) October 17, 2026 07:59
@steipete
steipete disabled auto-merge October 17, 2026 08:11
@steipete
steipete force-pushed the tcr/land-d206-1792221741 branch from c503ec1 to 0d3896a Compare October 17, 2026 08:14
@steipete
steipete enabled auto-merge (squash) October 17, 2026 08:14
@steipete
steipete disabled auto-merge October 17, 2026 08:21
@steipete
steipete enabled auto-merge (squash) October 17, 2026 08:23
@steipete
steipete merged commit ab37bc6 into main Oct 17, 2026
150 checks passed
@steipete
steipete deleted the tcr/land-d206-1792221741 branch October 17, 2026 08:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…nclaw#175294)

* test(agents): deslop x7512 tests

* test(agents): deslop x7512 tests

* test(agents): deslop x7512 tests

* test(gateway): deslop x7516 tests

* test(gateway): deslop x7516 tests

* test(gateway): deslop x7516 tests

* test(node-host): deslop x7514 tests

* test(codex): deslop x7518 tests

* test(codex): deslop x7518 fixtures and assertions

* test(codex): deslop x7518 fixture setup

* test(package-update): deslop x7522 tests

* test(package-update): deslop x7522 tests

* test(package-update): deslop x7522 tests

* test(sdk): deslop x7519 tests

* test(sdk): further deslop x7519 tests

* test(sdk): deslop x7519 tests

* test(sessions): deslop x7520 tests

* test(sessions): deslop x7520 tests

* test(sessions): deslop x7520 tests

* test(gateway): deslop x7521 tests

* test(gateway): deslop x7521 tests

* test(gateway): deslop x7521 tests

* test(ui): deslop x7525 tests

* test(ui): deslop x7525 tests

* test(ui): deslop x7525 tests

* test(code-mode): deslop x7523 tests

* test(code-mode): deslop x7523 tests

* test(code-mode): deslop x7523 tests

* test: repair d206 fixture regressions from CI

* test: retain independent d206 regression coverage

* test: retain subagent restart fixture baseline

* test: shrink d206 mock export exceptions
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 extensions: codex gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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