Repository navigation
test(agents,channels,cli): remove low-value tests (batch d173) - #164302
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: needs maintainer review before merge. Reviewed October 3, 2026, 8:43 AM ET / 12:43 UTC. ClawSweeper reviewWhat this changesThis PR removes redundant tests and consolidates fixtures and cases across agent sessions, audit, reply delivery, channels, Claw packages, and CLI commands. Merge readiness✅ Ready for maintainer review Keep open as useful, maintainer-owned test cleanup that is not already on main. No concrete blocking defect was found in the consolidations or verified merge result. Priority: P3 Review scores
Verification
How this fits togetherThese tests protect the core paths that turn agent requests and CLI commands into session updates, replies, and service operations. The batch changes their validation structure without changing production behavior. flowchart LR
A[Agent requests] --> C[Core runtime owners]
B[CLI commands] --> C
C --> D[Session and authority checks]
D --> E[Replies and service operations]
F[Consolidated test cases] --> C
E --> G[Behavior assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -2074. Total -2074 across 46 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep distinct regression contracts at their strongest test owner while consolidating repeated setup and redundant probes. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses test maintenance rather than a reported product defect; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes: local fixture reuse and table cases are a suitable approach, and the inspected consolidations retain the important cancellation, authority, recovery, and delivery assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4c0c0c0e3af9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* origin/main: fix(test): restore fixture state and await async completion (#164222) refactor(sessions): stage and settle pending inputs in workers (#164284) fix: speech-only replies fail when models include reasoning (#164285) fix(nextcloud-talk): avoid webhook migration for unconfigured channels fix: guide background skill reviews through Workshop proposals (#164292) test(build): reject AI dependencies in retained config repairs refactor(channels): require canonical private-network settings (#163535) fix(memory): migrate embedding cache in bounded batches and record oversized rows (#164303) feat(state): incognito actor memory and Codex history routing (P5c, inactive) (#164224) refactor(synology-chat): remove unused route account ID (#164280) test(ui): await web push preference publications (#164295) perf(scripts): avoid compiler projects for runtime import parsing (#164243) fix(worktrees): create workspaces from nested Windows repositories (#164249) test(agents,channels,cli): remove low-value tests (batch d173) (#164302) perf(workboard): serve cards per board revision and push changes instead of polling (#164301) refactor(sqlite): deslop sqlite stores (#164271) chore(ui): refresh control ui locales (#164299) refactor(events): deslop listener and disposal plumbing (#164221) fix: canonicalize fresh worker reasoning signatures (#164287)
…law#164302) * test(agents): deslop u0121 tests * test(agents,audit): deslop u0124 tests * test(channels): deslop u0130 tests * test(auto-reply): deslop u0128 tests * test(auto-reply): deslop u0129 tests * test(channels): deslop u0132 tests * test(auto-reply): deslop u0127 tests * test(claws): deslop u0134 tests * test(cli): deslop u0135 tests * test(cli): deslop u0136 tests
What Problem This Solves
Repeated fixtures, duplicate probes, and separately declared variants add maintenance cost to the core test suite.
User Impact
No user-visible change. This batch changes only tests across agents, audit, auto-reply, channels, claws, and CLI; production and shared test-support code are unchanged.
Why This Change Was Made
Replay ten validated campaign shards onto current main, removing redundant cases and consolidating repeated setup into tables while retaining regression, security, authority, ordering, cancellation, and recovery assertions. All ten requested commits applied in order, with their original messages. No conflicts or dropped hunks. Git automatically integrated main's corrected readiness expectations without reverting them.
The replay starts at
2288edbca9dd24e9a195b54d077964d6cebb579f. Actual batch diff: 46 test files, +3,748 / -5,822 lines (net -2,074). Production LOC: +0 / -0. Shared test-support LOC: +0 / -0. No changed paths match the current CODEOWNERS rules.Evidence
The following are original in-shard measurements, including audited files that remained unchanged. These are source campaign results, not fresh coverage measurements on this PR head. Original shard commit IDs were rewritten during campaign integration and replay. Coverage owners overlap, so coverage totals must not be summed.
Source proof qualifications: u0121 lost one covered branch in
scoped-session-access.ts(0.02% overall); other compared shards reported no per-file drops. u0136's coverage comparator excluded its sole group because of two baseline readiness failures, so its unchanged raw totals are supplemental evidence only. Its original tests finished 143 passed / 2 failed. u0134/u0135/u0136 original changed checks failed on an inherited environment budget mismatch (475 actual / 476 budget), with the other planned checks passing separately. Fresh landing validation is recorded below. All shards met the later declaration-reduction target; none met the older 50% case/LOC target, and their retention ledgers explain the preserved contracts. u0134 has more executed cases because internal variants became individually reported table rows.Changed files by shard
src/agents/tools/sessions-history-tool.anchor-budget.test.ts,src/agents/tools/sessions-list-privacy.test.ts,src/agents/tools/sessions-search-tool.matching.test.ts,src/agents/tools/sessions-send-followup.test.ts,src/agents/tools/sessions-spawn-cloud.test.ts,src/agents/tools/sessions-tool.owner.test.ts,src/agents/tools/skill-workshop-tool-library.test.ts.src/agents/worktrees/service.restore-source.test.ts,src/agents/worktrees/service.retire-snapshot.test.ts,src/audit/audit-event-writer.lifecycle.test.ts,src/audit/execution-owner-binding.test.ts.src/channels/draft-streaming-chunking.test.ts,src/channels/inbound-event/media.test.ts.src/auto-reply/reply/queue/cleanup.session-authority.test.ts,src/auto-reply/reply/reply-delivery.test.ts,src/auto-reply/reply/reply-media-paths.test.ts,src/auto-reply/reply/reply-model-levels.test.ts,src/auto-reply/reply/reply-run-registry.abort.test.ts,src/auto-reply/reply/reply-run-registry.successor-barrier.test.ts.src/auto-reply/reply/reply-tool-authority.test.ts,src/auto-reply/reply/reply-turn-admission.recovery.test.ts,src/auto-reply/reply/reply-turn-admission.rotation.test.ts,src/auto-reply/reply/restart-recovery-claim.lifecycle.test.ts,src/auto-reply/reply/route-reply.imessage.test.ts,src/auto-reply/reply/waiting-status.delivery.test.ts.src/channels/plugins/binding-routing.test.ts,src/channels/plugins/message-action-dispatch.write-authority.test.ts,src/channels/plugins/message-actions.test.ts.src/auto-reply/reply/get-reply-run-admission.session-file.test.ts,src/auto-reply/reply/mcp-channel-actions.test.ts.src/claws/migrate.test.ts,src/claws/reader.test.ts,src/claws/tool-policy-runtime.integration.test.ts,src/claws/update-apply.adopted.test.ts,src/claws/update-capability-changes.test.ts.src/cli/channel-auth.test.ts,src/cli/cli-utils.test.ts,src/cli/config-cli-path.test.ts,src/cli/config-cli-runner.supplied-intent.test.ts.src/cli/config-read-failure.test.ts,src/cli/cron-cli/cron-pagination.gateway.test.ts,src/cli/daemon-cli/diagnostic-readiness.test.ts,src/cli/daemon-cli/install.definition-repair.test.ts,src/cli/daemon-cli/lifecycle-core.output.test.ts,src/cli/daemon-cli/lifecycle-fallback.test.ts,src/cli/daemon-cli/lifecycle-readiness.test.ts.Fresh landing-head validation
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <46 changed test files>andgit diff --check: passed with no formatting changes.node_modules/.bin/oxlint -c .oxlintrc.json <changed test files>: passed before every replay commit and will run again before push.CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all 46 changed test files>: 742 tests / 46 files passed, eight Vitest projects in 114.32s. Source verification checked all 46 file hashes on landing headc5f53afb119a5ec77433a37433465d130d1c4d62. Testbox run, leasetbx_01m40tyzvkgwtwd57we8s5gb1q, stopped after success. The first attempt stopped before tests because an extra guard incorrectly compared Testbox's carrier commit with the source head; the corrected source-hash guard passed.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <46 changed paths>: passed, including all eight selected test type graphs, repository ratchets, plugin boundaries, three dead-export scans, and typed lint (zero warnings/errors). The environment-variable budget is now 475/475. Testbox run, leasetbx_01m40vpyccrynxhxvt4p0vqgmk, automatically stopped after success; command time 10m11.9s. A subsequent portal-sync warning did not affect the successful command result.openclaw/ci-gategates auto-merge.