Skip to content

test(discord,ui,gateway): remove low-value tests (batch d529) - #183554

Merged
steipete merged 25 commits into
mainfrom
tcr/land-d529-1792927046
Oct 25, 2026
Merged

steipete merged 25 commits into
mainfrom
tcr/land-d529-1792927046

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduce duplicated test setup and overlapping assertions while keeping current-main behavior and newer coverage intact. This replays batch d529 onto pinned main 5ff2fe1ff6462db84e19d53c9e181b44941014ca. No production behavior, API, schema, or dependency changes.

The retained changes consolidate approval and lifecycle fixtures, board/chat helpers, migration and storage assertions, Gateway scenarios, and plugin contract setup. Current-main rewrites win over obsolete campaign fixtures.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <43 changed files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <43 changed files>: exit 0 after renaming a board fixture that collided with main's local helper.
  • git diff --check 5ff2fe1ff6462db84e19d53c9e181b44941014ca: passed.
  • CI-only instruction: no local Vitest, check-changed, tsgo, builds, coverage, or Testbox runs. No test wall time or CI seconds available at submission. Hosted openclaw/ci-gate is the runtime proof and merge gate.
  • Independent autoreview runs during CI; remediation is documented below.
  • CODEOWNERS: none of the changed paths match the current owned-path rules.

Production LOC: +0/-0. Test and test-support LOC: +1609/-2727, net -1118. No runtime performance or coverage-preservation percentage is claimed.

Shards

Counts are against the pinned main base for final retained files only. Declarations are static calls, not expanded/runtime cases. Every original shard report explicitly deferred tests and coverage under CI-only mode; no measured coverage totals are available.

Shard Retained files Test/support LOC before -> after Static declarations before -> after Coverage totals
s0316 4 1454 -> 1356 (-98) 31 -> 28 Not run (CI-only)
s0319 6 3218 -> 2942 (-276) 65 -> 63 Not run (CI-only)
s0320 1 348 -> 271 (-77) 14 -> 13 Not run (CI-only)
s0322 2 733 -> 724 (-9) 13 -> 13 Not run (CI-only)
s0323 7 2507 -> 2324 (-183) 59 -> 57 Not run (CI-only)
s0324 3 685 -> 668 (-17) 6 -> 6 Not run (CI-only)
s0325 3 1042 -> 960 (-82) 5 -> 5 Not run (CI-only)
s0326 9 3262 -> 3017 (-245) 90 -> 82 Not run (CI-only)
s0327 3 1056 -> 1012 (-44) 20 -> 20 Not run (CI-only)
s0328 3 1059 -> 1037 (-22) 13 -> 13 Not run (CI-only)
s0329 2 824 -> 759 (-65) 28 -> 28 Not run (CI-only)
s0321 0 0 retained 0 retained Not run (CI-only); skipped
s0316: final retained files
  • extensions/discord/src/monitor/message-handler.ingress-recovery.test.ts
  • extensions/discord/src/monitor/message-handler.queue.test.ts
  • extensions/discord/src/monitor/native-command-reply.test.ts
  • extensions/discord/src/monitor/reply-delivery.test.ts
s0319: final retained files
  • ui/src/components/board/board-document.test.ts
  • ui/src/components/board/board-view.browser.test.ts
  • ui/src/components/board/board-widget-cell-mcp-app.test.tsx
  • ui/src/components/board/board-widget-cell-plugin.test.ts
  • ui/src/components/board/board-widget-frame.resilience.test.ts
  • ui/src/components/board/board-widget-frame.test.ts
s0320: final retained files
  • ui/src/pages/chat/chat-commands.test.ts
s0322: final retained files
  • src/config/sessions/cleanup-service.fix-missing.test.ts
  • src/config/sessions/session-cold-storage.transcript-turn.test.ts
s0323: final retained files
  • src/infra/git-exec.test.ts
  • src/infra/sqlite-migration-scoped-snapshot.test.ts
  • src/infra/sqlite-readonly-worker-session.test.ts
  • src/infra/sqlite-schema-header.test.ts
  • src/infra/sqlite-strict.test.ts
  • src/infra/state-migrations.managed-outgoing-images.test.ts
  • src/infra/worker-task-pool.native-exchanges.test-support.ts
s0324: final retained files
  • src/infra/database-engine/cli-storage.test-support.ts
  • src/infra/database-engine/interactive-setup.integration.test.ts
  • src/infra/database-engine/transcript-identity-insert.conformance.test.ts
s0325: final retained files
  • src/gateway/server-methods/models-auth-login.catalog.integration.test.ts
  • src/gateway/server-methods/sessions-create-worktree-base.test.ts
  • src/gateway/server-methods/worktrees-recovery.test-support.ts
s0326: final retained files
  • src/plugins/active-runtime-registry.test.ts
  • src/plugins/bundle-manifest.test.ts
  • src/plugins/computer-use-contract.test.ts
  • src/plugins/manifest-model-suppression.test.ts
  • src/plugins/manifest.json5-tolerance.test.ts
  • src/plugins/plugin-instance.consumer.test.ts
  • src/plugins/plugin-module-generation.disposal.test.ts
  • src/plugins/plugin-package-update.test.ts
  • src/plugins/session-catalog.test.ts
s0327: final retained files
  • src/agents/model-selection.catalog-overlay.test.ts
  • src/agents/prepared-model-catalog.scoped-thinking.test.ts
  • src/agents/shell-snapshot.test.ts
s0328: final retained files
  • src/gateway/client.ssh.test.ts
  • src/gateway/server.startup-recovery-webchat.test.ts
  • src/gateway/session-utils.single-row-cache.test.ts
s0329: final retained files
  • src/plugin-sdk/agent-core.outcomes.test.ts
  • src/plugin-sdk/provider-auth-claude-compat.test.ts

Replay and conflict decisions

20 source commits applied, 10 skipped. Messages preserved for applied commits, with one additional fixture-name lint fix.

Applied source commits: 07455f8d58dc, 9c58e84c318f, 113a9475cd00, 2e03f6ca72d6, 18fc89d071d4, 8540f41b3616, 6e2be67afa0f, 53469d9f4088, 90b02cd79571, d11a1774debe, f0205e3befce, f4706b3a4f64, dd93a646ec67, d586b0dc19bd, eb3472f2c69d, 05ca5202df50, dbfe3e9bb957, b354e9f90462, e056cb30201d, 2cc2a8290557.

Skipped:

  • 8a38f89e117a: Discord gateway/queue/threading rewrites conflict with main; provider-proxy deletion depends on the skipped gateway consolidation.
  • 0c44a377b8eb: board owner-boundary rewrite conflicts with main's expanded reconnect/ticket behavior; retained the original first cleanup commit.
  • 4a7fc1751e77, 1db87f0e4e29, 11d0bd8c9981: Matrix harness/config/lifecycle rewrites depend on older fixture structure; keep main's current lifecycle and configuration proof.
  • 80ccbfe90053: session-worker/admission fixture ownership has changed; do not reintroduce old worker interception or erase newer session cases.
  • b43fb3c4a43b: agent retry, authorization, subscriber and visibility changes conflict with newer main proof and depend on skipped fixture rewrites.
  • 82d9a7b2fd7c, 73cf2167f6d8: database-engine proof consolidation conflicts with current CLI/search/schema/memory fixtures; retain main.
  • 75bb14d86625: Gateway mock and display-position changes conflict with current shared fixture ownership; preserve main.

Partial file-level drops (entire conflicted file restored to its pre-pick state; clean changes elsewhere retained):

  • 07455f8d58dc: threading.starter.
  • 9c58e84c318f: exec-approvals and gateway-plugin.
  • All three chat commits: attachment-paste; additionally chat-pane-stop in d11a1774debe.
  • f4706b3a4f64: mcp-app-extensions.
  • dd93a646ec67: question.communication.
  • d586b0dc19bd: api-key-rotation, exec-auto-review-transcript, session-tool-result-guard.
  • 05ca5202df50: registry.factory-bindings.
  • dbfe3e9bb957: cli-oneshot.postgres; shared helper remains used by interactive-setup.
  • e056cb30201d: server.node-pairing-ssh-verify, server.startup-recovery-webchat, session-transcript-readers.memory.

These are conservative conflict drops, not claims that the skipped code was already fixed or that its tests were unnecessary. Other initially retained hunks were then reduced further by review and CI remediation below. No baseline changes survived.

Review and CI remediation

The first completed review raised 17 P2 coverage concerns; the second completed review raised five further concerns. A third completed review identified one remaining providerless pane disconnect/remount contract; its file was also restored. All 23 were accepted conservatively: the affected files were restored to pinned main, retaining the original authority, credential migration, state backup, engine-family, mention reconciliation, publication-credit, shared-observation, command-dispatch, abort, scheduled-recovery, SQLite cleanup, and split-view contracts. No finding was waived. A local multi-state review attempt was stopped when it planned 40 passes; subsequent review uses one committed branch snapshot.

Initial-head CI: https://github.com/openclaw/openclaw/actions/runs/40188549199

  • Type errors in terminal-recovery and publication-transcript helpers, plus a notice-test type error: drop the affected file cleanups.
  • Thread-binding cleanup failure and exec-approval unbound-method lint: drop those file cleanups.
  • Redundant createDeferred<void>() type arguments: remove the two unnecessary arguments from the retained worktree-recovery fixture.
  • Mock baseline prune request: restoring correlated-recovery also restores the corresponding mock, so no baseline removal remains.
  • PR context/evidence gate: corrected required section headings.

Files restored during review/CI (supersedes earlier partial-retention descriptions):

  • src/gateway/server-methods/system-agent.host-lifecycle.test.ts
  • src/gateway/server-methods/question.hosted-caller.test.ts
  • src/gateway/server-methods/requester-cron-authority.test-support.ts
  • src/infra/client-credential-migration.postgres.test.ts
  • src/infra/backup-config-capture.test.ts
  • src/infra/state-migrations.plugin-doctor.test.ts
  • src/infra/state-migrations.caller-mode.inventory.test.ts
  • src/gateway/server-methods/models-list-result.cli-runtime-availability.test.ts
  • ui/src/pages/chat/chat-composer-mentions.test.ts
  • src/agents/model-catalog-visibility.test.ts
  • src/gateway/github-publication-history.test.ts
  • ui/src/pages/chat/processes-panel-data.test.ts
  • ui/src/pages/chat/chat-system-notice.test.ts
  • ui/src/pages/chat/route.test.ts
  • ui/src/pages/chat/chat-thread-reply-attribution.test.ts
  • src/gateway/server-methods/chat-send-user-turn.audio.test.ts
  • src/infra/sqlite-wal-checkpoint.test.ts
  • src/gateway/server-methods/chat.abort-incarnation.test.ts
  • src/gateway/server-runtime-services.correlated-recovery.test.ts
  • ui/src/pages/chat/chat-page-close-route.test.ts
  • extensions/discord/src/monitor/exec-approvals.test.ts
  • extensions/discord/src/monitor/thread-bindings.creation.test.ts
  • src/gateway/github-publication-transcript.test.ts
  • ui/src/pages/chat/chat-state-terminal-recovery.test.ts
  • ui/src/pages/chat/chat-pane-subscriptions.test.ts

The providerless-pane restoration is also reviewed as a final standalone delta. Static gates pass on the repaired candidate; fresh-head hosted CI is the runtime authority. No local runtime tests or Testbox allocations were used.

Final-head follow-up: CI run 40189509531 reported only a type-aware lint error in the new context-engine fixture teardown chain. Restored src/plugins/context-engine-owner-lifecycle.test.ts to the original base, preserving cleanup ordering and error behavior. The standalone providerless-pane restoration review was scoped-clean. Final teardown restoration is independently reviewed while the new exact-head CI runs.

Exercise canonical gateway approval routing through the retained valid-click table, replacing the narrower direct-context routing cases. Keep removed, unreadable, and replacement control branches, with one representative native card body. Consolidate repeated fixtures and redundant assertions without changing production code.
Share cancellation setup across dispatch, buffer, preflight, queued, and running phases; retain retry facts and replacement replay for every phase. Cover preflight and processing dead-letter paths independently with the same lane fixture.

Use one canonical approval fixture, shared text and voice delivery cases, and centralized binding cleanup. Keep endpoint socket proof in gateway-endpoint-runtime.test.ts while retaining metadata routing here. Model body read failure at the response stream boundary.
Factor repeated progress-card fixtures, frame mounts, renewal setup, and browser pointer/layout helpers. Remove the browser retention diagnostic recorder while retaining its iframe state assertions.

Keep all expanded cases, including ticket deadlines, authority checks, scope changes, teardown ordering, and browser layout. The existing retention and base view suites remain unchanged: their behaviors are not duplicated by the lower-level frame and cell tests. Static reduction: 4079 to 3803 lines (6.8%), below the 25% target without deleting distinct coverage. CI-only: plain oxlint, formatting, and diff check pass; runtime and coverage proof deferred to hosted CI.
Consolidate snapshot options, image cleanup fixtures, and worker budget proof. Rely on the existing reverse-order SQLite fixture cleanup and assert UNIQUE enforcement instead of schema object inventories.

The retained gitNullConfigPath platform test protects the fix from fc3bb9f; remove the old negative probe which only exercises Git with os.devNull. The retained child-reuse case now also proves caller-owned budgeting.

CI-only: oxfmt, plain oxlint, and diff check passed; tests and coverage not run. Shard LOC 4300 to 4210; the 25 percent target is not safely attainable without dropping distinct migration, authority, and lifecycle contracts.
Reuse the hot-journal fixture, consolidate native scenario declarations and disposal, and remove duplicate backup verification and internal transfer-call assertions.

Keep invalid credential validation in client-credential-migration.test.ts, family overrides in doctor-migration-resources.test.ts, and declaration authority mismatches in doctor-contract-registry.generation.test.ts. Retain backend recovery, blocked-tail propagation, in-flight Git cancellation, timing attribution, and native cleanup assertions.

CI-only: formatting, plain oxlint, and diff check passed; no test runs. Cumulative shard LOC 4300 to 4082. Target remains unmet because remaining cases cover distinct security, durability, or lifecycle behavior.
Centralize short-lived source/archive database operations and snapshot capture/restore setup. Reuse canonical managed-image record conversion and unlink interception without removing the durability, authority, or race assertions.

CI-only: formatting, plain oxlint and diff checks passed. No test runs. Shard LOC 4082 to 4025 this pass; original baseline 4300. The 25 percent target remains unmet.
Keep per-kind notice projection separate from shared promotion and framing proof. Remove duplicate slug ambiguity coverage (route-resolution.test.ts), mention prose/caret coverage (chat-mention-search.e2e.test.ts), same-label recipient reconciliation (human-mentions.test.ts), attachment handoff/restore composition (chat-pane-attachment-handoff.test.tsx and chat-pasted-text-sidebar.test.tsx), and generic presentation subscription replay (retained native-locality and composer subscription tests).
Use shared identity fixtures, combine terminal recovery and route revalidation scenarios, and consolidate process read/write access-loss setup. Keep last-observer retirement in the process-change test; shared read and Stop delivery remain covered by chat-processes-panel.test.ts. Remove repeated notice frame anatomy covered by chat-agent-run-grouping and chat-thread-live-final, and marked skill projection covered by chat-learned-notice.e2e.test.ts. Preserve malformed markers and distinct authorization, replay, and lifetime assertions.
Reuse audio, hosted-question, and recovery fixtures while preserving every test case and authority/lifecycle assertion. Remove only redundant exact-string assertions and proof-restating logs. CI-only validation: oxfmt, plain oxlint, and diff checks; runtime proof deferred to hosted CI.
Remove hosted caller instrumentation already covered by server-plugin-in-process-dispatch.session-scopes.test.ts and authorization.test.ts. Keep question outcomes through the real router.

Keep restart outcome/audit proof in host-lifecycle.test.ts and operations.gateway-lifecycle.test.ts; same-owner approval observers in system-agent-approval.test.ts; healthy sibling cancellation in chat.abort-errors.test.ts. Preserve stop authority barriers and durable incarnation fences here.

Consolidate audio transcription/command flows and MCP launch outcomes; reuse existing model and worktree fixtures. Retain distinct credential, policy, publication, recovery and revocation checks. CI-only: formatting, plain oxlint and diff-check passed; no tests or builds run.
Keep human-approval settlement in system-agent-approval.test.ts and queued final-effect revalidation in system-agent-approval-authority.test.ts; specialize host lifecycle coverage to six live host boundaries.

Audio tests retain canonical prepared text, prompt redaction, and empty command input. Generic persistence remains covered by user-turn-transcript.test.ts preserves distinct text supplied with late-resolved media; transcript-only reset suppression remains covered by auto-reply/reply/session.test.ts.

Keep real new-recipient consent here, and dispatch identity/revocation proof in sessions-send-communication.test.ts. Reuse existing model/RPC fixtures and trim repeated setup. CI-only: plain oxlint, oxfmt and diff-check passed; no tests or builds run.
Consolidate shell/catalog fixtures and preserve distinct authority, lifecycle, persistence and redaction assertions.

Retained proof: hosted-catalog recommendations covers selected-first ordering; the shared transient retry case covers the duplicate provider replay; the all-role identity case covers initial-user scrubbing; the real read-tool fidelity case now covers logging-pattern persistence.
Share context-engine loader/config fixtures and package-update snapshot setup. Preserve every existing case and behavior assertion; keep lifecycle ordering, admission, retirement, and package cleanup coverage intact. CI-only campaign: oxlint, oxfmt, and diff checks pass; runtime proof deferred to hosted CI.
Consolidate explicit-owner policies, package replacement branches, and shared lifecycle fixtures. Preserve ordinary and timed-out artifact retirement, async factory handoff, and stale-consumer rejection in their retained flow tests. Remove redundant result inventories, wrapper checks, and two same-branch manifest rows. CI-only: plain oxlint, oxfmt, and diff checks pass; no tests run. Cumulative line reduction remains below the 25 percent campaign target.
Share CLI local-store assertions, SQLite discovery and schema cleanup between one-shot and interactive entry-point tests. Reuse expected transcript identity rows while preserving parsed event comparisons and explicit key-ownership expectations.

All existing cases and security, migration, rollback, recovery and lifecycle assertions remain. CI-only: plain oxlint, oxfmt and diff checks passed; runtime tests and coverage intentionally deferred to hosted CI. The shard remains below the requested reduction target because distinct database behaviors were retained.
Consolidate credential and transcript fixtures and remove unused recovery fixture options. Keep fenced-credit repair as the representative for unrecognized attribution layouts through the executor's missing-trailer branch, retaining ancestry, exact credit, replay, and publication assertions.
Exercise correlated completion recovery directly through recoverPendingRestartContinuationDeliveries, retaining all seven original-source, generation, receipt, and cleanup interleavings from fix 1fea5ee. Scheduler ordering and context wiring remain covered by server-runtime-services.test.ts: holds restart session deliveries until subagent sources settle; gives standalone scheduled recovery its owning Gateway context and broker.

Share SSH pairing probe controls and lifecycle cleanup; retain lock-wait revocation, changed SSH identity, scope rejection, mismatch, and successful capability approval. Replace callback-only parse spy scopes with automatic disposal and inspect summary values directly. Reuse publication fixture defaults and exact signed commit bytes.

Remove redundant WebChat target/mailbox implementation assertions: server.startup-recovery-boundary.test.ts keeps owedResendRunsBeforeFirstChatSend and owedResendRunsBeforeChatSendDuringItsAdmission; the retained test still asserts provider ordering, queued cancellation, and surviving followup execution.

CI-only: plain oxlint, formatting, and diff-check passed. No tests or coverage run. Shard LOC 3476 to 3361 this commit, 4032 to 3361 cumulatively; 25 percent target remains unmet without removing distinct behavior.
Remove duplicate catalog acquisition tests already covered in provider-catalog-shared.refresh.test.ts: refresh key isolation and TTL, concurrent refresh sharing, failed refresh recovery, and budget-order isolation. Its nested acquisition budget freshness test also retains the nested-context expiry assertion.

Remove duplicate channel mirror scaffolding already covered in session-transcript-runtime.test.ts: appends keyed mirrors, dedupes unkeyed mirrors, and rejects a rebound session; does not append an assistant mirror after cancellation; rejects assistant mirror/yield context after its admitted writer is superseded; rechecks yield settlement authority after waiting for the transcript writer; dedupes unkeyed assistant mirrors against only the visible SQLite branch; serializes caller-checked idempotency inside scoped locked appends; can avoid synthetic fallback keys for strict live-store checks.

Reuse existing agent stream/tool fixtures and local Claude credential/config writers without dropping their assertions. All remaining channel-final correlation, shipped-media replay, forged-source rejection, and cleanup-order cases stay. No production or external test-support changes.

CI-only validation: plain oxlint, oxfmt, git diff --check. No test or coverage run. Shard LOC 3819 -> 3413 (10.6%); declarations 108 -> 97. Below 25%: remaining auth, approval, SDK, durability, and lifecycle contracts have no demonstrated duplicate proof. Baseline worker-preparation imports missing session-transcript.test-support.js; left unchanged for coordinator.
@clawsweeper

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

chatgpt-codex-connector Bot commented Oct 25, 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-25T11:48:07.007581Z 2dcce51 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: discord Channel integration: discord app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 25, 2026
@steipete
steipete disabled auto-merge October 25, 2026 11:25
@steipete
steipete enabled auto-merge (squash) October 25, 2026 11:31
@steipete
steipete disabled auto-merge October 25, 2026 11:34
@steipete
steipete enabled auto-merge (squash) October 25, 2026 11:35
@steipete
steipete disabled auto-merge October 25, 2026 11:45
@steipete
steipete enabled auto-merge (squash) October 25, 2026 11:45
@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 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates repeated test fixtures and assertions across Discord, agents, storage, Gateway, plugins, and the Control UI.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with supporting hosted checks, one minor scaffolding finding, and incomplete aggregate CI.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only change has no changed production behavior requiring contributor live proof; hosted checks support validation but the aggregate gate remains pending.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated test maintenance while retaining the reviewed cancellation, storage, ownership, and UI scenarios.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: the maintainer-directed test consolidation is useful, with one small unnecessary fixture extraction remaining.

Priority: P3
Reviewed head: 2dcce51d6f07097821fc427eed47276f529fd748

Before merge

  • Keep the single-consumer storage helpers in their owning suite (P3) - After the cli-oneshot.postgres cleanup was dropped, only interactive-setup.integration.test.ts imports this new module. The extraction therefore adds an exported test-support layer without consolidating the sibling suite's duplicate inventory or cleanup. Keep the useful local helpers in interactive-setup.integration.test.ts and remove this module; that preserves every retained assertion with less scaffolding, as required by the smallest-complete-change guidance.

Findings

  • [P3] Keep the single-consumer storage helpers in their owning suite — src/infra/database-engine/cli-storage.test-support.ts:29-35
Agent review details

How this fits together

These tests exercise existing runtime owners with synthetic inputs and verify routing, cancellation, persistence, lifecycle, and UI outcomes.

flowchart LR
  A[Test fixtures] --> B[Discord and Gateway owners]
  A --> C[Storage and plugin owners]
  A --> D[Control UI components]
  B --> E[Contract assertions]
  C --> E
  D --> E
  E --> F[Hosted CI]
Loading

Technical review

Best possible solution:

Retain the consolidation and move the single-consumer storage helpers into the interactive setup suite.

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

This PR addresses test duplication rather than a reported runtime bug; inspection confirms the new storage module has only one importing suite.

Is this the best way to solve the issue?

Reusing existing fixtures and preserving boundary assertions is appropriate, but the storage extraction no longer provides cross-suite sharing after its other caller was dropped.

Full review comments:

  • [P3] Keep the single-consumer storage helpers in their owning suite — src/infra/database-engine/cli-storage.test-support.ts:29-35
    After the cli-oneshot.postgres cleanup was dropped, only interactive-setup.integration.test.ts imports this new module. The extraction therefore adds an exported test-support layer without consolidating the sibling suite's duplicate inventory or cleanup. Keep the useful local helpers in interactive-setup.integration.test.ts and remove this module; that preserves every retained assertion with less scaffolding, as required by the smallest-complete-change guidance.
    Confidence: 0.94
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is correct
Overall confidence: 0.85

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 27e7e5ee87cc.

Provenance checked

  • Discord ingress cancellation keeps the original intent (5af3d49: Protect cancellation fan-in and durable retry facts; replacement cases retain cancellation phases and recovery checks.)
  • Dashboard ticket deadlines keeps the original intent (63261b8: Remove unrelated render scheduling from exact lifecycle deadline assertions; the consolidated table keeps that boundary.)
  • Post-login model discovery keeps the original intent (3d7d211: Publish delayed account models without making passive reads perform discovery; the real endpoint scenario and its assertions remain.)
  • Packed-plugin update policy keeps the original intent (5a643e3: Preserve package ownership and retained policy while removing retired children; replacement tables retain shared-root and replacement-root outcomes.)
  • Interactive database setup keeps the original intent (f15a2b8: Select the configured database before setup state access and prove persisted state and Gateway handoff through real CLI processes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • git diff --check
  • node scripts/test-database-conformance.mjs --engine postgres --connection -- src/infra/database-engine/interactive-setup.integration.test.ts --maxWorkers=1
  • Confirm the repaired head passes the existing type, lint, and openclaw/ci-gate checks.

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f15a2b8 adds src/infra/database-engine/interactive-setup.integration.test.ts:115 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f15a2b8f9380; files: src/infra/database-engine/interactive-setup.integration.test.ts)

PR surface

Tests -1118. Total -1118 across 43 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 43 1603 2721 -1118
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 43 1603 2721 -1118

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests/support +1603/-2721; net -1118 The reduction comes from fixture and assertion consolidation without production changes.

Labels

Label changes:

  • add P3: This is test maintenance with a small remaining scaffolding simplification and no identified production regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is test maintenance with a small remaining scaffolding simplification and no identified production regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • 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.

Reviewed October 25, 2026, 8:02 AM ET / 12:02 UTC.

@steipete
steipete merged commit 384100f into main Oct 25, 2026
136 of 138 checks passed
@steipete
steipete deleted the tcr/land-d529-1792927046 branch October 25, 2026 12:10
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…aw#183554)

* test(discord): deslop s0316 tests

Exercise canonical gateway approval routing through the retained valid-click table, replacing the narrower direct-context routing cases. Keep removed, unreadable, and replacement control branches, with one representative native card body. Consolidate repeated fixtures and redundant assertions without changing production code.

* test(discord): consolidate s0316 lifecycle fixtures

Share cancellation setup across dispatch, buffer, preflight, queued, and running phases; retain retry facts and replacement replay for every phase. Cover preflight and processing dead-letter paths independently with the same lane fixture.

Use one canonical approval fixture, shared text and voice delivery cases, and centralized binding cleanup. Keep endpoint socket proof in gateway-endpoint-runtime.test.ts while retaining metadata routing here. Model body read failure at the response stream boundary.

* test(board): deslop s0319 tests

Factor repeated progress-card fixtures, frame mounts, renewal setup, and browser pointer/layout helpers. Remove the browser retention diagnostic recorder while retaining its iframe state assertions.

Keep all expanded cases, including ticket deadlines, authority checks, scope changes, teardown ordering, and browser layout. The existing retention and base view suites remain unchanged: their behaviors are not duplicated by the lower-level frame and cell tests. Static reduction: 4079 to 3803 lines (6.8%), below the 25% target without deleting distinct coverage. CI-only: plain oxlint, formatting, and diff check pass; runtime and coverage proof deferred to hosted CI.

* test(sessions): deslop s0322 tests

* test(infra): deslop s0323 tests

Consolidate snapshot options, image cleanup fixtures, and worker budget proof. Rely on the existing reverse-order SQLite fixture cleanup and assert UNIQUE enforcement instead of schema object inventories.

The retained gitNullConfigPath platform test protects the fix from 8188f50; remove the old negative probe which only exercises Git with os.devNull. The retained child-reuse case now also proves caller-owned budgeting.

CI-only: oxfmt, plain oxlint, and diff check passed; tests and coverage not run. Shard LOC 4300 to 4210; the 25 percent target is not safely attainable without dropping distinct migration, authority, and lifecycle contracts.

* test(infra): consolidate s0323 owner-boundary proof

Reuse the hot-journal fixture, consolidate native scenario declarations and disposal, and remove duplicate backup verification and internal transfer-call assertions.

Keep invalid credential validation in client-credential-migration.test.ts, family overrides in doctor-migration-resources.test.ts, and declaration authority mismatches in doctor-contract-registry.generation.test.ts. Retain backend recovery, blocked-tail propagation, in-flight Git cancellation, timing attribution, and native cleanup assertions.

CI-only: formatting, plain oxlint, and diff check passed; no test runs. Cumulative shard LOC 4300 to 4082. Target remains unmet because remaining cases cover distinct security, durability, or lifecycle behavior.

* test(infra): consolidate s0323 migration fixtures

Centralize short-lived source/archive database operations and snapshot capture/restore setup. Reuse canonical managed-image record conversion and unlink interception without removing the durability, authority, or race assertions.

CI-only: formatting, plain oxlint and diff checks passed. No test runs. Shard LOC 4082 to 4025 this pass; original baseline 4300. The 25 percent target remains unmet.

* test(chat): deslop s0320 tests

* test(chat): consolidate s0320 coverage layers

Keep per-kind notice projection separate from shared promotion and framing proof. Remove duplicate slug ambiguity coverage (route-resolution.test.ts), mention prose/caret coverage (chat-mention-search.e2e.test.ts), same-label recipient reconciliation (human-mentions.test.ts), attachment handoff/restore composition (chat-pane-attachment-handoff.test.tsx and chat-pasted-text-sidebar.test.tsx), and generic presentation subscription replay (retained native-locality and composer subscription tests).

* test(chat): deduplicate s0320 owner-boundary scenarios

Use shared identity fixtures, combine terminal recovery and route revalidation scenarios, and consolidate process read/write access-loss setup. Keep last-observer retirement in the process-change test; shared read and Stop delivery remain covered by chat-processes-panel.test.ts. Remove repeated notice frame anatomy covered by chat-agent-run-grouping and chat-thread-live-final, and marked skill projection covered by chat-learned-notice.e2e.test.ts. Preserve malformed markers and distinct authorization, replay, and lifetime assertions.

* test(gateway): deslop s0325 tests

Reuse audio, hosted-question, and recovery fixtures while preserving every test case and authority/lifecycle assertion. Remove only redundant exact-string assertions and proof-restating logs. CI-only validation: oxfmt, plain oxlint, and diff checks; runtime proof deferred to hosted CI.

* test(gateway): remove duplicated s0325 test layers

Remove hosted caller instrumentation already covered by server-plugin-in-process-dispatch.session-scopes.test.ts and authorization.test.ts. Keep question outcomes through the real router.

Keep restart outcome/audit proof in host-lifecycle.test.ts and operations.gateway-lifecycle.test.ts; same-owner approval observers in system-agent-approval.test.ts; healthy sibling cancellation in chat.abort-errors.test.ts. Preserve stop authority barriers and durable incarnation fences here.

Consolidate audio transcription/command flows and MCP launch outcomes; reuse existing model and worktree fixtures. Retain distinct credential, policy, publication, recovery and revocation checks. CI-only: formatting, plain oxlint and diff-check passed; no tests or builds run.

* test(gateway): separate s0325 owner proof layers

Keep human-approval settlement in system-agent-approval.test.ts and queued final-effect revalidation in system-agent-approval-authority.test.ts; specialize host lifecycle coverage to six live host boundaries.

Audio tests retain canonical prepared text, prompt redaction, and empty command input. Generic persistence remains covered by user-turn-transcript.test.ts preserves distinct text supplied with late-resolved media; transcript-only reset suppression remains covered by auto-reply/reply/session.test.ts.

Keep real new-recipient consent here, and dispatch identity/revocation proof in sessions-send-communication.test.ts. Reuse existing model/RPC fixtures and trim repeated setup. CI-only: plain oxlint, oxfmt and diff-check passed; no tests or builds run.

* test(agents): deslop s0327 tests

Consolidate shell/catalog fixtures and preserve distinct authority, lifecycle, persistence and redaction assertions.

Retained proof: hosted-catalog recommendations covers selected-first ordering; the shared transient retry case covers the duplicate provider replay; the all-role identity case covers initial-user scrubbing; the real read-tool fidelity case now covers logging-pattern persistence.

* test(plugins): deslop s0326 tests

Share context-engine loader/config fixtures and package-update snapshot setup. Preserve every existing case and behavior assertion; keep lifecycle ordering, admission, retirement, and package cleanup coverage intact. CI-only campaign: oxlint, oxfmt, and diff checks pass; runtime proof deferred to hosted CI.

* test(plugins): consolidate s0326 contract fixtures

Consolidate explicit-owner policies, package replacement branches, and shared lifecycle fixtures. Preserve ordinary and timed-out artifact retirement, async factory handoff, and stale-consumer rejection in their retained flow tests. Remove redundant result inventories, wrapper checks, and two same-branch manifest rows. CI-only: plain oxlint, oxfmt, and diff checks pass; no tests run. Cumulative line reduction remains below the 25 percent campaign target.

* test(database-engine): deslop s0324 tests

Share CLI local-store assertions, SQLite discovery and schema cleanup between one-shot and interactive entry-point tests. Reuse expected transcript identity rows while preserving parsed event comparisons and explicit key-ownership expectations.

All existing cases and security, migration, rollback, recovery and lifecycle assertions remain. CI-only: plain oxlint, oxfmt and diff checks passed; runtime tests and coverage intentionally deferred to hosted CI. The shard remains below the requested reduction target because distinct database behaviors were retained.

* test(gateway): deslop s0328 tests

Consolidate credential and transcript fixtures and remove unused recovery fixture options. Keep fenced-credit repair as the representative for unrecognized attribution layouts through the executor's missing-trailer branch, retaining ancestry, exact credit, replay, and publication assertions.

* test(gateway): compact s0328 recovery fixtures

Exercise correlated completion recovery directly through recoverPendingRestartContinuationDeliveries, retaining all seven original-source, generation, receipt, and cleanup interleavings from fix e1fdd05. Scheduler ordering and context wiring remain covered by server-runtime-services.test.ts: holds restart session deliveries until subagent sources settle; gives standalone scheduled recovery its owning Gateway context and broker.

Share SSH pairing probe controls and lifecycle cleanup; retain lock-wait revocation, changed SSH identity, scope rejection, mismatch, and successful capability approval. Replace callback-only parse spy scopes with automatic disposal and inspect summary values directly. Reuse publication fixture defaults and exact signed commit bytes.

Remove redundant WebChat target/mailbox implementation assertions: server.startup-recovery-boundary.test.ts keeps owedResendRunsBeforeFirstChatSend and owedResendRunsBeforeChatSendDuringItsAdmission; the retained test still asserts provider ordering, queued cancellation, and surviving followup execution.

CI-only: plain oxlint, formatting, and diff-check passed. No tests or coverage run. Shard LOC 3476 to 3361 this commit, 4032 to 3361 cumulatively; 25 percent target remains unmet without removing distinct behavior.

* test(plugin-sdk): deslop s0329 tests

Remove duplicate catalog acquisition tests already covered in provider-catalog-shared.refresh.test.ts: refresh key isolation and TTL, concurrent refresh sharing, failed refresh recovery, and budget-order isolation. Its nested acquisition budget freshness test also retains the nested-context expiry assertion.

Remove duplicate channel mirror scaffolding already covered in session-transcript-runtime.test.ts: appends keyed mirrors, dedupes unkeyed mirrors, and rejects a rebound session; does not append an assistant mirror after cancellation; rejects assistant mirror/yield context after its admitted writer is superseded; rechecks yield settlement authority after waiting for the transcript writer; dedupes unkeyed assistant mirrors against only the visible SQLite branch; serializes caller-checked idempotency inside scoped locked appends; can avoid synthetic fallback keys for strict live-store checks.

Reuse existing agent stream/tool fixtures and local Claude credential/config writers without dropping their assertions. All remaining channel-final correlation, shipped-media replay, forged-source rejection, and cleanup-order cases stay. No production or external test-support changes.

CI-only validation: plain oxlint, oxfmt, git diff --check. No test or coverage run. Shard LOC 3819 -> 3413 (10.6%); declarations 108 -> 97. Below 25%: remaining auth, approval, SDK, durability, and lifecycle contracts have no demonstrated duplicate proof. Baseline worker-preparation imports missing session-transcript.test-support.js; left unchanged for coordinator.

* test(board): avoid shadowed frame fixture after replay

* test: retain distinct boundary coverage identified in review

* test: preserve lifecycle proof and drop failing cleanup fixtures

* test(chat): retain providerless pane remount coverage

* test(plugins): retain original context engine fixture teardown
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: discord Channel integration: discord gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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