Skip to content

test(suites): remove low-value tests (batch d357) - #178991

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d357-1792553124
Oct 21, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d357-1792553124

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated fixture construction and assertion scaffolding make these test suites harder to maintain.

User Impact

No user-visible behavior or production code changes. This is the requested d357 test-cleanup batch; distinct security, lifecycle, cancellation, and persistence checks are retained.

Why This Change Was Made

Replay the 30 supplied commits onto pinned main c622b70b2b4cc8fe4e57d34f6667913bb99addd2, consolidating equivalent setup and table-driven checks across 13 shards. The final diff is 91 test/support files: +4769/-7611, net -2842 lines. Production LOC: +0/-0. Test/support LOC: 14076 → 11234.

Replay decisions

All 30 supplied commits applied; no whole commits skipped. Two follow-up commits restore explicit database-path close/reopen assertions and repair CI-reported fixture typing, call contracts, and redundant awaits.

  • Windows cron: retained main's script payload and explanatory comment (receipt ownership without waiting for reminder adoption), while applying the single-test wrapper cleanup.

  • LINE doctor, both commits: retained main's explicit open, empty, and whitespace policy cases with the parent allowlist; adapted them to the compact context helper. Kept the additional regression table when the follow-up would otherwise remove it.

  • Zalo: dropped the conflicting actions.test.ts and send.test.ts hunks entirely; both files remain identical to pinned main, preserving its rewritten account, UTF-16, and handoff checks.

  • LAN host: retained the Unicode Windows interface and all platform scenarios in the consolidated table.

  • Approval view model: retained both metadata variants and both missing/ambiguous-owner cases; removed only the duplicate fixture constant. Dropped the conflicting follow-up hunk rather than replace newer regression cases.

  • Abort signal: dropped the conflicting follow-up hunk entirely; main's newer error/cancellation regressions remain unchanged.

  • Dropped the gateway allowlist fixture rewrite after CI identified a newly introduced wall-clock timeout helper; the file remains exactly as on pinned main.

  • Dropped the small shared cron timer-helper cleanup; the helper remains exactly as on pinned main while the separate heartbeat timeout is investigated.

No baseline, production API, dependency, workflow, or CODEOWNERS changes. None of the changed paths match the current CODEOWNERS rules.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.

  • node_modules/.bin/oxfmt --write <91 changed TS files>: passed; clean worktree afterward.

  • node_modules/.bin/oxlint -c .oxlintrc.json <91 changed TS files>: exit 0.

  • git diff --check c622b70b2b4cc8fe4e57d34f6667913bb99addd2: passed.

  • Per operator CI-only instruction: no local Vitest, check-changed, tsgo, coverage, or Testbox runs. Hosted openclaw/ci-gate is the runtime/type proof gate; independent review runs during CI.

  • Independent full-batch review: accepted the lost explicit-close/reopen coverage finding and restored all four assertions/operations. Rejected two reports against source: validReview() already returns NEEDS WORK; common.sh sources host-tools.sh, which supplies the pr_git override wrapper. The restoration and final ten-file repair delta both passed independent P0–P2 review.

  • The supplied shard reports explicitly say coverage was not run under CI-only mode; there is no numeric coverage totals line to quote. No measured coverage or runtime improvement is claimed.

  • Initial CI run 39539230576 identified fixture type inference/optional access/tuple spread issues, a Bun absent-property assertion, two typed-lint issues, and the new timeout-helper ratchet. Those are repaired or dropped. No local tests were run. The second run 39540531491 cleared the earlier failures except two await-thenable errors in the synchronous ingress-context fixture calls; both awaits are now removed, and that repair passed independent review. File-length annotations were incidental warnings, not the lint failure cause. No inherited-failure exception or CI rerun was used; fresh-head CI provides final proof.

Per-shard replay metrics

LOC includes test-support files. Declaration counts are static it/test call sites, not expanded cases; consolidating cases into tables reduces declarations without implying case deletion. Counts are computed from pinned main to this PR, not copied from earlier shard-report revisions.

Shard Files Test/support LOC Declarations Diff + / - Reported coverage
z0615 8 1204 → 936 22 → 20 +253 / -521 Not run (CI-only)
z0617 8 1202 → 1049 13 → 11 +552 / -705 Not run (CI-only)
z0618 6 887 → 783 2 → 2 +211 / -315 Not run (CI-only)
z0619 7 1008 → 730 32 → 27 +386 / -664 Not run (CI-only)
z0620 4 1197 → 894 19 → 18 +376 / -679 Not run (CI-only)
z0621 9 1198 → 889 46 → 39 +370 / -679 Not run (CI-only)
z0622 8 1194 → 920 33 → 30 +473 / -747 Not run (CI-only)
z0623 7 1042 → 904 22 → 16 +385 / -523 Not run (CI-only)
z0624 8 1210 → 970 26 → 24 +499 / -739 Not run (CI-only)
z0625 7 1187 → 885 42 → 38 +508 / -810 Not run (CI-only)
z0626 8 1187 → 1016 21 → 21 +292 / -463 Not run (CI-only)
z0627 6 863 → 627 17 → 17 +265 / -501 Not run (CI-only)
z0628 5 697 → 631 19 → 19 +199 / -265 Not run (CI-only)
Files by shard

z0615

  • extensions/memory-core/src/cli-status-source-diagnostic.test.ts
  • extensions/memory-core/src/dreaming-cron.test-support.ts
  • extensions/memory-core/src/dreaming-markdown.test.ts
  • extensions/memory-core/src/dreaming-repair-recall.test.ts
  • extensions/memory-core/src/dreaming-repair.test.ts
  • extensions/memory-core/src/dreaming.system-event-ownership.test.ts
  • extensions/memory-core/src/memory-corpus.test.ts
  • extensions/memory-core/src/memory-forget.postgres.test.ts

z0617

  • src/channels/message-access/child-session-publication.test.ts
  • src/channels/message-access/discord-native-owner.test.ts
  • src/channels/message-access/host-ingress.test-support.ts
  • src/channels/message-access/operator-authority.test-support.ts
  • src/channels/message-access/participant-input.test.ts
  • src/channels/message-access/telegram-native-acp-owner.test.ts
  • src/channels/message-access/telegram-native-owner.test-support.ts
  • src/channels/message-access/telegram-native-owner.test.ts

z0618

  • src/gateway/gateway-cron-process-identity.windows.test.ts
  • src/gateway/gateway-fixture-lifetime.test-support.ts
  • src/gateway/gateway-stability.test.ts
  • src/gateway/gateway.sessions-send-provenance.transport.test-support.ts
  • src/gateway/github-oauth-lifecycle.test-support.ts
  • src/gateway/github-publication-actions.test-support.ts

z0619

  • src/infra/advertised-lan-host.test.ts
  • src/infra/agent-database-readers.test.ts
  • src/infra/agent-run-projection.test.ts
  • src/infra/agent-run-registry.changes.test.ts
  • src/infra/approval-native-delivery.test.ts
  • src/infra/approval-scope.test.ts
  • src/infra/approval-view-model.test.ts

z0620

  • extensions/cua-computer/src/driver-artifacts.test.ts
  • extensions/cua-computer/src/mcp-driver-client.test.ts
  • extensions/cua-computer/src/recording-actions.test.ts
  • extensions/cua-computer/src/ref-lifecycle.contract.test.ts

z0621

  • extensions/line/src/channel-account.test-support.ts
  • extensions/line/src/channel.directory.test.ts
  • extensions/line/src/doctor.test.ts
  • extensions/line/src/gateway.test.ts
  • extensions/line/src/group-keys.test.ts
  • extensions/line/src/monitor.streaming-config.test.ts
  • extensions/line/src/monitor.webhook-wire.test.ts
  • extensions/line/src/outbound-media.test.ts
  • extensions/line/src/probe.test.ts

z0622

  • src/agents/isolated-completion-diagnostics.test.ts
  • src/agents/lifecycle-creation.retention.test-support.ts
  • src/agents/live-model-dynamic-candidates.test.ts
  • src/agents/live-model-errors.test.ts
  • src/agents/live-test-helpers.test.ts
  • src/agents/live-test-provider-drift.test.ts
  • src/agents/mcp-app-model-context.test.ts
  • src/agents/mcp-client-elicitation.test.ts

z0623

  • src/cron/service/ops-lifecycle.start-arm.test.ts
  • src/cron/service/ops.mutation-completion.test.ts
  • src/cron/service/ops.pacing.test.ts
  • src/cron/service/payload-merge.test.ts
  • src/cron/service/run-finalization.responsiveness.test.ts
  • src/cron/service/startup-notifications.test.ts
  • src/cron/service/timer.pacing.test.ts

z0624

  • src/state/openclaw-state-db-cache.idle.test.ts
  • src/state/openclaw-state-db-fast-path.test.ts
  • src/state/openclaw-state-db-readonly.warm-source.test.ts
  • src/state/openclaw-state-db-resource-scope.test.ts
  • src/state/openclaw-state-db-schema-helpers.test.ts
  • src/state/openclaw-state-db-schema-repair.windows.test.ts
  • src/state/openclaw-state-db.permissions.test.ts
  • src/state/openclaw-state-lease.test.ts

z0625

  • src/talk/agent-run-control.stop.test.ts
  • src/talk/forced-consult-coordinator.test.ts
  • src/talk/provider-resolver.discovery.test.ts
  • src/talk/realtime-session-policy.test.ts
  • src/talk/talk-session-controller.test.ts
  • src/talk/turn-context-tracker.test.ts
  • src/talk/voice-consult-transcript-race.test.ts

z0626

  • test/scripts/plugin-update-process-observer.test.ts
  • test/scripts/pnpm-install-isolation.test.ts
  • test/scripts/podman-token-generation.test.ts
  • test/scripts/pr-baseline-continuation.test.ts
  • test/scripts/pr-baseline-incoming.test.ts
  • test/scripts/pr-baseline-publication.test.ts
  • test/scripts/pr-baseline-snapshot-hash.test.ts
  • test/scripts/pr-correction-preparation.test-support.ts

z0627

  • extensions/zalo/src/accounts.test.ts
  • extensions/zalo/src/channel.pre-aborted.integration.test.ts
  • extensions/zalo/src/channel.target-prefix.integration.test.ts
  • extensions/zalo/src/monitor.reply-once.lifecycle.test-support.ts
  • extensions/zalo/src/setup-surface.test.ts
  • extensions/zalo/src/token.test.ts

z0628

  • src/agents/mcp-connection-resolver.authority.test.ts
  • src/agents/mcp-oauth-fetch.test.ts
  • src/agents/mcp-oauth-redirect.test.ts
  • src/agents/mcp-oauth-requesters.test.ts
  • src/agents/mcp-sdk-compatibility.test.ts

@clawsweeper

clawsweeper Bot commented Oct 21, 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 21, 2026 03:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T03:54:21.100802Z 59da1a9 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.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line channel: zalo Channel integration: zalo gateway Gateway runtime extensions: memory-core Extension: memory-core agents Agent runtime and tooling plugin: cua-computer size: XL labels Oct 21, 2026
@steipete
steipete disabled auto-merge October 21, 2026 03:39
@steipete
steipete enabled auto-merge (squash) October 21, 2026 03:47
@steipete
steipete disabled auto-merge October 21, 2026 03:58
@steipete
steipete enabled auto-merge (squash) October 21, 2026 04:02
@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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates repeated test fixtures and assertions across core and bundled-plugin suites without changing production code.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no identified defect; evidence is CI-backed harness validation, and the overall CI gate has not completed.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only consolidation changes no shipped behavior; current-head CI exercises retained suites, with PostgreSQL validation still running.
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 fixture construction and assertions increase test maintenance cost.
Reason: The maintainer-directed cleanup reduces repetition while leaving production behavior and public contracts intact.

Merge readiness

✅ Ready for maintainer review

Keep this PR open as useful, maintainer-directed test cleanup; no concrete introduced defect was found, and the existing CI gate is still pending.

Priority: P3
Reviewed head: 1b0b08bfccf0102a59a2d548d986208449c2c4b8

Before merge

None.

Findings

None.

Agent review details

How this fits together

Vitest suites exercise OpenClaw runtime owners through shared fixtures, native databases, and local transports, then assert observable results and cleanup.

flowchart LR
  A[Test runner] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Database and local transports]
  D --> E[Behavior assertions]
  E --> F[Fixture cleanup]
Loading

Technical review

Best possible solution:

Retain the consolidation and let the existing current-head CI gate complete before merging.

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

This PR is test maintenance, not a reported product bug; review used the pinned diff and supplied CI evidence without executing target code.

Is this the best way to solve the issue?

The consolidation reuses existing fixture owners and preserves the inspected transport, authority, cancellation, persistence, and cleanup contracts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • CUA transport and resource lifecycle tests keeps the original intent (19ace68: Embedded CUA requires the app-owned driver lifecycle; later regressions protect activation results, framing, cancellation, and resource isolation.)
  • Channel participant and owner authority tests keeps the original intent (b03d2e7: Accepted input must retain qualified participant identity and exact host ownership; verified administrator authority must remain current.)
  • LINE Doctor policy tests keeps the original intent (b076a15: Doctor must not turn direct-message permissions into unintended group access.)
  • Memory archive repair tests keeps the original intent (6866eac: Archiving removes stale recall and phase signals while preserving existing sources, failed moves, and transactional rollback.)
  • State database settlement tests keeps the original intent (db1d5d2: Failed rollback must preserve the original opening error; successful rollback retains repair and foreign-key settlement.)
  • Gateway fixture lifetime keeps the original intent (0d830e9: Received work and retained cleanup must remain inside their owning state lifetime.)
  • PR baseline correction fixtures keeps the original intent (da63d5f: Baseline refresh must preserve reviewed correction identity and require review of the exact publication candidate.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0d830e9 adds src/gateway/gateway-fixture-lifetime.test-support.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0d830e9e7448; files: src/gateway/gateway-fixture-lifetime.test-support.ts)
  • Vincent Koc: Raw commit da63d5f adds test/scripts/pr-correction-preparation.test-support.ts:7 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: da63d5f71f9c; files: test/scripts/pr-correction-preparation.test-support.ts)
  • Ayaan Zaidi: Raw commit b076a15 adds extensions/line/src/doctor.test.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: b076a15e5103; files: extensions/line/src/doctor.test.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +0/-0; tests/support +4723/-7565, net -2842 The reduction comes from fixture reuse and assertion consolidation without production growth.

Labels

Label changes:

  • add P3: This is behavior-preserving test maintenance with no identified user-facing runtime defect.
  • 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 behavior-preserving test maintenance with no identified user-facing runtime defect.
  • 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.

Reviewed October 21, 2026, 12:22 AM ET / 04:22 UTC.

@steipete
steipete merged commit e794898 into main Oct 21, 2026
135 checks passed
@steipete
steipete deleted the tcr/land-d357-1792553124 branch October 21, 2026 04:29
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
* test(memory-core): deslop z0615 tests

* test(memory-core): deslop z0615 tests

* test(memory-core): deslop z0615 tests

* test(gateway): deslop z0618 tests

* test(gateway): deslop z0618 tests

* test(gateway): deslop z0618 tests

* test(cua-computer): deslop z0620 tests

* test(cua-computer): deslop z0620 tests

* test(channels): deslop z0617 tests

* test(channels): deslop z0617 tests

* test(channels): deslop z0617 tests

* test(line): deslop z0621 tests

* test(line): deslop z0621 tests

* test(agents): deslop z0622 tests

* test(agents): deslop z0622 tests

* test(cron): deslop z0623 tests

* test(cron): deslop z0623 tests

* test(cron): deslop z0623 tests

* test(talk): deslop z0625 tests

* test(talk): deslop z0625 tests

* test(zalo): deslop z0627 tests

* test(infra): deslop z0619 tests

* test(infra): further deslop z0619 tests

* test(state): deslop z0624 tests

* test(state): deslop z0624 tests

* test(state): deslop z0624 tests

* test(scripts): deslop z0626 tests

* test(scripts): deslop z0626 tests

* test(scripts): deslop z0626 tests

* test(mcp): deslop z0628 tests

* test: repair d357 fixture types and retain cleanup contracts

* test(channels): use synchronous ingress context fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: line Channel integration: line channel: zalo Channel integration: zalo extensions: memory-core Extension: memory-core gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: cua-computer rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant