Skip to content

test(agents,gateway,ui): remove low-value tests (batch d189) - #174840

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d189-1792192726
Oct 17, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d189-1792192726

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Test fixtures repeat setup, payload construction, lifecycle scaffolding, and assertions across the campaign shards in batch d189.

User Impact

No intended user-visible behavior change. The settled diff changes 55 test/support files plus one baseline file, +9,749/-15,926 lines overall (net -6,177); production +0/-0. Distinct authority, cancellation, recovery, privacy, ordering, and transport contracts are intended to remain covered.

Why This Change Was Made

Replay the supplied cleanup onto current main, share fixture construction, and consolidate equivalent cases into tables. The initial pinned base was ba2b39a5e69e2abc4dccd7e483011a76de30c213; after CI diagnosis the branch was rebased onto 1956ba00b72be3f21847b7641986db5c8cd26940, then onto 58fb58883a67b3cdc74a62ad3d164619ec434531 after a merge conflict. Static declarations change from 597 to 552; declarations are not expanded case counts or a coverage metric.

29 of 30 supplied commits were applied, with the original subjects retained, followed by two correction commits. Skipped 9b1ecffc4598f8457684d4e5614b7d3eb8606a05 (x7319): all seven chat files conflict with substantially rewritten current-main fixtures and frame interfaces. No chat changes are included.

Conflict resolution preserves current-main behavior:

  • MCP runtime: retain the newer per-sender partition/static-sharing test; adapt its manager call to the consolidated fixture.
  • Gemma transport: retain length, content-filter, and missing-termination cases plus the other-model-family guard; use the shared fixture without reducing that matrix.
  • Media paths: retain reviewer-device steering, permission/tool-policy rows, and the history-image regression; adapt calls to the consolidated fixtures. Current-image and unresolved-attachment cases remain in the table.
  • Worker bootstrap: preserve authenticated port fallback, transfer/install retry, private inline-key cleanup, and UTF-16 error boundaries. The bundle file was ultimately left unchanged after CI identified a chunk-fixture mismatch.
  • A subsequent merge conflict required another rebase onto 58fb58883a67b3cdc74a62ad3d164619ec434531. Drop the worker-tunnel cleanup entirely: main replaced debug-log evidence with direct worker-operation assertions. Keep node-worker-tunnel.test.ts and the already-omitted reasoning-replay file byte-for-byte at this new base.
  • Drop all cleanup hunks for src/gateway/worker-environments/computer-transport.test.ts, src/agents/model-auth-availability.test.ts, src/cron/service.restart-catchup.test.ts, and src/agents/openai-thinking-contract.test.ts. These files have newer permission/revocation, auth-route/SecretRef, restart/DST/backoff, or reasoning-transport coverage whose rewrites are not safe to replay mechanically. They are unchanged from the pinned base.

No changed path matches the current .github/CODEOWNERS rules.

The first CI run, https://github.com/openclaw/openclaw/actions/runs/38982609399, exposed replay/fixture defects and typed-lint errors. Restored sandbox manager/workdir bindings, the transport server import, typed stream options, explicit awaited cleanup, the artifact callback return contract, and mock-isolation explanations; removed redundant type/boolean syntax. In addition to the four conflict omissions above, CI repairs drop cleanup from src/agents/model-auth-availability.session-pin.test.ts, src/agents/openai-responses.reasoning-replay.test.ts, src/agents/openai-transport-stream.replay-and-tools.test.ts, src/gateway/worker-environments/bundle.test.ts, src/cron/service.wake-now-real-heartbeat.test.ts, ui/src/e2e/new-session-page.configured-defaults.e2e.test.ts, and ui/src/e2e/new-session-page.instant-thread.e2e.test.ts. Those files retain current-main tests unchanged. An LRU assertion in the untouched src/plugins/runtime/runtime-llm.prepared-owner.test.ts also failed on the first run; it is not claimed as proven pre-existing, and the fresh rebased CI must resolve it before landing.

Evidence

The second CI run, https://github.com/openclaw/openclaw/actions/runs/38983999502, identified 17 stale mock-export baseline entries and recursive callback return inference. The final correction deletes exactly those baseline entries and makes the artifact-transfer effect callbacks void-returning. The untouched LRU test failed again; no pre-existing-failure exemption is claimed.

Independent review identified four accepted findings, now resolved: restore strict response schema constraints, narrow the optional browser attach callback, retain successful installer receipt coverage, and retain clone-failure diagnostics. The last two were addressed by dropping cleanup entirely from node-worker-bundle-installer.test.ts and node-worker-repository-sync.test.ts; both are unchanged from the pinned base. Five findings were rejected after source inspection: the plugin root is already canonicalized, inspector state is reset after each test, both allegedly unused symbols have callers/type uses, and the invalid-digest negative control remains present. A fresh review of the final correction found no actionable P0–P2 findings.

Local validation is deliberately CI-only: changed-file oxfmt --write, plain oxlint -c .oxlintrc.json, and git diff --check. No local Vitest, check-changed, tsgo, Testbox, or Crabbox runs. Runtime/type proof is delegated to PR CI and openclaw/ci-gate; local test wall time is not measured under this compute policy. Independent diff review runs while CI is pending.

The source shard reports explicitly say tests and coverage were not run under CI-only instructions; they contain no in-shard coverage totals line. No coverage percentage or <=1% coverage-drop claim is made here. The table below records the actual replayed diff, not the earlier intermediate report LOC.

Shard Test/support + / - (net) Static declarations before → after In-shard coverage
x7317 +1,316 / -2,221 (-905) 53 → 53 Not run; no totals reported
x7324 +1,175 / -1,967 (-792) 60 → 51 Not run; no totals reported
x7322 +1,045 / -1,890 (-845) 70 → 61 Not run; no totals reported
x7326 +1,037 / -1,812 (-775) 96 → 94 Not run; no totals reported
x7331 +793 / -1,521 (-728) 55 → 52 Not run; no totals reported
x7330 +532 / -836 (-304) 39 → 36 Not run; no totals reported
x7328 +928 / -1,534 (-606) 24 → 21 Not run; no totals reported
x7333 +474 / -807 (-333) 32 → 32 Not run; no totals reported
x7327 +1,100 / -1,544 (-444) 57 → 52 Not run; no totals reported
x7332 +1,386 / -1,905 (-519) 64 → 53 Not run; no totals reported
x7342 +506 / -882 (-376) 47 → 47 Not run; no totals reported
x7319 Skipped Unchanged Not run; no totals reported
Files by shard
  • x7317, src/agents/: agent-bundle-mcp-runtime.agent-bundle.test.ts, agent-bundle-mcp-runtime.test.ts.
  • x7324, test/scripts/: e2e-helper-env-limits.test.ts, e2e-mock-config-limits.test.ts, e2e-run-with-pty.test.ts, e2e-shell-tempfiles.test.ts, eager-import-closure.test.ts.
  • x7322, src/agents/sandbox/: browser.create.test-helpers.ts, browser.create.test.ts, docker.access-lifetime.test.ts, docker.config-hash-recreate.test.ts, docker.create.test-helpers.ts, docker.test.ts, backend.test.ts, browser.local-workspace.test.ts.
  • x7326, packages/ai/src/transports/: openai-completions-dsml.recovery.test.ts, openai-completions-gemma.test.ts, openai-completions-params.test.ts, openai-completions-replay.google-signatures.test.ts, openai-completions-replay.test.ts, openai-completions-stream.integration.test.ts, openai-completions-stream.test.ts, openai-completions-transport.test.ts, openai-completions-suite.test-support.ts.
  • x7331, src/auto-reply/reply/: abort.acp-boundary.test.ts, abort.target-owner.test.ts, abort.test.ts, acp-elicitation-handler.test.ts, acp-projector.test.ts, agent-runner.media-paths.test.ts, acp-spawn-owner.test.ts.
  • x7330, src/gateway/worker-environments/: bootstrap.test.ts, artifact-transfer-http.test.ts, cloud-transcript-write-admission.test.ts.
  • x7328, ui/src/e2e/: new-session-page.cloud-startup.e2e.test.ts, new-session-page.device-dispatch.e2e.test.ts, new-session-page.environment-metadata.e2e.test.ts, new-session-page.operator-scopes.e2e.test.ts, new-session-page.test-support.ts.
  • x7333, src/gateway/worker-environments/: node-launch-adapter.test.ts, node-toolchain.test.ts, node-worker-repository-preparation.test.ts, node-worker-repository-authority.test.ts.
  • x7327, src/agents/: model-auth-availability.reasons.test.ts, model-auth-label.test.ts, model-auth-provider-config.test.ts, model-auth.profiles.test.ts, model-catalog.test.ts, model-auth.fixtures.test-support.ts.
  • x7332, src/cron/: service.channel-requester.test.ts, service.failure-alert.test.ts, service.jobs.test.ts, service.stream-worker.test.ts, service.declarative-jobs.test.ts.
  • x7342, src/agents/: native-mcp-policy.test.ts, node-plugin-tools.test.ts, openai-responses-payload-policy.test.ts, openai-routing.test.ts, openai-transport-stream.base.test.ts.

Settlement on current main

Rebased onto b4ced6976b6, incorporating the captured-model-store single-fork repair from #174747. The old CI failure was runtime-llm.prepared-owner.test.ts:923, keeps completion ownership coherent: lru (expected 2 fork calls, received 3); its test and owner are outside this batch. This was a stale-base failure candidate, not a proven-main exception. Fresh exact-head PR CI is required.

The rebase drops all cleanup from packages/ai/src/transports/openai-completions-replay.test.ts, src/auto-reply/reply/abort.target-owner.test.ts, and src/auto-reply/reply/abort.test.ts, preserving current-main historical-tool projection, async ACP lookup, and cancellation coverage verbatim. DSML replay keeps current-main coverage and only two typed boolean simplifications. Other replayed changes remain; the earlier shard table describes the prior head and is superseded by this settlement scope. No timeout changes, skips, or weakened assertions.

Plain changed-file oxlint, oxfmt --check, and git diff --check pass. The slot had no dependencies; checks used the existing mainproof tools and a task-local link to its existing Solid lint plugin. No install, local tests, typechecks, or leases. Runtime proof is fresh PR CI.

Final CI repair

Run https://github.com/openclaw/openclaw/actions/runs/39024406741 passed all test lanes but failed check-test-types-core-3: openai-completions-dsml.recovery.test.ts lines 41 and 117 reported TS18048 because event.type is optional. This was batch-caused. Dropped the two residual simplifications, restoring the current-main predicates and leaving DSML entirely unchanged. Rebased the repaired branch onto dc4ed2f3b5ffa964794f29bc35afea26d0c8fd33; kept current main's new worker-bundle staging mock while retaining the prior complete omission of that file. Final head: 590efe8ae0a8b9a1f5c47c6687b9eeba8d3e149d. Final scope is 55 test/support files plus the baseline, +9,749/-15,926 (net -6,177), production +0/-0. This supersedes earlier scope counts and the DSML simplification note.

Changed-file plain oxlint, oxfmt --check, and git diff --check pass. The narrow repair restores current-main code exactly; prior full review remains applicable to the retained changes. No local tests or typechecks. Fresh exact-head PR CI is required; no inherited-failure exemption is claimed.

@clawsweeper

clawsweeper Bot commented Oct 16, 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 16, 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-17T10:43:32.091644Z 590efe8 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 16, 2026 23:39
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 16, 2026
@steipete
steipete disabled auto-merge October 16, 2026 23:44
@steipete
steipete force-pushed the tcr/land-d189-1792192726 branch from 1f31d13 to e556dd9 Compare October 16, 2026 23:56
@steipete
steipete enabled auto-merge (squash) October 16, 2026 23:56
@steipete
steipete disabled auto-merge October 17, 2026 00:07
@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 maintainer review before merge.

What this changes

This PR consolidates repeated test fixtures and equivalent cases across agent, transport, Gateway, cron, tooling, and UI suites.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test cleanup with no identified correctness defect; validation is incomplete at the reviewed head.
Proof confidence 🦐 gold shrimp (3/6) Maintainer-authored test consolidation changes no shipped behavior; retained fixtures cover real HTTP, subprocess, filesystem, and browser boundaries, with fresh CI providing validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixtures and equivalent test cases increase maintenance cost.
Reason: The maintainer has approved this cleanup direction, and the patch reduces repetition without changing production behavior.

Merge readiness

✅ Ready for maintainer review

Keep open this useful, maintainer-directed test consolidation. The prior baseline finding is addressed, and inspection found no new actionable defect; exact-head CI remains pending.

Priority: P3
Reviewed head: 6fc2fec00dd5b97fcd0463725765d426ccde423f

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed suites feed synthetic requests, transport responses, and lifecycle events through OpenClaw owners and assert their observable results.

flowchart LR
  A[Test scenarios] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Controlled external I O]
  D --> C
  C --> E[Contract assertions]
Loading

Technical review

Best possible solution:

Retain the focused test consolidation and land it once the existing exact-head validation gate passes.

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

This is a test-only consolidation, so there is no reported product defect to reproduce; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Sharing fixtures and tabulating equivalent cases fits the repository's test-audit direction, and the inspected consolidations retain distinct security, recovery, ordering, and lifecycle controls.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • MCP expired-session recovery keeps the original intent (3b5676d: Recover expired stateful HTTP sessions while preserving authentication and avoiding replay of potentially mutating calls.)
  • Cron scheduled tool authority keeps the original intent (3acc168: Persist explicit scheduled tool authority and distinguish empty caps, transport-only jobs, and declarative convergence.)
  • Earlier test consolidation keeps the original intent (075003f: Remove repeated cases while preserving distinct authority, lifecycle, ordering, integrity, and historical regression contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -4366, Other -17. Total -4383 across 57 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 56 6981 11347 -4366
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 17 -17
Total 57 6981 11364 -4383

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests/support +9,679/-15,839; baseline -17 The reduction is confined to verification code and obsolete exceptions; no runtime or coverage-percentage improvement is established.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • 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 intended user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-17T00:15:32.872Z sha e556dd9 :: needs changes before merge. :: [P2] Prune obsolete mock-factory baseline entries

Reviewed October 17, 2026, 6:25 AM ET / 10:25 UTC (Revision 2).

@steipete
steipete enabled auto-merge (squash) October 17, 2026 01:15
@steipete
steipete force-pushed the tcr/land-d189-1792192726 branch from 8d77224 to db87155 Compare October 17, 2026 01:23
@steipete
steipete disabled auto-merge October 17, 2026 01:29
@steipete

Copy link
Copy Markdown
Contributor Author

Auto-merge is disabled on head db87155d9b003adb6eb9e9ddf65774a8c9a64310 after the fresh rebased CI run reproduced an unresolved failure outside this diff.

  • Job: checks-node-changed-compact-large-21.
  • Test: src/plugins/runtime/runtime-llm.prepared-owner.test.ts → keeps completion ownership coherent: lru.
  • Assertion at line 923: expect(fork.mock.calls.length).toBe(forksBeforeSecond + 1); expected 2, received 3.

The batch does not modify that file or its production owner. This is not claimed as proven pre-existing: no clean-main baseline execution was performed under the CI-only compute restriction, and a matching failure on this PR is not sufficient evidence for a merge exemption. No rerun, weakened assertion, or admin override was used. The published branch and its reviewed correction are retained pending a separately verified owner fix or authorized baseline proof.

@clawsweeper clawsweeper Bot removed 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
@steipete
steipete force-pushed the tcr/land-d189-1792192726 branch from db87155 to 6fc2fec Compare October 17, 2026 10:18
@steipete
steipete enabled auto-merge (squash) October 17, 2026 10:18
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Settlement rebased onto b4ced69, incorporating the captured-model-store single-fork fix from #174747. New head: 6fc2fec00dd5b97fcd0463725765d426ccde423f. Fresh PR CI is the runtime/type proof; auto-merge is pinned to this head. Plain changed-file oxlint, oxfmt --check, and git diff --check pass.

The independent three-pass review returned five findings, all rejected after checking the actual owners: payload-policy model fields are optional; ModelAuthLabelParams fields are optional; implicit-runtime provider and the default AgentRuntimePolicyScope branch are optional; stateDir is realpath-canonicalized before pluginRoot is constructed; sandbox inspectState and fault hooks reset in afterEach before the next test. No source repair was warranted by those findings.

Rebase conflict resolution preserves current-main replay and abort tests verbatim, dropping their cleanup. DSML preserves main except two typed boolean simplifications. No assertions, skips, or timeouts were weakened. No local tests, typechecks, remote boxes, or leases were used.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete disabled auto-merge October 17, 2026 10:30
@steipete
steipete force-pushed the tcr/land-d189-1792192726 branch from 6fc2fec to 590efe8 Compare October 17, 2026 10:39
@steipete
steipete enabled auto-merge (squash) October 17, 2026 10:39
@steipete
steipete merged commit 78dd860 into main Oct 17, 2026
125 checks passed
@steipete
steipete deleted the tcr/land-d189-1792192726 branch October 17, 2026 10:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…w#174840)

* test(agents): deslop x7317 tests

* test(agents): deslop x7317 tests

* test(agents): deslop x7317 tests

* test(scripts): deslop x7324 tests

* test(scripts): deslop x7324 tests

* test(scripts): deslop x7324 tests

* test(sandbox): deslop x7322 tests

* test(sandbox): deslop x7322 tests

* test(sandbox): deslop x7322 tests

* test(ai): deslop x7326 tests

* test(ai): deslop x7326 tests

* test(auto-reply): deslop x7331 tests

* test(auto-reply): further deslop x7331 tests

* test(auto-reply): consolidate x7331 test fixtures

* test(gateway): deslop x7330 tests

* test(gateway): further deslop x7330 tests

* test(gateway): consolidate x7330 fixtures further

* test(ui): deslop x7328 tests

* test(ui): deslop x7328 tests

* test(ui): deslop x7328 tests

* test(gateway): deslop x7333 tests

* test(gateway): deslop x7333 tests

* test(gateway): deslop x7333 tests

* test(model-auth): deslop x7327 tests

* test(model-auth): deslop x7327 tests

* test(cron): deslop x7332 tests

* test(cron): further deslop x7332 tests

* test(cron): further consolidate x7332 tests

* test(agents): deslop x7342 tests

* test: preserve current fixture contracts in d189 replay

* test: preserve fixture coverage and prune stale mock exceptions

* test: retain optional DSML stream event types
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 gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant