Skip to content

test(acp,agents,config,gateway,ui,whatsapp): remove low-value tests (batch d073) - #170368

Merged
steipete merged 12 commits into
mainfrom
tcr/land-d073-1791845033
Oct 12, 2026
Merged

steipete merged 12 commits into
mainfrom
tcr/land-d073-1791845033

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This test-cleanup batch removes duplicate input variants, implementation/wiring replays, and redundant lifecycle cases across ACP, subagent announcement, configuration, migration, Gateway Talk/HTTP, WhatsApp, and Activity UI tests. Distinct regression, authorization, ordering, and data-preservation contracts remain in the retained suites. It does not change runtime behavior.

All ten source commits initially replayed in order onto main 0975d245565 without conflicts or skipped hunks. After publication, advancing main required one rebase onto 0d1e09b7913. One conflict in native-consult-target.test.ts retained the batch's deletion of the redundant native-consultation matrix; main had only added an await inside that deleted matrix. Main's async authorization and cleanup changes in the retained tests were preserved, as was its subsequent transcript-publication lifetime fix. No commits were skipped. The max-lines baseline change only removes the now-below-limit migrate-hermes config test entry. No CODEOWNERS-owned paths are changed.

Impact and shard evidence

Final diff: production +0/-0; tests +332/-5641; test support +7/-7; baseline +0/-1 (57 files, net -5,310 lines). Coverage and LOC/declaration counts below are the original in-shard before/after evidence, before the preservation restorations described below; they are not a claim that coverage was rerun against this rebased batch. All shard statement/branch losses are within 1%.

Shard Test LOC before → after Declarations before → after In-shard coverage totals
x1398 2,569 → 1,835 80 → 49 covered statements 497 -> 497 (0); branches 353 -> 351 (-2); functions 96 -> 96 (0)
x1394 2,616 → 1,976 84 → 58 covered statements 1710 -> 1710 (0); branches 866 -> 866 (0); functions 288 -> 288 (0)
x1401 1,168 → 847 77 → 42 covered statements 1348 -> 1348 (0); branches 621 -> 619 (-2); functions 207 -> 207 (0)
x1396 2,695 → 2,036 82 → 57 covered statements 6294 -> 6282 (-12, -0.19%); branches 4037 -> 4019 (-18, -0.45%); functions 1329 -> 1326 (-3)
x1395 2,945 → 2,679 72 → 61 covered statements 4497 -> 4497 (0); branches 2844 -> 2844 (0); functions 1029 -> 1029 (0)
x1402 2,146 → 1,516 72 → 43 covered statements 744 -> 744 (0); branches 559 -> 559 (0); functions 158 -> 158 (0)
x1399 4,710 → 4,139 78 → 64 covered statements 6836 -> 6836 (0); branches 4592 -> 4592 (0); functions 1253 -> 1253 (0)
x1406 3,469 → 3,209 73 → 61 covered statements 6821 -> 6824 (3); branches 4034 -> 4031 (-3); functions 1358 -> 1360 (2)
x1403 3,450 → 2,687 75 → 49 covered statements 984 -> 984 (0); branches 788 -> 787 (-1); functions 201 -> 201 (0)
x1405 3,373 → 2,854 74 → 58 covered statements 1149 -> 1149 (0); branches 1128 -> 1128 (0); functions 198 -> 198 (0)

Files and retained contracts

  • x1398 (src/acp/): approval-classifier.test.ts, client.test.ts, event-ledger.test.ts, persistent-bindings.lifecycle.test.ts, persistent-bindings.test.ts, policy.test.ts, server.startup.test.ts. Retains protocol/version and byte-accounting regressions, secret isolation, execution-title sanitization, TLS forwarding, startup/teardown ordering, and concurrent appends.
  • x1394 (src/agents/subagents/announce/): subagent-announce-dispatch.test.ts, subagent-announce-output.test.ts, subagent-announce-result.test.ts, subagent-announce.requester-settle-wake.test.ts. Retains forced-direct/ambiguous-delivery regressions, terminal progress/reply behavior, ownership loss, recovery and delayed-read ordering.
  • x1401 (src/config/): types.secrets.test.ts, version.test.ts, web-search-codex-config.test.ts, write-lock.drainage.test.ts, zod-schema.agent-defaults.test.ts, zod-schema.agents.test.ts, zod-schema.cloud-workers.test.ts, zod-schema.core.test.ts. Retains reconciliation/drainage, authority revalidation, sandbox opt-in and credential-path validation.
  • x1396 (src/config/sessions/): transcript-stream.test.ts, transcript-tree.test.ts, transcript.test.ts. Retains redaction, ownership races, snapshot consistency, and custom-store discovery (restored during the shard's coverage review).
  • x1395 (ui/src/pages/activity/): activity-page.test.ts, current-work.test.ts, route.test.ts, session-activity-summaries.test.ts, session-activity.test.ts, tool-activity.test.ts, view.test.ts. Retains clock/surrogate/heap regressions, Gateway replacement, read-only access, queued write revocation and event ordering. No visual behavior changes.
  • x1402 (extensions/whatsapp/src/auto-reply/): deliver-reply.test.ts, monitor-state.test.ts, web-auto-reply-monitor.test.ts, web-auto-reply-utils.test.ts. Retains privacy, reconnect ordering, terminal-reset, self-chat, authorization, mention and UTF-16 regressions.
  • x1399 (src/gateway/talk/handlers/): client-native-actions.test.ts, client-native-control.test.ts, client.test.ts, native-consult-target.test.ts, target.test.ts, voice.test.ts, plus native-consult-control.test-support.ts. Retains distinct authority boundaries, lifecycle interleavings and readiness regression. The original support matrix shrank from 14 to 8 cases; preservation review restores the three same-session replacement cases, leaving 11.
  • x1406 (src/gateway/): watch-node-http.test.ts, worker-workspace-recovery-binding.test.ts, worker-workspace-recovery-transcript.test.ts, workspace-icon-http.test.ts, ws-log.test.ts. Retains writer/session replacement, rebound ordering, icon security/size/symlink boundaries and broader-operator voice setup. The shard's unchanged worktree-maintenance.test.ts contributed to coverage totals.
  • x1403 (extensions/whatsapp/src/auto-reply/monitor/): group-gating.allowlist-warn.test.ts, inbound-dispatch.message-sent.test.ts, inbound-dispatch.test.ts, inbound-helpers.test.ts, on-message.acp-bindings.test.ts, on-message.audio-preflight.test.ts, reactions.test.ts. Retains native-ID, echo-transcript and partial-receipt regressions, ACP readiness after admission, and cancellation before delivery.
  • x1405 (extensions/migrate-hermes/): config.test.ts, files-and-skills.test.ts, model.plan.test.ts, secrets.test.ts; shrink-only config/max-lines-baseline.txt. Retains prototype-key/borrowed-credential rejection, late copy targets and committed WAL preservation.

Coverage limitations from the shard reports: ACP ledger worker internals were not directly observed by casecov; web-search used source review plus aggregate coverage after transformed-source comparison failed; transcript persistence used aggregate coverage plus review because casecov had function-only counters; two core Gateway files used source inspection because casecov did not support nested projects. The x1395/x1399/x1406/x1405 declaration reductions stopped below the campaign target to preserve distinct contracts.

Preservation review

Four findings accepted and restored before publication: the Watch HTTP external-reapproval generation test, inbound exact-account-over-wildcard precedence, all three blocked prototype-chain keys, and same-session replaced-run control across browser RPC, browser provider and relay. This restores seven executed cases and two declarations relative to the original shard reports.

Three findings rejected after checking the owner and remaining proof:

  • Malformed legacy transcript-file metadata: appendExactAssistantMessageWithSource constructs its SQLite target from canonical agent/session/store identity and never consumes entry.sessionFile; stale/outside JSONL context tests remain. The deleted case is not a live filesystem-write boundary.
  • ACP message mutation: the shared mutation owner's tool-mutation.test.ts retains message send/action classification; the retained ACP computer mutation test exercises the same classifier branch and verifies autoApprove: false.
  • Ledger retention completeness: event-ledger.prepared.test.ts retains the current-caps/gapped-sequences test with maxEventsPerSession: 2, asserts incomplete replay, and independently retains byte-budget eviction coverage.

The second independent review confirmed the four restorations and those three dispositions, finding no additional P0–P2 defect. Its only remaining findings were that the fixes were not yet staged; all four are now staged identically to the reviewed working-tree versions.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <56 changed TS files>: passed; no additional diff.
  • node_modules/.bin/oxlint -c .oxlintrc.json <56 changed TS files>: exit 0.
  • git diff --check 0d1e09b7913: passed. The immutable batch base is used for selectors because the shared remote-tracking ref advances during other landings.
  • Initial pnpm test <touched files> --maxWorkers=1: all 55 touched test files exercised across their owner configs; 672 unique cases passed, one unchanged case failed identically on the clean original baseline described below. The runner stops subsequent configs after a failed config, so remaining files were explicitly run separately without changing test definitions.
  • Local command wall times: initial 55-file selection 504.17s (212 passed, one baseline failure); review-fix/remaining selection 334.52s (63 passed, the same baseline failure); final 39-file selection 346.33s (455 passed). Counts across invocations overlap; the unique total above accounts for overlap. Baseline diagnostic: 122.63s including cold compilation. No broad local lint/typecheck gate was run; hosted CI owns broad validation.
  • After the conflict rebase, pnpm test src/gateway/talk/handlers/{client-native-actions,client-native-control,client,native-consult-target,target,voice}.test.ts --maxWorkers=1: 111/111 passed, 551.43s wall time. This covers all six overlapping Talk files and the upstream baseline repair. Other unchanged batch inputs reuse the earlier focused proof; CI provides broad proof on the rebased head. Frozen-lockfile install, 56-file oxfmt check, plain oxlint (exit 0), and diff-check passed again.
  • Hosted type-aware lint found one unused default after table reduction: the retained Current Work row always provides isDock. Removed only the unreachable = false destructuring default; all 13 Current Work tests passed in the focused 20.64s run (9.14s Vitest duration). No behavior or assertion changed. The PR context gate also required these exact template section headings; the evidence content was retained.
  • A fresh independent review of the one-line lint repair returned scoped-clean. The previous CI attempt also had an unrelated hover-marquee.browser.test.ts reconnect assertion failure; it is recorded, not claimed fixed or used as a waiver. The fresh head must pass hosted checks.
  • One selector invocation was stopped during prerequisite build, before test execution, after a concurrently advanced remote-tracking ref included unrelated main files; the corrected invocation uses the immutable base above.
  • Hosted openclaw/ci-gate is the broad merge gate. No Testbox/Crabbox was allocated for this landing.
  • Independent preservation review completed before publication, including a second pass over the restored protections.

The initial local baseline failure was client-native-actions.test.ts / keeps native generated input in current-turn custody but out of display and future calls, aborting during AsyncWorkScope.beginClose → drain → gateway-work-admission.ts. It failed on the candidate (12.114s) and identically on a clean detached checkout of the exact main base 0975d245565 (11.075s). Baseline command: pnpm test src/gateway/talk/handlers/client-native-actions.test.ts --maxWorkers=1 -t 'keeps native generated input in current-turn custody but out of display and future calls'. Main fixed this independently in a55e956fe36 (#170359): committed publications leave the producer's async work scope. That fix is preserved by the rebase, and the previously failing test now passes. No timeout, assertion, retry or skip was added. No hosted red-check waiver is requested.

Historical shard check failures in unrelated dead exports are reported in the source evidence only; they are not claimed as current-head failures or used as a merge exemption.

@clawsweeper

clawsweeper Bot commented Oct 12, 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 12, 2026 23:05
@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling plugin: migrate-hermes size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR removes and consolidates tests across ACP, agents, configuration, Gateway, WhatsApp, migration, and Activity UI.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with two confirmed losses of independent coverage; live-product proof is not applicable.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only cleanup changes no shipped behavior; the body records focused suite validation and coverage limitations.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Redundant tests increase maintenance and validation cost without adding independent protection.
Reason: The maintainer-authored direction is established, and focused consolidation is valuable when distinct regression and configuration contracts survive.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this PR open: the cleanup is useful, but both previously reported losses of independent regression coverage remain unresolved.

Priority: P3
Reviewed head: 1beccc05b3b17024e89f988e499bbdd293e63540

Before merge

  • Retain a self-authored automatic-reaction regression (P2) - This removes the acknowledgement send/removal case with platform.fromMe:true, and the status set/clear counterpart is also deleted. All retained real automatic-reaction cases use false; neighboring handler suites mock these owners. Hardcoding reaction-eligibility.ts back to fromMe:false would therefore escape retained coverage and recreate the silent linked-device addressing failure reported at [Bug]: WhatsApp ack reaction silently never renders when the bot is a linked device of the operator's own account (hardcoded fromMe: false) #117672. Preserve one compact send/removal case through the shared eligibility owner while keeping the false control; duplicate adapter replays are unnecessary. This previously reported finding remains unresolved.
  • Preserve the suspend duration boundary cases (P2) - Replacing acceptance of 1m and rejection of 59s and unitless 60000 with only -1m removes independent configuration contracts. The retained input is rejected as malformed, so removing the schema's minimum-duration check or explicit-unit requirement would no longer fail this suite. Worker lifecycle tests consume constructed configuration and do not exercise schema admission. Retain a compact table accepting 1m and rejecting 59s and 60000, consistent with https://docs.openclaw.ai/gateway/config-cloud-workers. This previously reported finding remains unresolved.
  • Explain or restore the original intent of WhatsApp self-authored reaction coverage - 7492262: The original fix deliberately added true-direction send/removal and set/clear coverage for silent linked-device reaction failures; the batch provides no replacement for that contract.
  • Explain or restore the original intent of Cloud-worker suspend duration coverage - d2d055b: The feature established explicit duration syntax and a one-minute minimum; malformed negative input does not preserve either boundary.

Findings

  • [P2] Retain a self-authored automatic-reaction regression — extensions/whatsapp/src/auto-reply/monitor/reactions.test.ts:182-183
  • [P2] Preserve the suspend duration boundary cases — src/config/zod-schema.cloud-workers.test.ts:30-31

Provenance

  • WhatsApp self-authored reaction coverage changes intended behavior without addressing why it exists (7492262: The original fix deliberately added true-direction send/removal and set/clear coverage for silent linked-device reaction failures; the batch provides no replacement for that contract.)
  • Cloud-worker suspend duration coverage changes intended behavior without addressing why it exists (d2d055b: The feature established explicit duration syntax and a one-minute minimum; malformed negative input does not preserve either boundary.)
Agent review details

How this fits together

Vitest suites feed fixtures through OpenClaw production owners and assert configuration, persistence, lifecycle, transport, and UI contracts.

flowchart LR
A[Test fixtures] --> B[Vitest suites]
B --> C[Production owners]
C --> D[Observed results]
D --> E[Contract assertions]
E --> F[CI gate]
Loading

Technical review

Best possible solution:

Keep the consolidation while restoring compact coverage for self-authored reaction addressing and cloud-worker duration admission.

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

The pinned diff and retained suites establish both coverage losses; no runtime failure or test execution was reproduced during this read-only review.

Is this the best way to solve the issue?

Consolidation is appropriate where stronger owner coverage remains, but foreign-authored reactions and malformed durations do not replace the removed independent cases.

Full review comments:

  • [P2] Retain a self-authored automatic-reaction regression — extensions/whatsapp/src/auto-reply/monitor/reactions.test.ts:182-183
    This removes the acknowledgement send/removal case with platform.fromMe:true, and the status set/clear counterpart is also deleted. All retained real automatic-reaction cases use false; neighboring handler suites mock these owners. Hardcoding reaction-eligibility.ts back to fromMe:false would therefore escape retained coverage and recreate the silent linked-device addressing failure reported at [Bug]: WhatsApp ack reaction silently never renders when the bot is a linked device of the operator's own account (hardcoded fromMe: false) #117672. Preserve one compact send/removal case through the shared eligibility owner while keeping the false control; duplicate adapter replays are unnecessary. This previously reported finding remains unresolved.
    Confidence: 0.99
  • [P2] Preserve the suspend duration boundary cases — src/config/zod-schema.cloud-workers.test.ts:30-31
    Replacing acceptance of 1m and rejection of 59s and unitless 60000 with only -1m removes independent configuration contracts. The retained input is rejected as malformed, so removing the schema's minimum-duration check or explicit-unit requirement would no longer fail this suite. Worker lifecycle tests consume constructed configuration and do not exercise schema admission. Retain a compact table accepting 1m and rejecting 59s and 60000, consistent with https://docs.openclaw.ai/gateway/config-cloud-workers. This previously reported finding remains unresolved.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • ACP configured-option consolidation keeps the original intent (8d8736d: Configured thinking must survive reuse and rejected changes without replacing the conversation; retained manager/lifecycle coverage exercises these outcomes.)
  • Transcript legacy-file cleanup keeps the original intent (0a8e360: SQLite became the canonical transcript store, supporting removal of legacy-file assertions that no longer exercise the runtime write boundary.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test extensions/whatsapp/src/auto-reply/monitor/reactions.test.ts --maxWorkers=1
  • pnpm test src/config/zod-schema.cloud-workers.test.ts --maxWorkers=1
  • pnpm exec oxlint -c .oxlintrc.json extensions/whatsapp/src/auto-reply/monitor/reactions.test.ts src/config/zod-schema.cloud-workers.test.ts
  • pnpm exec oxfmt --check extensions/whatsapp/src/auto-reply/monitor/reactions.test.ts src/config/zod-schema.cloud-workers.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 58b1860 adds src/config/zod-schema.cloud-workers.test.ts:32 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 58b18602329e; files: src/config/zod-schema.cloud-workers.test.ts)
  • LiLan0125: Raw commit 86bd524 adds extensions/whatsapp/src/auto-reply/monitor/ack-reaction.test.ts:216 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 86bd524a75d6; files: extensions/whatsapp/src/auto-reply/monitor/ack-reaction.test.ts)
  • Vincent Koc: Raw commit dfadf03 adds src/acp/persistent-bindings.lifecycle.test.ts:132 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: dfadf03e1f50; files: src/acp/persistent-bindings.lifecycle.test.ts)

PR surface

Tests -5309, Other -1. Total -5310 across 57 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 56 339 5648 -5309
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 57 339 5649 -5310

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests +332/-5641; test support +7/-7 The reduction fits test maintenance, but deletion volume does not establish preservation of independent contracts.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is test maintenance with no runtime changes; the findings concern lost regression protection.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-12T23:11:48.396Z sha 8bf72cff632aa83b2129bd7e76c236ec77db3eed :: needs changes before merge. :: [P2] Retain a self-authored automatic-reaction regression | [P2] Preserve the suspend duration boundary cases

Reviewed October 12, 2026, 7:33 PM ET / 23:33 UTC (Revision 2).

@steipete
steipete force-pushed the tcr/land-d073-1791845033 branch from 8bf72cf to 8131761 Compare October 12, 2026 23:15
@steipete
steipete disabled auto-merge October 12, 2026 23:22
@steipete
steipete enabled auto-merge (squash) October 12, 2026 23:26
@steipete
steipete merged commit 594f847 into main Oct 12, 2026
121 checks passed
@steipete
steipete deleted the tcr/land-d073-1791845033 branch October 12, 2026 23:34
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…batch d073) (openclaw#170368)

* test(acp): deslop x1398 tests

* test(agents): deslop x1394 tests

* test(config): deslop x1401 tests

* test(config): deslop x1396 tests

* test(ui): deslop x1395 tests

* test(whatsapp): deslop x1402 tests

* test(gateway): deslop x1399 tests

* test(gateway): deslop x1406 tests

* test(whatsapp): deslop x1403 tests

* test(config): deslop x1405 tests

* test: retain independent security and ownership coverage

* test(ui): remove unreachable table default
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: whatsapp-web Channel integration: whatsapp-web gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: migrate-hermes 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