Repository navigation
test(agents,gateway,ui): remove low-value tests (batch d189) - #174840
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1f31d13 to
e556dd9
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR consolidates repeated test fixtures and equivalent cases across agent, transport, Gateway, cron, tooling, and UI suites. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests -4366, Other -17. Total -4383 across 57 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 17, 2026, 6:25 AM ET / 10:25 UTC (Revision 2). |
8d77224 to
db87155
Compare
|
Auto-merge is disabled on head
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. |
db87155 to
6fc2fec
Compare
|
@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. |
|
🦞👀 Re-review progress:
|
6fc2fec to
590efe8
Compare
…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
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 onto1956ba00b72be3f21847b7641986db5c8cd26940, then onto58fb58883a67b3cdc74a62ad3d164619ec434531after 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:
58fb58883a67b3cdc74a62ad3d164619ec434531. Drop the worker-tunnel cleanup entirely: main replaced debug-log evidence with direct worker-operation assertions. Keepnode-worker-tunnel.test.tsand the already-omitted reasoning-replay file byte-for-byte at this new base.src/gateway/worker-environments/computer-transport.test.ts,src/agents/model-auth-availability.test.ts,src/cron/service.restart-catchup.test.ts, andsrc/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/CODEOWNERSrules.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, andui/src/e2e/new-session-page.instant-thread.e2e.test.ts. Those files retain current-main tests unchanged. An LRU assertion in the untouchedsrc/plugins/runtime/runtime-llm.prepared-owner.test.tsalso 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.tsandnode-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, plainoxlint -c .oxlintrc.json, andgit diff --check. No local Vitest, check-changed, tsgo, Testbox, or Crabbox runs. Runtime/type proof is delegated to PR CI andopenclaw/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.
Files by shard
src/agents/:agent-bundle-mcp-runtime.agent-bundle.test.ts,agent-bundle-mcp-runtime.test.ts.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.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.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.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.src/gateway/worker-environments/:bootstrap.test.ts,artifact-transfer-http.test.ts,cloud-transcript-write-admission.test.ts.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.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.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.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.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 wasruntime-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, andsrc/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.tslines 41 and 117 reported TS18048 becauseevent.typeis optional. This was batch-caused. Dropped the two residual simplifications, restoring the current-main predicates and leaving DSML entirely unchanged. Rebased the repaired branch ontodc4ed2f3b5ffa964794f29bc35afea26d0c8fd33; 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.