Skip to content

test(core,plugins,ui): remove low-value tests (batch d605) - #184459

Merged
steipete merged 38 commits into
mainfrom
tcr/land-d605-1793007141
Oct 26, 2026
Merged

steipete merged 38 commits into
mainfrom
tcr/land-d605-1793007141

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This test-reduction campaign batch removes duplicate boundary replays, assertion-only implementation details, unused fixture behavior, and repeated setup across 12 retained owner shards. Distinct authority, cancellation, persistence, security, and lifecycle contracts remain at their owning tests. No product behavior or production runtime code changes are intended.

Initially replayed 29 of the 30 supplied commits onto pinned main 79798ed63e1d974179c2bfd7960c04daa7f14dda, plus nine replay-preservation/correction commits. Skipped a37d98c6beb5: its Doctor native-admission scaffolding was already removed by 8792e3a68a7c (#178949).

Replay decisions

  • Kept main's current Codex prewarm and retry-continuation tests; dropped those fixture-rewrite hunks from 505a4204b4f5.
  • Kept main's current client-cancellation file rather than reintroduce its removed timing suite while dropping a classifier test.
  • iMessage's unused inbound adapter was already absent; retained the clean anchor fixture consolidation.
  • Kept main's strengthened Execa deadline/result fixture; dropped its conflicting shrink hunk.
  • Kept the newer chat-policy ownership setup rather than replay the conflicting consolidation.
  • Kept Doctor's current real-addon test and dropped the remaining native-capture hunk from a389e12b3d47; its other changes remain.
  • Kept Google's explicit model fixture and current policy, registration, voice-meeting, and setup tests; dropped conflicting older-fixture rewrites, retaining clean API/media/stream/ADC reductions.
  • Kept current CLI usage helpers and dynamic-candidate tests, which were already reworked on main. Restored the full current fast-mode test file: changing its resolver result shape would invalidate main's newer assertions, and its transport-policy matrix remains useful.

Evidence and limitations

CI-only validation as directed: node_modules/.bin/oxfmt --write <changed TS/JS files>, node_modules/.bin/oxlint -c .oxlintrc.json <changed TS/JS files>, and git diff --check 79798ed63e1d974179c2bfd7960c04daa7f14dda passed. Frozen prefer-offline install passed. No Vitest, check-changed, tsgo, coverage, or Testbox runs were performed locally. Hosted openclaw/ci-gate is the runtime/type/broad proof gate. No Testbox leases were created.

All supplied shard result reports explicitly state coverage was not run under CI-only instructions; none contains numerical coverage totals. Coverage preservation is therefore unmeasured, not claimed as a <=1% result. Independent review completed with six P2 findings. Four accepted: restored baseline continuation-authority, plugin execution policy, and APNs read-kernel files, and restored explicit finalization safety assertions. Shutdown coverage was declined after source inspection (the timeout file was subsequently restored after CI): server-kernel.test.ts covers ordered shutdown and aggregate cleanup failures through the actual lifecycle; server-startup-lifetime.test.ts covers deferred failure settlement; restart-trace.test.ts covers trace thresholds. chat-pane-transcript-loading.test.ts retains the real sent-request timeout/retry path, preserved history, active observation and no composer error. Auto-merge was disabled for these corrections and re-armed on corrected heads. The first CI run also identified three batch type errors: the restored authority fixture fixes its required disableTools field; uniform deadline-table rows and restored discriminated broker request shapes fix the remaining two. Only format/lint/diff checks ran locally; fresh-head hosted CI must validate types and runtime behavior.

Production runtime LOC: +0/-0. Test/support/snapshot LOC: +1893/-3927 (net -2034). Mock-baseline maintenance: +0/-2. No production runtime changes. No CODEOWNERS rules in the current file match these changed paths.

The next CI run found a Gateway lifecycle fixture missing host admission, broker runtime-classification failures, a numeric stat passed where audit identity fields require strings/nulls, and a required OpenRouter base URL. Restored the complete o0272 broker shard (including deleted tests and its registry entry) and the Gateway lifecycle-publication test to main. Restored the original null audit metadata and supplied the OpenRouter default base URL. These are batch repairs, not pre-existing failure exceptions. o0272 contributes zero final changes.

The following CI run exposed two more fixture regressions: consuming the socket via a stream iterator produced an AbortError during expected response loss, and raw Doctor fixture insertion bypassed canonical-row preparation. Restored invoke-system-run.socket.test.ts and doctor-session-canonical-keys.address.test.ts to their original main versions, keeping no cleanup hunks in those files.

The UI run found two history-admission assertions failing because fixture initialization no longer set chatError to null. Restored chat-history-subscription-admission.test.ts in full, including its timeout row and cleanup. The prior timeout review concern is therefore also restored in the final tree. No product code or assertion weakening was used for any CI repair.

The baseline gate required an explicit isolation rationale for the edited iMessage approval Gateway mock. Added a comment documenting the synthetic external-resolution boundary; the queue and replay path remain real, with no behavior/assertion change.

The next baseline check identified two stale entries after the approved mock-isolation rationale and shutdown-mock removal. Removed exactly those two reported rows from config/test-mock-exports-baseline.txt; no baseline widening or local pruning tool was used.

A later CI head reached one unrelated mobile-sharing busy-state failure in ui/src/pages/chat/components/chat-session-sharing-mobile.test.tsx. No matching hourly-main failure was established, so no pre-existing-failure exception was used. Following the stale-base rule, rebased the complete 37-commit stack onto 05a0dd8ee67f1896886198f81d25188f0304d18b after main advanced 48 commits. The rebase had no conflicts; range-diff and fresh changed-file format/lint/diff checks verify the replay. New exact-head CI remains the gate.

The rebased run reproduced a concrete WebKit locator defect in ui/src/components/session-menu.browser.test.ts: the page-wide custom-snooze selector matched a previous compact menu and the current submenu. Scope both clicks to the exact submenu returned by openSubmenu; retain all focus/recreation assertions and real browser clicks. No retries, timeout changes, skipped tests, or production changes. This additional fixture repair is +10/-4 test LOC and will be validated by fresh-head hosted CI.

Shard inventory

Counts cover changed files versus the pinned base; declarations are static call sites, not expanded cases. o0272 was dropped after CI and is not counted in the final diff.

Shard Files LOC before -> after Declaration sites before -> after Coverage totals
o0269 4 525 -> 493 13 -> 13 Not run (CI-only, per shard report)
o0270 11 1434 -> 1129 26 -> 23 Not run (CI-only, per shard report)
o0271 7 897 -> 815 26 -> 21 Not run (CI-only, per shard report)
o0273 10 1408 -> 1156 46 -> 36 Not run (CI-only, per shard report)
o0274 8 1050 -> 919 16 -> 16 Not run (CI-only, per shard report)
o0275 4 496 -> 435 0 -> 0 Not run (CI-only, per shard report)
o0276 8 1042 -> 772 25 -> 19 Not run (CI-only, per shard report)
o0277 2 1272 -> 960 32 -> 32 Not run (CI-only, per shard report)
o0278 10 1300 -> 1040 24 -> 20 Not run (CI-only, per shard report)
o0279 4 696 -> 547 25 -> 21 Not run (CI-only, per shard report)
o0280 5 562 -> 407 9 -> 8 Not run (CI-only, per shard report)
o0282 6 769 -> 738 20 -> 19 Not run (CI-only, per shard report)
o0272 0 No final change No final change Dropped after CI
Changed files by shard

o0269

  • extensions/codex/src/app-server/bounded-turn-output-schema.test.ts
  • extensions/codex/src/app-server/ephemeral-turn.test.ts
  • extensions/codex/src/app-server/installed-probe.test.ts
  • extensions/codex/src/app-server/shared-client-usage.test-support.ts

o0270

  • ui/src/pages/chat/browser-annotation-removal.test.ts
  • ui/src/pages/chat/chat-composer-optional-question.test.ts
  • ui/src/pages/chat/chat-history.recovery-status.test.ts
  • ui/src/pages/chat/chat-mobile-scroll-fades.test.ts
  • ui/src/pages/chat/chat-outbox-loading.test.ts
  • ui/src/pages/chat/chat-pane-companion-lifecycle.test.ts
  • ui/src/pages/chat/chat-pane-history.test-support.ts
  • ui/src/pages/chat/chat-pane-startup-publication.test.ts
  • ui/src/pages/chat/chat-pasted-text-sidebar.test.tsx
  • ui/src/pages/chat/subagents-panel-activity.test.ts
  • ui/src/pages/chat/tool-stream.provider-policy.node.test.ts

o0271

  • src/node-host/local-id.test.ts
  • src/node-host/node-invoke-progress.test.ts
  • src/node-host/node-worker-supervisor.device-folder.test.ts
  • src/node-host/node-worker-transfer-client.fixture.test-support.ts
  • src/node-host/node-worker-workspace.test.ts
  • src/node-host/runtime.worker-supervisor.test.ts
  • src/node-host/worker.test.ts

o0273

  • extensions/imessage/src/accounts.test.ts
  • extensions/imessage/src/approval-native.test.ts
  • extensions/imessage/src/install-imsg.test.ts
  • extensions/imessage/src/monitor.approval-reaction-replay.test.ts
  • extensions/imessage/src/monitor.debounce-policy.test.ts
  • extensions/imessage/src/monitor.last-route.test-support.ts
  • extensions/imessage/src/remote-file.test.ts
  • extensions/imessage/src/send.sqlite.test.ts
  • extensions/imessage/src/session-route.test.ts
  • extensions/imessage/src/targets.test.ts

o0274

  • src/infra/openclaw-cli-shim.windows.test.ts
  • src/infra/session-sqlite-transcript-verification.test.ts
  • src/infra/tailscale-route-owner.worker.test.ts
  • src/infra/update-immutable-build.test.ts
  • src/infra/update-immutable-owner.test.ts
  • src/infra/update-retained-runtime-imports.process.test.ts
  • src/infra/warning-filter.test.ts
  • src/infra/windows-install-roots.test.ts

o0275

  • ui/src/test-helpers/board-provider.ts
  • ui/src/test-helpers/control-ui-e2e-contract.ts
  • ui/src/test-helpers/control-ui-session-section-layout.ts
  • ui/src/test-helpers/devices-fixtures.ts

o0276

  • src/gateway/config-reload.telegram-policy.test.ts
  • src/gateway/device-pair-setup-completion.test.ts
  • src/gateway/live-agent-probes.test.ts
  • src/gateway/server-active-work.test.ts
  • src/gateway/server-shutdown.test.ts
  • src/gateway/server.sessions.title-source.test.ts
  • src/gateway/sessions-patch.operator-model-policy.test.ts
  • src/gateway/test-helpers.listener.ts

o0277

  • extensions/openrouter/image-generation-provider.test.ts
  • extensions/openrouter/video-generation-provider.test.ts

o0278

  • src/agents/harness/attempt-deadlines.test.ts
  • src/agents/harness/builtin-openclaw.test.ts
  • src/agents/harness/context-engine-turn.test-support.ts
  • src/agents/harness/execution-environment.test.ts
  • src/agents/harness/host-capability.grant-authority.test.ts
  • src/agents/harness/native-hook-relay.remote-http.test.ts
  • src/agents/harness/policy.test.ts
  • src/agents/harness/selection.test-support.ts
  • src/agents/harness/tool-surface-bridge.diagnostics.test.ts
  • src/agents/harness/transcript-visibility.test.ts

o0279

  • extensions/google/api.test.ts
  • extensions/google/media-understanding-provider.video.test.ts
  • extensions/google/transport-stream.lifecycle.test.ts
  • extensions/google/vertex-adc-refresh.test.ts

o0280

  • src/commands/__snapshots__/status-database-engines.test.ts.snap
  • src/commands/doctor-config-flow.plugin-session-plan.test.ts
  • src/commands/doctor-foreign-launchd-jobs.test.ts
  • src/commands/doctor-model-metadata-corruption.persistence.test.ts
  • src/commands/status-database-engines.test.ts

o0282

  • src/agents/agent-run-terminal-receipt.test.ts
  • src/agents/agent-tools.before-tool-call.trusted-approval.test.ts
  • src/agents/agent-tools.delegated-authority.test.ts
  • src/agents/embedded-agent-subscribe.subscribe-embedded-agent-session.streams-ollama-pretool-narration.test.ts
  • src/agents/mcp-transport-config.test.ts
  • src/agents/tool-loop-progress-card.test.ts

@clawsweeper

clawsweeper Bot commented Oct 26, 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 26, 2026 09:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T11:31:02.911940Z d3ada3a 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: imessage Channel integration: imessage app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: codex extensions: google extensions: openrouter size: XL labels Oct 26, 2026
@steipete
steipete disabled auto-merge October 26, 2026 09:39
@steipete
steipete enabled auto-merge (squash) October 26, 2026 09:40
@steipete
steipete disabled auto-merge October 26, 2026 09:44
@steipete
steipete enabled auto-merge (squash) October 26, 2026 09:44
@steipete
steipete disabled auto-merge October 26, 2026 09:56
@steipete
steipete enabled auto-merge (squash) October 26, 2026 09:57
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Oct 26, 2026
@steipete
steipete disabled auto-merge October 26, 2026 10:07
@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:08
@steipete
steipete disabled auto-merge October 26, 2026 10:24
@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:25
@steipete
steipete disabled auto-merge October 26, 2026 10:36
@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:36
@steipete
steipete disabled auto-merge October 26, 2026 10:47
@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 26, 2026
Remove the byte-identical residual-history cases from retry: doctor-session-sqlite.residual.test.ts retains all four cases and assertions. Replace the mocked status snapshot layer with explicit local/admitted/remote/error branch cases. Doctor per-store output in doctor-database-diagnostics.test.ts retains real admitted text/JSON projection; status-overview-rows.test.ts and status-json-runtime.test.ts retain formatting and JSON assembly proof.

Reuse the canonical-repair fixture, compact the model audit fixture while keeping persistence and rematerialization checks, and remove internal inventories, call-shape checks and redundant setup assertions. Shard test/support LOC: 1668 to 1334 across both commits. Plain oxlint, oxfmt and diff-check passed; no tests or coverage run in CI-only mode.
Share timed stream completion assertions, ADC reset setup, and HTTP auth assertions while retaining every distinct lifecycle and credential path. No cases deleted. CI-only validation; the shard remains below the 20 percent reduction target.
Consolidate registered media request proof, voice finalization and empty-response proof, stream termination fixtures, ADC retry setup, and provider policy tables. Keep auth, redaction, endpoint, MCP, cancellation, and recovery assertions.

Network overflow teardown remains covered by the overflow row of src/infra/net/fetch-guard.release.test.ts: ends only the request while a captured sibling keeps its pooled transport. Google media still proves its 16 MiB cap and response-stream cancellation with the shared streaming fixture.

Removed model-classification replays remain covered by extensions/google/provider-models.test.ts: keeps non-chat Gemini surfaces out of text discovery and forward compatibility; classifies only ordinary Gemini generation ids for native video. CI-only: formatting, diff checks, and plain oxlint passed; no tests run. Original shard 1190 lines to 951 lines.
Keep side-question restriction assertions in the native harness policy matrix; its conversation-deny case now also covers the former specific-denylist replay. Reuse the lifecycle attempt-result fixture without adding diagnostic state. Remove run-registry setup from transcript projection tests: the owner only reads message and provenance facts, and the retained quiet-artifacts case covers every visibility branch. Preserve all authority, relay, deadline and lifecycle cases. CI-only: formatting, plain oxlint and diff checks; runtime proof deferred to hosted CI.
Remove duplicate model merge assertions covered by model-provider-config.test.ts (fills omissions but preserves authored API/headers) and scoped parameter variants covered by model-extra-params.test.ts plus openai-routing.test.ts (fixed-store owner). Keep harness-specific explicit runtime, implicit routes, prepared overrides and pre-model defaults.

Selection.test.ts preserves disabled tools, additive plugin grants, wildcard allowlists and overlapping runtime glob handoff semantics. Keep sender lifetime assertions with the sender denial test. Share the native and legacy deadline timeline, and prove continuation rejection, accepted dispatch and source revocation in one maintenance-authority lifecycle. CI-only: formatting, plain oxlint and diff checks; no runtime tests.
Keep policy tests at the prepared-policy boundary; model-runtime-policy, openai-routing and harness selection suites cover config parsing and concrete routing. Keep finalizer tool denial, ambient stripping, transcript callback custody and lifecycle notifications; drop internal flag inventory duplicated by attempt prompt/session tests and the child finalization-scope integration.

Diagnostic owner tests cover classification and tool-definition tests cover metadata. Retain the actual nested Code Mode lifetime, completion/abort and stale-threshold assertions. Merge duplicate scheduled prose visibility into the artifact case, preserving each role and error path. Reuse relay defaults, lifecycle fixtures and turn identity/status builders, remove redundant mock cleanup and predicate assertions. No production edits. CI-only: plain oxlint, oxfmt and diff checks pass; no test runs. Shard total 1445 -> 1156 lines (20 percent).
Remove unused CLI fixture exports, share speed resolver setup, and consolidate dynamic-model spies. Inline the delegated preparation barrier without changing its authority assertions.

Selected-route recovery remains covered by skips unused hook context while preserving selected-route recovery; uses each selected model policy retains hooked runtime recovery checks. Keep distinct approval, custody, transport, and lifecycle cases. CI-only campaign: static lint, formatting, and diff checks; no runtime or coverage execution.
Remove five explicit-candidate replays duplicated by the same named tests in live-model-explicit-candidates.test.ts. Keep all three prioritized dynamic resolution paths and their context, normalization, ordering and no-network assertions.

Retain parameter merging in the sole-hook context test and explicit/invalid tiers in extensions/anthropic/fast-mode-policy.test.ts. Receipt configured equivalence and provider fallback remain in terminal-preparation.run-stats.test.ts; producer response formatting remains in the shared-fallback run-entry test. Trim duplicate helper counts and fixture layers without removing approval, sanitization or redaction boundaries.

Original shard: 1698 lines; after first commit: 1581; final: 1358 (20.02 percent reduction). CI-only: formatting, diff check and plain oxlint passed; no tests or coverage run.
@steipete
steipete force-pushed the tcr/land-d605-1793007141 branch from 5cb127a to fc4ab93 Compare October 26, 2026 11:13
@steipete
steipete enabled auto-merge (squash) October 26, 2026 11:13
@steipete
steipete disabled auto-merge October 26, 2026 11:24
@steipete
steipete enabled auto-merge (squash) October 26, 2026 11:27
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates test fixtures and removes duplicate assertions and scenarios across core, plugins, and the Control UI.

Example: Test cleanup

  • Before: Duplicate tests
  • After: Consolidated tests

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with supporting exact-head CI, but one distinct rejection contract is lost.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only PR changes no shipped behavior; exact-head hosted tests and type checks support validation, with the aggregate CI gate still pending.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated fixture maintenance without introducing runtime behavior, configuration, or public contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this is useful maintainer-directed cleanup, but one distinct Codex schema-fallback negative control should be restored before merge.

Priority: P3
Reviewed head: d3ada3a52d864d072bda0b3b91ce3d979269f194

Before merge

  • Restore the generic HTTP 400 schema-fallback negative control (P2) - Replacing the unrelated-failure table with only a schema-worded 429 removes an independent rejection contract. The retained positive HTTP 400 and negative HTTP 429 cases would both pass if isCodexOutputSchemaUnsupported were broadened to accept every HTTP 400; unexpected status 400 Bad Request: Invalid request would then incorrectly start another provider turn. The original feature explicitly covered this input, and no other test exercises it through this owner. Keep that generic 400 as a second row alongside the retained 429.

Findings

  • [P2] Restore the generic HTTP 400 schema-fallback negative control — extensions/codex/src/app-server/bounded-turn-output-schema.test.ts:61-63
Agent review details

How this fits together

The changed test suites supply synthetic inputs to production owners and check routing, authority, persistence, lifecycle, and UI behavior through assertions consumed by CI.

flowchart LR
  A[Test scenarios] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Boundary assertions]
  D --> E[CI gates]
Loading

Technical review

Best possible solution:

Keep the fixture reductions while retaining both generic HTTP 400 and schema-worded HTTP 429 rejection cases in the existing Codex boundary test.

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

Source inspection establishes the lost negative control: matching any HTTP 400 would satisfy the retained positive and 429 cases while incorrectly retrying a generic 400; no tests or mutation experiment were run.

Is this the best way to solve the issue?

Consolidating fixtures around existing owners is appropriate, but status-code rejection and schema-message rejection are independent controls and should remain separate table rows.

Full review comments:

  • [P2] Restore the generic HTTP 400 schema-fallback negative control — extensions/codex/src/app-server/bounded-turn-output-schema.test.ts:61-63
    Replacing the unrelated-failure table with only a schema-worded 429 removes an independent rejection contract. The retained positive HTTP 400 and negative HTTP 429 cases would both pass if isCodexOutputSchemaUnsupported were broadened to accept every HTTP 400; unexpected status 400 Bad Request: Invalid request would then incorrectly start another provider turn. The original feature explicitly covered this input, and no other test exercises it through this owner. Keep that generic 400 as a second row alongside the retained 429.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Codex schema-fallback negative controls changes intended behavior with a stated reason (98b7887: improve(llm-task): constrain Codex output with task schemas #137450 requires unrelated generic 400 and 429 failures to terminate without a fallback turn; this batch calls the schema-worded 429 representative.)
  • iMessage durable approval replay keeps the original intent (b55dbce: fix(imessage): replay approval reactions after transient Gateway failures #130893 prevents approval reactions from being lost after transient Gateway failures; the rewritten test preserves replay and durable completion assertions.)
  • Gateway shutdown tests keeps the original intent (59332fa: The earlier cleanup retained ordered shutdown and failure settlement; this batch moves reliance to retained kernel lifecycle, startup-lifetime, and restart-trace owner tests.)
  • Database status diagnostics tests keeps the original intent (6cf7c47: feat(doctor): truthful per-store database diagnostics #174912 distinguishes admitted physical facts from configured engines and redacts connection errors; the retained branch table checks authority and redaction.)
  • Optional-question and companion UI fixtures keeps the original intent (e6b866d: History places disclosure with the chat pane; the replacement composer fixture retains disclosure and focus behavior, with queue navigation and pasted-text restoration covered by retained browser suites.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test extensions/codex/src/app-server/bounded-turn-output-schema.test.ts --maxWorkers=1
  • node_modules/.bin/oxfmt --check extensions/codex/src/app-server/bounded-turn-output-schema.test.ts
  • node_modules/.bin/oxlint -c .oxlintrc.json extensions/codex/src/app-server/bounded-turn-output-schema.test.ts
  • git diff --check

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +0/-0; tests/support/snapshot +1877/-3911; baseline metadata +0/-2. The reduction stays within test maintenance and adds no production machinery.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is test-maintenance cleanup with no changed production behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • 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 26, 2026, 7:46 AM ET / 11:46 UTC.

@steipete
steipete merged commit 8c4437c into main Oct 26, 2026
146 checks passed
@steipete
steipete deleted the tcr/land-d605-1793007141 branch October 26, 2026 11:52
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…184459)

* test(codex): reduce o0269 fixture scaffolding

Move usage clock and TTL inputs into the existing case table and replace repeated response dispatch branches with an exact-key fixture map. Replace three partial-module prewarm mock factories with scoped spies, retaining auth and authority assertions. Keep fallback authority coverage in preserves authority across schema fallback instead of duplicating its factory call-shape assertion. Shorten the synthetic receipt while keeping admission and continuation assertions.

* test(codex): remove duplicate o0269 boundary replays

Timeout classification remains covered by attempt-startup's clears the shared app-server when a startup RPC times out and client-startup-lifetime's fork timeout preserves a peer through the exact late response; cancellation cases keep the negative classifier checks. Consolidate probe success around both configured and inherited SQLite state while keeping macOS preflight and all managed-policy refusals. Keep the schema-like HTTP 429 as the representative non-schema rejection path. Reuse the existing OAuth fixture with the original long expiry.

* test(node-host): deslop o0271 tests

Share heartbeat interval/skew cases and local identity setup; compact worker frame parsing without dropping protocol cases. Remove only the socket test's self-authored order ledger and duplicate marker read: child exit still precedes socket EOF, and the final marker plus no-local-run assertion retain the no-replay proof. Preserve security, cancellation, identity isolation, and lifecycle assertions. CI-only campaign: formatting and plain oxlint checked locally; execution deferred to hosted CI.

* test(node-host): consolidate o0271 fixtures and lifecycle cases

Consolidate seed absence/freshness/replacement into the existing snapshot lifecycle, and move the pre-aborted bridge request case into worker.test.ts's shared client fixture. Keep one initial policy row per security/ask decision path plus all tightened-policy source boundaries.

Drop duplicate signed-envelope validation from the no-replay test: src/infra/exec-host.socket.test.ts's real UDS boundary covers it. Preserve actual child execution, UNKNOWN reporting, and no local replay. Reuse native server disposal and state-database fixture cleanup without changing mock surfaces.

CI-only: plain oxlint, oxfmt, and diff checks pass. No test runs. Total shard remains below the requested reduction: 1423 to 1332 lines; distinct remaining security and lifecycle proof prevents a safe whole-file deletion.

* test(node-host): shrink o0271 fixture scaffolding

Reuse the existing registerCommands fixture for exec-policy tests, table cancellation setup, fold independent cache-root assertions into the cached-identity scenario, and replace the signal test's fake shutdown implementation with a direct ordering assertion. Keep all distinct authorization, identity, and shutdown checks.

CI-only: oxfmt, plain oxlint, and diff checks pass; no tests run. Shard is 1423 to 1291 lines, still short of 20 percent. No whole-file deletion has a behavior-complete keeper within the authorized shard.

* test(imessage): deslop o0273 tests

Remove the unused runInboundWithDispatch test adapter (repository-wide search has no callers), inline single-use replay fixtures, use the real approval error classifier, and share conversation allowFrom setup while retaining rejection and reply-context assertions.

Canonical chat-id and group-GUID identity rows are covered by the retained direct-session and group-session tests in session-route.test.ts; the formatted phone row retains canonical phone coverage. No production changes. CI-only: plain oxlint, oxfmt and diff-check passed; tests and coverage deferred to hosted CI. Lines 1439 -> 1300 (9.7%); remaining cases protect distinct authority, recovery, installer, debounce and routing behavior.

* test(imessage): consolidate o0273 branch coverage

Consolidate watcher/database ownership and installer fixtures into branch tables; share native prompt assertions and remove redundant wrapper and call-shape checks. Preserve authority retirement, cleanup order, receipt recovery, explicit approvers, and durable replay assertions.

Coverage owners: session-route.test.ts routes configured service targets and keeps explicit targets on direct/group sessions, covering the removed SMS parsing and inference probes. Its direct GUID lookup and native group row cover the duplicate group GUID row. The alias presentation case now also asserts noncanonical identity. The remaining prefixed GUID allowFrom row covers the removed unprefixed row through recursive parsing.

Approval handler runtime tests retain the exact authorized tapback request and transient retry decision assertions; approval-reaction-poller.test.ts expectResolution retains exec identity fields. Durable replay keeps identical request redelivery, no chat fallthrough, outstanding claims and completion deduplication. SQLite recovery retains all fixture rows and its caller-thread calibration; only the duplicated fixture-content assertion is removed.

CI-only: oxfmt, diff-check and plain oxlint pass. No tests, coverage, builds or check-changed ran. Shard lines 1439 -> 1151 overall (20.01%); this additional commit removes 149 lines from 1300. No production changes or deleted files.

* test(process): deslop o0272 tests

Share process-identity setup and resource close sequencing while preserving all 50 cases. The 20% reduction target is not reached: the remaining tests cover distinct admission, cleanup, transport, runtime-diagnostic, and lifecycle-ordering paths. Static lint and formatting only under campaign CI-only mode.

* test(process): consolidate o0272 broker fixtures

Merge startup, failed-spawn, and partial-handoff siblings without removing their cases. Exercise asynchronous startup fallback at its broker owner instead of replaying the Gateway harness; Gateway wiring remains covered by server.spawn-broker.test.ts: owns startup callbacks and shutdown with native Bun transport. Keep framing, PID identity, admission, pending native close, and deadline-settlement paths. CI-only validation: oxlint, oxfmt, and diff check; no tests run.

* test(process): shrink o0272 diagnostic and socket fixtures

Retain startup failures at the real broker boundary with a shared diagnostic table. Merge resource framing and EOF into one socket conversation, and replace resource-server network doubles with real socket traffic. Preserve native-close joining and duplicate owner-message rejection. Remove mock-supplied Execa fidelity assertions covered by execa.test.ts 'matches buffered %s results and errors'; retain every deadline state and both serialization paths. Remove the now-unused context runtime helper and its declaration entry. Static validation only under CI-only campaign rules; no test execution.

* test(infra): deslop o0274 tests

* test(infra): remove redundant o0274 proof layers

Keep Windows tool path proof in windows-diagnostic-env and windows-process-start; APNs decoding in push-apns.store; media normalization in session-accessor.sqlite-transcript-store. Keep Tailscale readiness and clean-stop proof in the process-boundary cases. Remove mock-written artifact echoes and repeated schema inspection.

* test(infra): consolidate o0274 fixture ownership

Isolate warning probes while preserving the current runtime for suppression checks. Reuse the compile-only SQL facade and share transcript verification and conflict assertions without removing cases.

* test(chat): deslop o0270 tests

Share question and placement fixtures, companion assertions, scroll setup, and pasted-text selectors. Table the two payload-release paths while preserving all 54 expanded cases. No production or shared-support changes.

CI-only audit: 1566 to 1545 lines (1.34%). The 20% target is not met: retained cases protect distinct admission, recovery, ownership, policy, lifecycle, and UI behavior. Static oxlint, formatting, and diff checks pass; runtime proof is deferred to hosted CI.

* test(chat): consolidate o0270 owner-boundary tests

Remove duplicate in-card restore coverage retained by components/chat-attachments.test.tsx (retains focused pasted-text actions when a peer read completes and uses current controls) and e2e/chat-pasted-text-show-in-text-field.e2e.test.ts (restores pasted text directly from the composer). Keep icon activation, sidebar removal, and all stale-action guards.

Keep client retirement and pending-answer interleavings in the companion pane table. Hydration recovery remains in chat-session-companion-history.test.ts (reconciles a late answer into the earlier failed turn without consuming an old answer). Model reconnection remains in chat-pane-model-catalog.test.ts (retains model selection through a blip, fences late reads, and clears on client replacement). Transcript loading edges remain in chat-pane-transcript-loading.test.ts.

Remove annotation composer-owner replay covered by chat-pane-browser-annotation-lifecycle.test.ts (invalidates annotation Undo when the logical Gateway client is replaced). Timeout retry remains in chat-pane-transcript-loading.test.ts (automatically restores live observation after a subscription timeout without a composer error); keep mutation-admission retries and selection, connection, rejection, upgrade, and disposal fences here.

Use the mounted-pane send response handler instead of a request forwarding spy, and table shared policy retirement and activity visibility setup. CI-only: plain oxlint, formatting, and diff checks pass; no tests or coverage run. Shard total is 1566 to 1416 lines, below the requested 20 percent reduction because remaining cases retain distinct boundary behavior.

* test(chat): remove duplicated o0270 test layers

Use the existing composer fixture for disclosure ownership instead of a hand-built root and renderer. Retain draft versus focus defaults, readiness replacement, reconnect disclosure, and focus return. Collapsed summaries and queued arrival/navigation remain covered by ui/src/e2e/chat-async-questions.e2e.test.ts: keeps async arrivals nonblocking and preserves their queue through a blocking question; keeps the docked question and composer within a 390 px viewport.

Remove the compaction producer/consumer replay from chat-history.recovery-status.test.ts. The producer contract remains in src/gateway/server-chat-state.test.ts: replays the latest recovery compaction after an attempt failure (summary). Active/completed/stale compaction remains in tool-stream-fallback.node.test.ts: keeps newer compaction active after stale events. Generic history event replay remains in chat-history.inflight.test.ts: restores cleared activity alongside an owned run. Retain the history-specific retry/fallback sequence and omitted model-wait regressions.

Use per-test spies instead of partial module factories for annotation Undo, trim unrelated finished-run recovery setup and duplicate fixture assertions, and reuse canonical queue and pane parameter builders. Keep all negative outbox admission checks and payload/focus ownership assertions. The final empty-port scroll probe could not detect a leaked listener; the retained disconnect probe still has connected registered ports and does detect stale painting.

CI-only: no tests, builds, coverage, or Testbox runs. Plain oxlint, oxfmt, and git diff --check pass. Shard lines: original 1566, prior commit 1416, now 1251 (20.11 percent cumulative reduction). No production files or Vitest routing changed.

* test(ui): deslop o0275 tests

Share request-match option types and expanded-section polling without removing assertions or changing fixture data. Retain all layout checks used by workboard-sidebar.e2e.test.ts and codex-sessions.e2e.test.ts. Remaining shard helpers own distinct lifecycle, readiness, permission, and fixture contracts; no safe 20% structural cut found.

* test(ui): trim unused o0275 fixture behavior

Drop the unused board presentation fixture pinning algorithm and reject unconfigured pins explicitly. Pinning remains covered by the scoped RPC and event identities test in ui/src/lib/board/provider.test.ts. Preserve snapshot, operations, grants, frame, and command behavior used by presentation consumers.

Reuse createInitialDevicesState for duplicated device and exec-approval defaults. Keep the paired-list fixture and view-specific defaults unchanged. CI-only validation: plain oxlint, formatting, and diff check.

* test(openrouter): deslop o0277 tests

Consolidate catalog, request, response and media fixtures while preserving all cases. Keep transport auth and private-network assertions at the outgoing request boundary; remove duplicated internal resolver call-shape checks. Catalog mapping retains the unified catalog contract; video submission retains polling, download, metadata and binary assertions. Speech and transcription suites remain unchanged.

* test(gateway): deslop o0276 tests

Reuse the existing successful-session request assertion, centralize probe mock cleanup, and remove the duplicate model-patch input assertion already enforced by fixture.project. Retain all distinct authority, lifecycle, and persistence cases.

* test(gateway): consolidate o0276 owner-boundary proof

Keep shutdown metadata locally; server-kernel's readiness/sidecar lifecycle test and server-startup-lifetime's deferred-failure test cover ordered joins and retained failures. restart-trace covers trace thresholds. TerminalSessionManager's overlapping-drain test owns exit settlement, and its shared-session test owns size/finalization; retain Gateway counts and holder identities here.

Drop the slow-subscriber replay: server-broadcast.transport's delivery-loss table owns dropping, device-bootstrap's consume/confirm test owns persisted recovery, and connect-hello.setup-completion covers delivery ordering. Keep access metadata and token redaction here. Dashboard title's contended-renamed case owns manual-label preservation. Remove assertion-helper success probes and duplicate account-policy combinations.

Replace simulated lifecycle commits with the existing native compound-worker fixture. Retain rejection, exact runtime publication, stale session identity, and activity owner assertions. Keep the live-probe invalid-clock regression from 963533f. CI-only: formatting, diff check, and plain oxlint passed; no tests run.

* test(commands): remove duplicate o0280 proof layers

Remove the byte-identical residual-history cases from retry: doctor-session-sqlite.residual.test.ts retains all four cases and assertions. Replace the mocked status snapshot layer with explicit local/admitted/remote/error branch cases. Doctor per-store output in doctor-database-diagnostics.test.ts retains real admitted text/JSON projection; status-overview-rows.test.ts and status-json-runtime.test.ts retain formatting and JSON assembly proof.

Reuse the canonical-repair fixture, compact the model audit fixture while keeping persistence and rematerialization checks, and remove internal inventories, call-shape checks and redundant setup assertions. Shard test/support LOC: 1668 to 1334 across both commits. Plain oxlint, oxfmt and diff-check passed; no tests or coverage run in CI-only mode.

* test(google): deslop o0279 tests

Share timed stream completion assertions, ADC reset setup, and HTTP auth assertions while retaining every distinct lifecycle and credential path. No cases deleted. CI-only validation; the shard remains below the 20 percent reduction target.

* test(google): consolidate o0279 test layers

Consolidate registered media request proof, voice finalization and empty-response proof, stream termination fixtures, ADC retry setup, and provider policy tables. Keep auth, redaction, endpoint, MCP, cancellation, and recovery assertions.

Network overflow teardown remains covered by the overflow row of src/infra/net/fetch-guard.release.test.ts: ends only the request while a captured sibling keeps its pooled transport. Google media still proves its 16 MiB cap and response-stream cancellation with the shared streaming fixture.

Removed model-classification replays remain covered by extensions/google/provider-models.test.ts: keeps non-chat Gemini surfaces out of text discovery and forward compatibility; classifies only ordinary Gemini generation ids for native video. CI-only: formatting, diff checks, and plain oxlint passed; no tests run. Original shard 1190 lines to 951 lines.

* test(harness): deslop o0278 tests

Keep side-question restriction assertions in the native harness policy matrix; its conversation-deny case now also covers the former specific-denylist replay. Reuse the lifecycle attempt-result fixture without adding diagnostic state. Remove run-registry setup from transcript projection tests: the owner only reads message and provenance facts, and the retained quiet-artifacts case covers every visibility branch. Preserve all authority, relay, deadline and lifecycle cases. CI-only: formatting, plain oxlint and diff checks; runtime proof deferred to hosted CI.

* test(harness): consolidate o0278 owner-boundary proof

Remove duplicate model merge assertions covered by model-provider-config.test.ts (fills omissions but preserves authored API/headers) and scoped parameter variants covered by model-extra-params.test.ts plus openai-routing.test.ts (fixed-store owner). Keep harness-specific explicit runtime, implicit routes, prepared overrides and pre-model defaults.

Selection.test.ts preserves disabled tools, additive plugin grants, wildcard allowlists and overlapping runtime glob handoff semantics. Keep sender lifetime assertions with the sender denial test. Share the native and legacy deadline timeline, and prove continuation rejection, accepted dispatch and source revocation in one maintenance-authority lifecycle. CI-only: formatting, plain oxlint and diff checks; no runtime tests.

* test(harness): trim o0278 fixtures and redundant proof layers

Keep policy tests at the prepared-policy boundary; model-runtime-policy, openai-routing and harness selection suites cover config parsing and concrete routing. Keep finalizer tool denial, ambient stripping, transcript callback custody and lifecycle notifications; drop internal flag inventory duplicated by attempt prompt/session tests and the child finalization-scope integration.

Diagnostic owner tests cover classification and tool-definition tests cover metadata. Retain the actual nested Code Mode lifetime, completion/abort and stale-threshold assertions. Merge duplicate scheduled prose visibility into the artifact case, preserving each role and error path. Reuse relay defaults, lifecycle fixtures and turn identity/status builders, remove redundant mock cleanup and predicate assertions. No production edits. CI-only: plain oxlint, oxfmt and diff checks pass; no test runs. Shard total 1445 -> 1156 lines (20 percent).

* test(agents): deslop o0282 tests

Remove unused CLI fixture exports, share speed resolver setup, and consolidate dynamic-model spies. Inline the delegated preparation barrier without changing its authority assertions.

Selected-route recovery remains covered by skips unused hook context while preserving selected-route recovery; uses each selected model policy retains hooked runtime recovery checks. Keep distinct approval, custody, transport, and lifecycle cases. CI-only campaign: static lint, formatting, and diff checks; no runtime or coverage execution.

* test(agents): deduplicate o0282 owner coverage

Remove five explicit-candidate replays duplicated by the same named tests in live-model-explicit-candidates.test.ts. Keep all three prioritized dynamic resolution paths and their context, normalization, ordering and no-network assertions.

Retain parameter merging in the sole-hook context test and explicit/invalid tiers in extensions/anthropic/fast-mode-policy.test.ts. Receipt configured equivalence and provider fallback remain in terminal-preparation.run-stats.test.ts; producer response formatting remains in the shared-fallback run-entry test. Trim duplicate helper counts and fixture layers without removing approval, sanitization or redaction boundaries.

Original shard: 1698 lines; after first commit: 1581; final: 1358 (20.02 percent reduction). CI-only: formatting, diff check and plain oxlint passed; no tests or coverage run.

* test: preserve current fast-mode contracts during batch replay

* test: preserve authority policy and finalization regression coverage

* test: keep deadline rows and broker requests type-safe

* test: retain current broker and lifecycle fixtures after CI

* test: preserve socket completion and canonical-row fixtures

* test: retain history admission fixture initialization

* test: document synthetic approval boundary isolation

* test: prune stale d605 mock baseline entries

* test(ui): scope snooze clicks to the owned submenu
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: imessage Channel integration: imessage commands Command implementations extensions: codex extensions: google extensions: openrouter 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: ⏳ 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