Repository navigation
test(agents,gateway,browser,scripts): remove low-value tests (batch d207) - #165177
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: blocked before merge. Reviewed October 4, 2026, 8:26 PM ET / October 5, 2026, 00:26 UTC (Revision 2). ClawSweeper reviewWhat this changesRemoves redundant tests and consolidates retained computer-tool, configuration-reload, and subagent-completion checks into existing suites. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this remains useful, maintainer-sponsored test cleanup. No actionable correctness or security finding was established, and the verified test merge resolves the previous conflict blocker. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's test suites exercise agent tools, browser control, reply processing, Gateway behavior, and release tooling. CI selects these suites to detect regressions before changes land. flowchart LR
A[Production contracts] --> C[Owner test suites]
B[Test fixtures] --> C
C --> D[CI test selection]
D --> E[Test execution]
E --> F[Regression results]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep distinct regression checks in their existing owner suites while removing duplicate cases, mock-authored behavior, and retired test registrations. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR prunes and consolidates tests rather than reporting a product defect; no introduced failing behavior was established. Is this the best way to solve the issue? Yes: consolidating retained checks under existing suites fits the repository's test-ownership guidance, and the inspected changes do not introduce a competing production implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 76922aba447e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
132dfd2 to
32c7166
Compare
…207) (openclaw#165177) * test(agents): deslop x0006 tests * test(scripts): deslop x0002 tests * test(browser): deslop w0015 tests * test(agents): deslop w0004 tests * test(scripts): deslop x0003 tests * test(auto-reply): deslop x0004 tests * test(scripts): deslop x0005 tests * test(gateway): deslop w0012 tests * test(subagents): deslop w0014 tests * test(gateway): deslop w0017 tests
…, batch 1) Gate 2.7 MIXED-CLOBBER dispositions at the lane base (19fe879 vs dab29d6) found fork hunks that carry older upstream code with no continuation reason. This batch restores them; continuation behavior is unchanged. - subagent-spawn failure path (upstream 7555e3f, openclaw#158251): the fork's subagent-spawn-failure-hooks.ts was a copy of the inline subagent_ended block upstream replaced with spawnLifecycle.failed(), and it ran before termination. cleanupAcceptedSubagentSpawnFailure now takes resolveLifecycleHooks and resolves it after termination and context rollback, right before session cleanup (upstream's order); the spawn passes spawnLifecycle.failed. The helper also re-reads ownership after the termination await for the dispose/rollback choice and the attachment gate, as upstream does; it used a snapshot taken before termination. Regression: subagent-spawn-rollback.test.ts "after termination" (2 cases) RED on the pre-fix helper (rollback + attachment cleanup after ownership moved; hooks resolved before termination), GREEN now. The D-R1(a) contract (pending text, unscheduled throw) and its 3 cases are unchanged. - tool-display.test.ts: back to upstream's file; the fork-only tool-display-truncation.test.ts duplicated its compactRawCommand block and kept a case upstream retired in openclaw#165177. - sessions-spawn-cloud.ts: terminateRun is Promise<void> again (the only caller returns void); the widened type served a retired termination design. - cron failure-alert / startup-run-repair / timer-execution script-wake tests import startHeartbeatRunner from the scheduler like upstream (they inject runOnce; production uses the scheduler). Kept, with reasons (recorded in the lane's dispositions): - capability-provider-runtime.ts "// SAFETY:" comment: restoring upstream's bare cast would grow the assertion-safety baseline 7 -> 8, which the ratchet forbids. - subagent-spawn-collector.ts post-cleanup ownership re-check removal: 🌊's ruling in 86057ef. Receipts: tsgo core 0; src/agents/subagents/spawn/ (34 files) + sessions-spawn-hooks + sessions-spawn-cloud: 36 files, 414 tests green. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, batch 2) Restores the remaining small Gate 2.7 drops from the lane-base review; continuation behavior is unchanged. Taken from upstream verbatim (the fork hunks had no continuation content): host-tool-factory.ts (public test-contract helper; its re-entry guard can no longer fire), codex side-question.test-support.ts, doctor-health.migration-refusal.test.ts, board-notices.ts (no Raw alias), channel-ingress-gateway-restart fixture (parent test owns the timeout). Ported into fork forms: - session-event-wake.types.ts: HeartbeatWakeRequest/HeartbeatRunResult instead of the aliases upstream deleted in openclaw#167666; upstream's base-tick comment back above the slot-group loop. - session-delivery-queue-codec.ts: SessionDeliveryContext = Pick<DeliveryContext, ...> (openclaw#165916); recovery imports split as upstream. - subagent-announce.format nested-matrix helper: upstream's consolidated block (openclaw#166052) verbatim; the fork copy still ran 4 tests upstream retired in openclaw#165177. - runAgentAttempt is synchronous again (its only caller awaits it), with upstream's sync-throw assertion. - prepared-compaction-runtime: upstream's bootstrap-disclosure comment; dropped tool options duplicated from the conversationContext spread (senderIsOwner and disableContinuationTools stay). - agent-runner-result-accounting.test: one provenance it.each at module scope, stale visibleToolErrorObserved (openclaw#126542) dropped. - small: subagent-registry arrow form, STALE_UNENDED_SUBAGENT_RUN_MS not exported, dead loadConfig mock keys, upstream comments/imports in agent.ts schema, media-only/session/timeout/followup-status/storage tests. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
The test suite carries duplicate behavior cases, implementation-mirroring probes, and repeated fixtures across agent tools, browser, auto-reply, Gateway, and release tooling.
User Impact
No user-visible behavior or production code changes. This maintainer-requested batch removes low-value tests while retaining distinct output, security, lifecycle, and historical regression checks.
Why This Change Was Made
Replays ten already-audited campaign shards onto current main. Useful computer-tool, config-reload, and completion-capture cases move into their existing owner suites; redundant cases and retired routing entries are deleted. The mock-export baseline only shrinks by one obsolete entry.
All ten commits applied; none skipped. The initial replay conflict in test/scripts/release-plan-producer.test.ts was resolved by deleting the same source-rewriting child-SHA probe after main moved its target from scripts/release-plan-producer-core.mts to scripts/lib/release-plan-source.mts. The test's assertions were otherwise unchanged. Main's surrounding additions remain intact. A later conflict rebase preserves main's new release-candidate upgradeBaseline assertions by dropping the deletion of the canonicalization test (19 lines from the original deletion). Its new retained-v2 request/manifest regression is also preserved; only the unchanged digest-variant table is removed. The historical image-display deletion is retained after main changed its assertion from emoji plus title to title only; newer Tool Search/icon work remains intact.
Production LOC: +0/-0. Tests and test support: +1,450/-6,202, net -4,752; baseline: +0/-1. Total: 90 files, +1,450/-6,203, net -4,753. No touched path matches the current CODEOWNERS rules.
Evidence
Review follow-up: the prior-head ClawSweeper review identified no actionable correctness or security finding. Its merge-conflict item is addressed by the rebase and fresh validation. The config/data-compatibility prompts came from an incomplete pull-file inventory (unknown-truncated-pull-files); the complete 90-file Git inventory changes no config defaults, production implementation, persistent schema, or migration contract. The only config-directory change removes an obsolete test mock-export exception. Those compatibility prompts do not apply.
The figures below are the original in-shard before/after coverage measurements, not a fresh coverage run against current main. Every shard remained below the 1% covered-statement/branch loss budget. The original shards removed 235 declarations in total; the final replay retains one additional canonicalization declaration from newer main (234 removed). Distinct retained contracts prevented the campaign's aspirational 30% reduction, and no cases were folded merely to meet it.
The w0004 shard LOC excludes two additional retired-path lines removed from test/vitest-unit-fast-config.test.ts. The w0014 original changed-file check was incomplete because its Testbox was cancelled and the retry timed out queued; its 296 focused tests and coverage passed. The current batch explicitly includes the stronger active-wake sibling subagent-announce-delivery.runtime.test.ts and server-plugin-reload.recovery.test.ts in focused validation.
Files touched by shard
x0006
src/agents/tool-display-common.test.ts,src/agents/tool-display.test.ts,src/agents/tool-fs-policy.test.ts,src/agents/tool-mutation.test.ts,src/agents/tool-policy-pipeline.test.ts,src/agents/tool-policy.plugin-only-allowlist.test.ts,src/agents/tool-policy.test.ts,src/agents/tool-result-error.test.ts,src/agents/tool-schema-hints.test.ts,src/agents/tool-schema-projection.test.ts,src/agents/tool-search-ranking.test.ts,src/agents/tool-search-runtime.test.ts.x0002
test/scripts/ensure-playwright-chromium.test.ts,test/scripts/frv.test.ts,test/scripts/full-release-artifact-contract.test.ts,test/scripts/full-release-candidate-contract.test.ts,test/scripts/full-release-candidate-reuse.test.ts,test/scripts/full-release-validation-state.test.ts,test/scripts/generate-dependency-release-evidence.test.ts,test/scripts/generate-npm-package-lock.test.ts,test/scripts/install-cli.test.ts.w0015
extensions/browser/src/browser/chrome.default-browser.test.ts,extensions/browser/src/browser/chrome.internal.test.ts,extensions/browser/src/browser/chrome.test.ts,extensions/browser/src/browser/server-context.list-profiles.test.ts,extensions/browser/src/browser/server-context.remote-profile-tab-ops.fallback.test.ts,extensions/browser/src/browser/server-context.tab-selection-state.test.ts.w0004
src/agents/tools/computer-tool.context.test.ts,src/agents/tools/computer-tool.gateway.test.ts,src/agents/tools/computer-tool.node-resolution.test.ts,src/agents/tools/computer-tool.schema.test.ts,src/agents/tools/computer-tool.test.ts,src/agents/tools/computer-tool.v2.test.ts,src/agents/tools/cron-tool.flat-params.test.ts,src/agents/tools/cron-tool.schema.test.ts,src/agents/tools/image-tool.test.ts,test/vitest-unit-fast-config.test.ts.x0003
test/scripts/check-no-random-messaging-tmp.test.ts,test/scripts/check-openclaw-package-tarball.test.ts,test/scripts/check-runtime-sidecar-loaders.test.ts,test/scripts/check-session-accessor-boundary.test.ts,test/scripts/ci-changed-node-test-plan.test.ts,test/scripts/ci-node-test-plan.test.ts,test/scripts/ci-platform-checkout.test.ts,test/scripts/ci-workflow-planning.test.ts.x0004
config/test-mock-exports-baseline.txt,src/auto-reply/command-control.test.ts,src/auto-reply/command-turn-context.test.ts,src/auto-reply/commands-registry.test.ts,src/auto-reply/envelope.test.ts,src/auto-reply/fallback-state.test.ts,src/auto-reply/heartbeat-filter.test.ts,src/auto-reply/heartbeat.test.ts,src/auto-reply/inbound.test.ts,src/auto-reply/media-note.test.ts,src/auto-reply/model.test.ts,src/auto-reply/reply.directive.parse.test.ts,src/auto-reply/reply.triggers.trigger-handling.e2e.test.ts,src/auto-reply/reply.triggers.trigger-handling.stages-inbound-media-into-sandbox-workspace.test.ts.x0005
test/scripts/real-behavior-proof-policy.test.ts,test/scripts/release-ci-summary.test.ts,test/scripts/release-no-push-workflow.test.ts,test/scripts/release-notes-ledger.test.ts,test/scripts/release-plan-contract.test.ts,test/scripts/release-plan-producer.test.ts,test/scripts/release-preflight.test.ts,test/scripts/release-publish-gates.test.ts,test/scripts/release-scenarios-assertions.test.ts.w0012
src/gateway/config-reload.decisions.test.ts,src/gateway/config-reload.plugin-drain.test.ts,src/gateway/config-reload.plugin-observation.test.ts,src/gateway/config-reload.portals.test.ts,src/gateway/config-reload.slack-plugin-approval.test.ts,src/gateway/config-reload.telegram-policy.test.ts,src/gateway/config-reload.test.ts,src/gateway/sessions-patch.snooze.test.ts,src/gateway/sessions-patch.test.ts,test/vitest/vitest.gateway-server-paths.mjs.w0014
src/agents/subagents/announce/subagent-announce-delivery.test.ts,src/agents/subagents/announce/subagent-announce-private-completion.test-fixtures.ts,src/agents/subagents/announce/subagent-announce.capture-completion-reply.test.ts,src/agents/subagents/announce/subagent-announce.format.e2e.test.ts,src/agents/subagents/announce/subagent-announce.requester-settle-dispatch.test.ts,src/agents/subagents/announce/subagent-announce.requester-settle-pause.test.ts,src/agents/subagents/announce/subagent-announce.requester-settle-results.test.ts,src/agents/subagents/announce/subagent-announce.test.ts,src/agents/subagents/announce/subagent-announce.timeout.test.ts.w0017
src/gateway/server.chat.gateway-server-chat-b.test.ts,src/gateway/server.chat.gateway-server-chat.test.ts,src/gateway/server.config-patch.test.ts.