Skip to content

test(gateway,channels,ui,tooling): remove low-value tests (batch d606) - #184463

Merged
steipete merged 37 commits into
mainfrom
tcr/land-d606-1793007811
Oct 26, 2026
Merged

steipete merged 37 commits into
mainfrom
tcr/land-d606-1793007811

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Replay batch d606 onto main 1a7c815: consolidate duplicate boundary tests, repeated fixtures, and assertion scaffolding while retaining distinct authority, lifecycle, persistence, and transport behavior. This is test maintenance, not a product behavior change.

Evidence

All 30 supplied commits applied in order; no entire commit skipped. Conflicting hunks were conservatively dropped as described below.

  • Local: pnpm install --frozen-lockfile --prefer-offline; oxfmt --write on changed existing files; plain oxlint -c .oxlintrc.json on changed existing files; git diff --check against the pinned base. All passed.
  • CI found TS2322 in the MCP security test cleanup callback (check-test-types-core-2); the callback now returns void. Fresh-head CI validates that fix.
  • CI found two Windows managed-profile fixture failures in service-env-merge.test.ts (checks-node-changed-compact-small-14); restored OPENCLAW_SERVICE_MARKER and OPENCLAW_SERVICE_KIND, which select the managed-service identity branch. No assertion was weakened.
  • CI found the handoff-sentinel rejection case calling its mock again as hook cleanup: returning owner.mockReset() from beforeEach registered the returned mock as cleanup. Restored a block-bodied void hook; retained the rejection and diagnostic-redaction assertions.
  • CI found a Promise-returning Slack HTTP fixture listener (check-lint-extensions-1); restored the void-listener composition. The mock-export ratchet identified three changed mocks: Slack media/client mocks now preserve real exports, and the intentionally isolated Mattermost slash registry has a scoped isolation explanation. Both repair deltas received clean P0-P2 independent reviews; no baseline allowances were added. The subsequent ratchet run identified three obsolete entries for the deleted Slack download suite and explicitly isolated Mattermost registry; removed only those entries.
  • Prior-head PostgreSQL conformance also failed in untouched extensions/memory-core/src/tools.postgres.test.ts (memory_search replacement publication). The latest two completed hourly main PostgreSQL runs passed; this is not claimed as proven inherited and no inherited-failure merge exception is used. Fresh-head CI must resolve it.
  • CI-only: no local Vitest, check-changed, tsgo, coverage, or Testbox run. Hosted openclaw/ci-gate selects the changed-file proof. Local test wall time: not run; CI seconds: pending.
  • Coverage: every supplied shard report says tests/coverage were not run under CI-only instructions. There are no measured coverage totals or claimed <=1% drops for this batch.
  • Independent autoreview completed: accepted the moved relay mock export-shape finding and restored explicit public dispatch diagnostics assertions; the repair delta received a clean P0-P2 review. Rejected the Incognito fixture finding because all relevant handlers reject the reserved private key before acquisition, and rejected the Solid root-leak finding because afterEach cleanupSolid disposes every tracked root (mount-solid.ts / solid-cleanup.ts).
  • No CODEOWNERS patterns in the current file match these changed paths.

Tests and test support: +2098 / -3854 LOC.

Production runtime: +0 / -0 LOC.

Tooling and baseline: +0 / -6 LOC.

Replay decisions

  • Model-policy integration: preserve main's explicit state/Gateway lifecycle and apply only redundant negotiated-client removal; the owner negotiation suite retains protocol proof.
  • Mattermost: do not resurrect main-deleted picker matrix/replacement fixtures; retain main's reaction HTTP path and participation restart/store-failure cases. Apply other independent cleanups.
  • Claws reader: retain main's already-rewritten reader file; apply draft, shared fixture, and schema-conformance cleanup only.
  • Daemon helpers: retain main's current byte/path conversion and systemd property builders; obsolete helper was already removed. Rebind failure/settlement cases migrate into guard coverage.
  • Plugin metadata: retain main's lifecycle invalidation fixture/test; keep independent generated-metadata cleanup.
  • Slack: retain current enterprise installation/identity cases and lookup-count checks; apply independent owner fixture and read/download consolidation.
  • UI: drop conflicting second-pass changes to sidebar preferences, lobster geometry, MCP security, and hovercard; preserve main's new cases and current fixtures. First-pass MCP fixture cleanup remains.
  • Browser: retain main's current act-policy and vision tests instead of reintroducing old fixture architecture; migrate cold-start and rejection lifecycle proof into owning suites, with shrink-only mock-baseline cleanup.
  • Worker transcript and delivery: retain main's transcript message fixtures and expanded ordinary/incognito delivery diagnostics; restore agent-run-dispatch public diagnostics fields after review; apply independent cleanups.
  • Outbound sanitizer: retain current shared-sibling transport coverage and fixture architecture; drop both conflicting cleanup hunks.

Per-shard accounting

Counts below are for actual replay-touched files, against the pinned main base. Declaration counts are static it/test call-site counts, not executed cases. Source-report totals are historical campaign evidence, not current CI results.

o0281

Replay test/support LOC 1284 -> 1080 (-204); declarations 30 -> 28 (-2). Coverage totals: unavailable (CI-only).

  • src/gateway/server-methods/models-auth-refresh.integration.test.ts
  • src/gateway/server-methods/restart-owner.test.ts
  • src/gateway/server-methods/session-typing-state.test.ts
  • src/gateway/server-methods/suspend.test.ts
  • src/gateway/server-methods/update-handoff-sentinel.test.ts
  • src/gateway/server-methods/agent.restart-recovery.test-support.ts
  • src/gateway/server-methods/chat-history-pages.test.ts
  • src/gateway/server-methods/models-manual-policy.integration.test.ts
  • src/gateway/server-methods/open-path.test.ts
  • src/gateway/server-methods/session-recovery-continuation.test.ts

o0283

Replay test/support LOC 1129 -> 1031 (-98); declarations 43 -> 43 (0). Coverage totals: unavailable (CI-only).

  • extensions/mattermost/src/mattermost/model-picker.test.ts
  • extensions/mattermost/src/mattermost/monitor-interactions.question.test.ts
  • extensions/mattermost/src/mattermost/monitor-slash.test.ts
  • extensions/mattermost/src/mattermost/reconnect.test.ts
  • extensions/mattermost/src/mattermost/thread-participation.test.ts
  • extensions/mattermost/src/mattermost/accounts.test.ts
  • extensions/mattermost/src/mattermost/client.fetch-timeout.test.ts
  • extensions/mattermost/src/mattermost/read.test.ts

o0286

Replay test/support LOC 538 -> 462 (-76); declarations 15 -> 13 (-2). Coverage totals: unavailable (CI-only).

  • src/claws/draft.test.ts
  • src/claws/packages.boundary.test-support.ts
  • src/claws/schema-conformance.test.ts

o0284

Replay test/support LOC 1020 -> 838 (-182); declarations 28 -> 22 (-6). Coverage totals: unavailable (CI-only).

  • src/daemon/launchd-runtime.test.ts
  • src/daemon/node-service.test.ts
  • src/daemon/service-env-merge.test.ts
  • src/daemon/service-rebind.test.ts
  • src/daemon/service-stage.test.ts
  • src/daemon/service-rebind-guard.test.ts
  • src/daemon/systemd-scope.identity.test.ts
  • src/daemon/systemd-unit.test.ts

o0285

Replay test/support LOC 1190 -> 1075 (-115); declarations 26 -> 22 (-4). Coverage totals: unavailable (CI-only).

  • src/plugins/bundled-package-channel-metadata.test.ts
  • src/plugins/dashboard-capabilities.test.ts
  • src/plugins/tools.optional.test-helpers.ts
  • src/plugins/uninstall-context-engine.test.ts
  • src/plugins/install.work-deadline.test.ts
  • src/plugins/loader.async-preparation.test.ts
  • src/plugins/provider-validation.test.ts
  • src/plugins/setup-registry.artifacts.test.ts
  • src/plugins/providers.current-snapshot.test.ts

o0287

Replay test/support LOC 1049 -> 822 (-227); declarations 24 -> 21 (-3). Coverage totals: unavailable (CI-only).

  • extensions/slack/src/action-request-authority.test.ts
  • extensions/slack/src/actions.read.test.ts
  • extensions/slack/src/channel.presentation.test.ts
  • extensions/slack/src/conversation-bindings.test.ts
  • extensions/slack/src/conversation-route-owner.test.ts
  • extensions/slack/src/send.direct-authority.test.ts
  • extensions/slack/src/actions.download-file.test.ts
  • extensions/slack/src/conversation-route-owner.test-support.ts
  • extensions/slack/src/resolve-users.test.ts
  • scripts/lib/ci-proof-test-inventory.mts

o0290

Replay test/support LOC 632 -> 534 (-98); declarations 16 -> 12 (-4). Coverage totals: unavailable (CI-only).

  • src/gateway/gateway.sessions-send-recovery.diagnostics.test.ts
  • src/gateway/server-cron-reconciled.test.ts
  • src/gateway/session-control-preflights.incognito.test.ts
  • src/gateway/config-revision-token.test.ts
  • src/gateway/mention-inbox.worker.test.ts

o0288

Replay test/support LOC 1143 -> 905 (-238); declarations 40 -> 32 (-8). Coverage totals: unavailable (CI-only).

  • ui/src/components/config-form.search.node.test.ts
  • ui/src/components/hub-tabs.test.ts
  • ui/src/components/markdown-streaming-highlight.test.ts
  • ui/src/components/mcp-app-security.test.ts
  • ui/src/components/panel-loading-skeleton.test.ts
  • ui/src/components/command-palette-result.test.tsx
  • ui/src/components/copy-button.test.tsx
  • ui/src/components/elapsed-time.test.ts
  • ui/src/components/session-attention.test.tsx

o0289

Replay test/support LOC 872 -> 763 (-109); declarations 15 -> 13 (-2). Coverage totals: unavailable (CI-only).

  • extensions/browser/src/browser/extension-windows-host.test.ts
  • extensions/browser/src/browser/extension-windows.test-support.ts
  • extensions/browser/src/browser/runtime-lifecycle.unhandled-rejections.test.ts
  • config/test-mock-exports-baseline.txt
  • extensions/browser/src/browser/client-fetch.cold-start.test.ts
  • extensions/browser/src/browser/runtime-lifecycle.shutdown-race.test.ts
  • extensions/browser/src/browser/server-context.hot-reload-defaults.test.ts
  • extensions/browser/src/browser/chrome-mcp-process.test-support.ts

o0291

Replay test/support LOC 766 -> 713 (-53); declarations 12 -> 12 (0). Coverage totals: unavailable (CI-only).

  • src/gateway/worker-environments/prepared-pool-presence-store.test.ts
  • src/gateway/worker-environments/repository-project-access.test.ts
  • src/gateway/worker-environments/service-inventory-recovery.test.ts
  • src/gateway/worker-environments/inference-runtime.service-tiers.test.ts
  • src/gateway/worker-environments/placement-dispatch-continuity.test.ts
  • src/gateway/worker-environments/transcript-commit-policy.test.ts

o0292

Replay test/support LOC 1254 -> 1111 (-143); declarations 24 -> 22 (-2). Coverage totals: unavailable (CI-only).

  • src/infra/exec-approval-session-target.incognito.test.ts
  • src/infra/restart.test.ts
  • src/infra/stale-while-revalidate-cache.test.ts
  • src/infra/worker-task-pool.failure.test-support.ts
  • src/infra/worker-task-pool.native-sections.test-support.ts
  • src/infra/node-pairing-migration.test.ts
  • src/infra/sqlite-worker-terminal-admission.test.ts
  • src/infra/update-managed-service-handoff-node.test.ts
  • src/infra/update-retained-runtime.backups.test.ts
  • src/infra/update-runtime-path-index.test.ts

o0293

Replay test/support LOC 797 -> 755 (-42); declarations 18 -> 16 (-2). Coverage totals: unavailable (CI-only).

  • src/gateway/agent-turn/agent-restart-recovery-context.test.ts
  • src/gateway/agent-turn/agent-image-understanding.test.ts
  • src/gateway/agent-turn/agent-run-execution-lineage.test.ts
  • src/gateway/agent-turn/agent-session-persist.test.ts
  • src/gateway/agent-turn/agent-turn-source-admission.liveness.test.ts

o0294

Replay test/support LOC 887 -> 742 (-145); declarations 9 -> 8 (-1). Coverage totals: unavailable (CI-only).

  • test/decision-onnx-prepared.integration.test.ts
  • test/git-hooks-pre-commit.test-support.ts
  • test/non-isolated-runner.sqlite.test.ts
  • test/vitest-reporters-config.test.ts
  • test/storage-locations-r2.test.ts
  • test/vitest-projects-config.test-support.ts
  • test/vitest-ui-e2e-prebuilt.test.ts

o0295

Replay test/support LOC 125 -> 99 (-26); declarations 4 -> 4 (0). Coverage totals: unavailable (CI-only).

  • src/commands/doctor-database-port.test.ts

Remove history encoding replays covered by session-transcript.worker.schema-freshness.test.ts: transfers bounded history JSON without retaining worker buffers; retain deflate opt-out at chat-history-model-policy.test.ts: skips worker deflation when model projection replaces serialized history.

Legacy compaction metrics remain covered by server.chat-history-cursor.test.ts: keeps live and cursor sequences identical after compaction and a same-session reset. Model capability negotiation remains covered by models.prepared.test.ts and models-connect-publication.integration.test.ts. Fixture isolation remains owned by openclaw-test-state.test.ts and config/paths.test.ts.

Remove redundant admission assertions covered by agent.pre-dispatch-failure.test-utils.ts: restores admitted restart recovery if pending input admission fails. Preserve all cancellation outcomes, replay authority checks, and lifecycle interleavings. CI-only: formatting, diff checks, and plain oxlint passed; tests were not run.
Keep picker selection, detached delivery, transcript ordering, and unavailable-model coverage in monitor-model-picker.test.ts (handles the picker with catalog availability). Replace the duplicate question-suite matrix with the non-selection empty-catalog fallback identity case. Warning composition remains covered by that case and the canonical empty-selection case.

Reuse renderer, reconnect, and participation fixtures; trim internal slash-registration shape assertions while retaining command dedupe, team routing, activation, and failure coverage. CI-only: formatting, plain oxlint, and diff checks passed; no tests or coverage run. Shard LOC 1470 -> 1284 (12.7%); preserve distinct boundary cases rather than force the 20% target.
Replace the bespoke timeout settlement helper with the SDK timeout race, retaining the 31s, 750ms, and 60002ms watchdogs. Keep real HTTP cancellation and reaction thread-routing proof while removing request inventories and wrapper fixtures.

Consolidate persistence restoration and historical-record coverage in restores historical participation without extending its original expiry. Account for current record writes in isolates participation by account, channel, and thread. Trim redundant registration snapshots and fixture-only metadata; retain access-denial and expiry assertions.

CI-only: plain oxlint, oxfmt, and git diff --check pass. No tests or coverage run. Additional reduction 1284 -> 1175 lines; original shard 1470 -> 1175 (20.1%). No production or support-file changes.
Remove reader cases duplicated by schema.test.ts: human-authored Markdown, BOM integrity, frontmatter/YAML/UTF-8 rejection, competing SOUL sources, intermediate symlinks, per-file and aggregate limits, in-package links, and package escapes. Keep the case-folded collision, direct-plan boundary, hardlink, and JSON decoding/limits regressions.

Keep snapshot metadata and workspace-byte binding in reader.test.ts; remove their exact schema-conformance copies. Consolidate draft setup and optional package-boundary mock registration without changing their assertions or public helper interfaces.

CI-only shard: plain oxlint, oxfmt and git diff --check passed; no tests, coverage, or typechecks run. Lines 1648 to 1380 (16.3%); below the 20% target to retain distinct consent, privacy, provenance, schema, and lifecycle boundaries.
Share node-service isolation and compact daemon fixtures without changing their assertions. Keep native rebind success and definition-race proof in service-rebind-guard.test.ts; remove their lower-level duplicates while retaining post-read authority and compensation cases.

CI-only campaign: formatting, diff check, and plain oxlint passed. No test or coverage execution. Retain distinct identity, permission, parser, and lifecycle checks rather than forcing the 20 percent line target.
Merge rebind cases into the existing native-guard suite and retain its mock registration path. Delete the unreferenced systemdUnitProperties fixture. Reuse nativeExit, consolidate numeric receipt checks, and remove duplicated success counts and argv replay assertions.

Keep bus-error classification proof in install.test.ts handles service probe failure and configure.daemon.test.ts handles systemd probe failure; retain the distinct legacy command-failure case. CI-only: oxfmt, diff check, and plain oxlint pass; no tests run. Total shard is 979 lines from 1150; retain distinct parser, lifecycle-policy, collision, and authority checks despite remaining below the 20 percent target.
Share systemd identity selection setup while preserving file, marker, legacy-alias, and node-kind decisions. Fold final authority-revocation settlement into the rebind scenario harness, retaining both errors, cleanup cause, and receipt invalidation.

Combine escaped and empty ExecStart round trips with exact rendered output. Remove same-branch profile, errno, and parser replays; retain missing executable and missing entrypoint separately. Trim fixture construction and redundant implementation assertions.

CI-only: no tests or coverage runs. Plain oxlint, formatting, diff check, and independent source preservation review passed. Shard now totals 920 lines from 1150 (20 percent reduction).
Collapse single-use dashboard and channel fixtures, narrow tool fixture setup, and share successful uninstall-plan assertions. Preserve all cases, schema-source regression checks, dashboard authority checks, and uninstall ownership assertions. The remaining shard files have distinct lifecycle, deadline, normalization, and snapshot-scope contracts; leave them unchanged rather than force a line target.
Share the async preparation interleaving and retain its concurrency, ordering, publication and timing assertions. Keep context-engine fallback in the multi-child uninstall test and recovery in the migration case. Collapse empty profile metadata checks and remove diagnostic wording snapshots.

Byte-copy coverage remains in install-shared.test.ts (reviews the final staged artifact after source-copy mutations) and install.path.test.ts (retains caller-owned rollback and staged artifact review for a %s). Bundled setup registration counters retain module reuse proof without a parallel process-event spy. Reuse existing public-surface artifact writers. CI-only: static formatting, oxlint and diff checks passed; no tests run.
Use the metadata fixture's policy-hash input and retain observable zero-filesystem-read proof instead of also spying on an internal manifest loader. Preserve all distinct cold-discovery, workspace, environment, partial-scope, activation and alias cases.
Share the HTTP authority fixture while retaining all direct-send and action revocation cases. Move the duplicate thread-priority/no-touch proof into conversation-bindings, which exercises the real binding owner.

Remove presentation control replays already covered by reply-blocks: keeps plain-text controls literal when they accompany structured data. Keep chart/table escaping, authored text, and the card receipt regression. Read pagination retains result assertions in place of duplicate request-shape assertions.

CI-only validation: oxfmt, plain oxlint and diff-check pass. 1090 to 1002 test lines; 49 to 48 expanded cases. Below the 20% line target: remaining tests protect distinct authority, lifecycle, pagination, credential, admission and rendering behavior.
Merge download cases into the existing actions.read suite and remove the deleted path from the protected-test inventory. Consolidate reply-bound cases and user-resolution fixtures while keeping every distinct authority and error behavior.

Exercise route preparation directly with supplied unbound inspections; real binding priority and no-touch coverage remains in conversation-bindings. Delete the now-unused route inspection test wrapper.

Keep one chart escaping path in presentation edits; pie rendering remains covered by shared-interactive (renders at most two native charts per message), with header/divider rendering in outbound-adapter. Preserve the facade card receipt regression while removing duplicate Block Kit object snapshots and the module-mock layer.

CI-only: plain oxlint, oxfmt and diff-check pass. Shard test LOC 1090 -> 870 (-20.18%), plus 17 unused test-support lines removed. No tests or coverage executed.
Remove unused actor seeding from incognito preflights: provider review, environment and activity-summary owners branch on the incognito key before acquiring session state. Keep every response, no-SQL and no-acquisition assertion, and verify no memory owner is created.

Use the shared temporary-directory cleanup for recovery diagnostics and one direct cron reconciliation fixture. Preserve all 45 expanded cases, including redaction, durable-key, placement, admission and lifecycle contracts. CI-only campaign: plain oxlint, oxfmt and diff checks passed; execution and coverage deferred to hosted CI. Reduction is below target because no further duplicate behavior was established.
Keep sidecar joins, both admission fences and warning-callback shutdown in server-idle-task.lifecycle.test.ts; remove the identical nested block from server-idle-task.test.ts.

Keep persisted-key reuse in the projector reopen test, and schema projection compatibility in openclaw-state-schema-compatibility.test.ts. Remove the duplicate backend reuse proof and internal SQL-count layer. Keep Mention Inbox committed snapshots, rollback outcomes and concurrent-delivery atomicity without counting internal statements. Drop the unknown-agent incognito provider variant, which rejects at the same key-only guard before agent resolution.

CI-only campaign: plain oxlint, formatting, diff check and staged secret scan passed. No test, coverage or build runs. Cumulative shard lines: 1458 to 1238, below the requested 20 percent target; retained distinct security, durability and lifecycle contracts.
Share schema fixtures, tab queries, panel content assertions, and iframe cleanup. Consolidate open Markdown fence assertions in one table while retaining preamble, list, and blockquote cases. All expanded cases remain; this shard falls short of the 20 percent line target rather than removing distinct behavior.
Keep elapsed-time visibility and timer retirement at visible-clock.test.tsx (bounds timers for hundreds of rows, parks while hidden, and releases the final readers). Keep completed Markdown equivalence at markdown-streaming.test.ts (caches completed lists, code, and tables in the long streamed reply).

Keep count/text badges at pages/agents/view.test.tsx (shows the skills count only for the selected agent report; offers normally-absent files in the add picker and badges only real faults). Keep all-owner persistence at session-owner-filter.test.ts (restores owner/involvement choices before initial subscription). Preserve security, retry, focus, and lifecycle assertions while removing repeated fixtures and implementation-only checks.
Share action fixtures and simplify rejection-handler tracking while retaining all 71 cases and their assertions. Compact the Windows fixture without changing its consumers or admission checks. No production changes. CI-only validation; the small independent safety and lifecycle suites do not support the requested 20% cut without dropping distinct behavior.
Move cold-start dispatcher cases into server-context.hot-reload-defaults and rejection/installation-rotation cases into runtime-lifecycle.shutdown-race, sharing their launch and shutdown fixtures. Preserve deferred-start invalidation, caller cancellation, startup/action deadlines, adapter ownership and handler-drain ordering.

Use one action budget table, with hover covering the identical drag/select budget branch. Remove copied vision prompt/metadata wiring assertions; retain agent-owner admission and sanitized-file routing. Combine inline-prose and line-start media neutralization in one input. Remove only the two deleted-file mock baseline entries.

CI-only: formatting, plain oxlint and diff-check passed; no test execution. Shard now 1069 versus 1201 original lines (11 percent reduction), still below the requested 20 percent.
Move rejection-handler lifetime checks into the real deferred shutdown drain; the shared stop helper verifies full-runtime unregistration. Use one cancellation scenario to prove abandoned-first-caller startup retention, concurrent replacement requests and reuse after startup. Preserve every Windows admission rejection while simplifying fixture guards, and retain process-census safety checks.

Static-only validation: formatting, plain oxlint and diff-check pass. No tests or coverage runs. Original shard 1201 lines -> 1042 (13.2 percent), still short of 20 percent; larger remaining candidate deletions would substitute opt-in live tests for routine security coverage.
Reuse repository and presence fixtures, share binding identity, and simplify completion observations while retaining all authority, durability, and lifecycle cases. CI-only validation: oxlint, oxfmt, and diff check; no runtime or coverage commands.
Remove unused setupInference and pendingInference support; inference-lifecycle.test.ts owns its local pending helper. Keep worker-to-direct-account downgrade publication, while repeated observations, recovery, and account isolation remain covered by prepared-model-runtime.catalog-auth.test.ts (keeps response tier observations account-bound; notifies downgrade, recovery, and expiry). Remove redundant internal call-shape/count assertions and unused transcript fixture payloads. Preserve provenance, revocation, stop ordering, and durable recovery cases. CI-only static gates passed; no test or coverage runs.
Share stale-refresh setup in coalesces stale refreshes (cacheable=%s), retaining both cacheable and noncacheable outcomes. Reuse worker and incognito fixtures and simplify rejection narrowing and launchctl responses without removing boundary assertions.
Reuse pairing and main-thread SQL fixtures. Share worker failure setup while preserving direct-input exit/OOM and lazy-input attribution cases. Table foreground and one-shot handoff preparation.

The retained-runtime dependency-owner npm case covers the removed hoisted dependency replay. update-global cleans-only-renamed cases retain missing/failed pacman coverage. Path guard tests retain lexical containment variants; ordered relocation checks retain source/alias/sibling behavior, and update-candidate-plugin-tree.scale retains dense ownership integration coverage.

CI-only: plain oxlint, oxfmt and diff checks passed; no tests or coverage run. Original shard 1506 lines, now 1363; target shortfall retained to preserve unique recovery, approval and native cancellation contracts.
Exercise common recovery ownership guards once before ingress restoration. Keep internal and Control UI success/ordinary-run rejection in the retained restores-only-admitted table, with channel delivery and execution-identity checks unchanged.
Reuse the controller-owned RPC source fixture and cleanup for delivery scope checks. Remove image provider call-shape duplication covered by media-understanding/apply.test.ts and runner.vision-skip.test.ts. Keep the Gateway custody assertions while removing nested yield replay covered by subagent-requester-turn-liveness.test.ts: keeps the physical requester live through backend detach and yield until its turn settles. Retain caller outcomes, privacy boundaries, and distinct admission paths.
Inline single-use outbound wrappers and share fixture paths and ONNX input. Preserve all test cases and assertions, including transport preparation, SDK evaluation, and rejection behavior. CI-only campaign: formatting, diff check, and plain oxlint passed; tests and coverage deferred to hosted CI.
Assert reporter configuration inside its owning child process instead of serializing and reasserting the same result. Reuse decision runtime fixtures and inline the remaining one-use outbound setup.

ONNX model/callback and unsupported-reasoning assertions remain in extensions/onnx/src/decisions.test.ts (preserves classifier estimates and the physical worker admission callback; rejects reasoning before dispatch), with prepared SDK rejection also covered by src/agents/decision-inference.integration.test.ts. SQLite close/skip ordering remains asserted in sqliteLifecycleFixtureFiles; retain outer failure attribution and captured lease identity instead of repeating per-case statuses and internal retirement log wording.

CI-only: oxfmt, plain oxlint, and diff check passed. No test, build, coverage, or typecheck execution. Shard remains below the 20 percent target rather than dropping distinct authority, redaction, release, or lifecycle proof.
Remove R2 upload-state self-assertion; keep real abort/no-publication and privacy observations. Configure the native prebuilt probe through startVitest's Vite overrides instead of a generated config file. Reuse Node's subprocess result type and one serial config walker.

No tests, builds, coverage, or typechecks run under CI-only mode. Plain oxlint, oxfmt, and diff check pass. Distinct behavior retained; 20 percent target remains unmet.
Consolidate config and store preservation assertions across database port admission cases. Keep distinct no-op engines, Windows new/resume/rollback entry points, mixed-engine admission and pinned-family refusal.

Remove same-branch Windows sqlite/dry-run variants covered by the retained Windows refusal case, mixed-engine dry-run covered by requires a family for mixed installs before touching stores, and reverse pinning covered by refuses a global port that cannot move the pinned family selection. Platform admission is unconditional at the public entry point; both pinning fixtures reach the same assertPortSelection rejection.

CI-only campaign: plain oxlint, oxfmt and git diff --check passed; tests and coverage intentionally not run. Shard lines 1000 -> 974; expanded cases 31 -> 27. Target 20% not reached: other files retain distinct hosted routing, migration, cleanup, redaction, service-authority and recovery contracts.
@steipete
steipete enabled auto-merge (squash) October 26, 2026 09:52
@steipete
steipete disabled auto-merge October 26, 2026 09:59
@steipete
steipete enabled auto-merge (squash) October 26, 2026 09:59
@steipete
steipete disabled auto-merge October 26, 2026 10:06
@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:07
@steipete
steipete disabled auto-merge October 26, 2026 10:14
@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:14
@steipete
steipete disabled auto-merge October 26, 2026 10:24
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates test fixtures and suites across Gateway, channels, browser, UI, and tooling.

Example: A Slack action loses authority during a conversations.info lookup.

  • Before: The rejection and retry checks run in action-request-authority.test.ts.
  • After: The same scenarios share the HTTP fixture in send.direct-authority.test.ts.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful consolidation with substantial passing CI, but a source-confirmed ratchet failure and distinct coverage loss prevent approval.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-directed test-maintenance PR changes no shipped product behavior; validation rests on retained contracts and exact-head CI.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixtures and duplicate assertions increase test maintenance work.
Reason: The maintainer-directed cleanup reduces repetition without requiring a product change; the identified defects have focused repairs.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep open: this maintainer-directed cleanup is useful, but the Slack mock ratchet violations and lost Claw reader coverage need repair before merge.

Priority: P3
Reviewed head: aae650ee4de6f9fd13b4f6e3a3ee5ce8d7b6656a

Before merge

  • Keep the consolidated Slack mocks admissible to the export guard (P2) - This new media factory returns a closed object without pass-through or an adjacent mock-isolation annotation, and its new source identity is absent from the shrink-only baseline. resolve-users.test.ts also removes the annotation that previously exempted its closed client factory. scripts/check-test-mock-exports.mts rejects both changes; exact-head CI reports mock-exports failure. Preserve real exports or document the actual isolation requirement, restore the justified resolve-users annotation, and prune the two baseline rows for the deleted actions.download-file.test.ts rather than adding allowances.
  • Retain the distinct Claw reader boundary regressions (P2) - Removing the development-snapshot group drops checks that are not duplicated by reader.test.ts. Its retained integrity test changes package.json whitespace, whereas the deleted test changes workspace/SOUL.md and detects omission of the separate workspace-byte contribution at reader.ts:457. Its invalid-package fixture also omits version entirely, so it does not replace rejection of a present noncanonical version such as 01.0.0. Keep these small cases in the reader owner suite; otherwise those reader regressions can escape the claimed replacement coverage.
  • Explain or restore the original intent of First-party mock export guard - 07e2877: Prevent missing-export failures by requiring real-module pass-through or explicit isolation, as explained in fix(test): prevent new incomplete first-party module mocks #164673.
  • Explain or restore the original intent of Claw development snapshot regressions - unknown: The deleted tests protect package metadata admission and referenced workspace-byte binding; git log found the feature and cleanup history, but unavailable historical blobs prevented assigning their exact introduction.

Findings

  • [P2] Keep the consolidated Slack mocks admissible to the export guard — extensions/slack/src/actions.read.test.ts:7-9
  • [P2] Retain the distinct Claw reader boundary regressions — src/claws/schema-conformance.test.ts:1-4

Provenance

  • First-party mock export guard changes intended behavior without addressing why it exists (07e2877: Prevent missing-export failures by requiring real-module pass-through or explicit isolation, as explained in fix(test): prevent new incomplete first-party module mocks #164673.)
  • Claw development snapshot regressions changes intended behavior without addressing why it exists (unknown: The deleted tests protect package metadata admission and referenced workspace-byte binding; git log found the feature and cleanup history, but unavailable historical blobs prevented assigning their exact introduction.)
Agent review details

How this fits together

These tests exercise production owners with synthetic requests, state, and transports; CI selects the suites and checks their results and test-maintenance contracts.

flowchart LR
  Fixtures --> Tests
  Tests --> ProductionOwners
  ProductionOwners --> SyntheticTransport
  SyntheticTransport --> Assertions
  TestInventory --> CI
  Assertions --> CI
  MockExportGuard --> CI
Loading

Technical review

Best possible solution:

Preserve the consolidation while repairing the Slack mock contracts and moving the distinct Claw reader regressions into reader.test.ts.

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

Source inspection establishes the mock-guard violations, and exact-head CI independently reports mock-exports failure; no target code was executed.

Is this the best way to solve the issue?

Sharing fixtures and consolidating suites is appropriate, provided distinct reader boundary checks survive and moved mocks satisfy the existing guard.

Full review comments:

  • [P2] Keep the consolidated Slack mocks admissible to the export guard — extensions/slack/src/actions.read.test.ts:7-9
    This new media factory returns a closed object without pass-through or an adjacent mock-isolation annotation, and its new source identity is absent from the shrink-only baseline. resolve-users.test.ts also removes the annotation that previously exempted its closed client factory. scripts/check-test-mock-exports.mts rejects both changes; exact-head CI reports mock-exports failure. Preserve real exports or document the actual isolation requirement, restore the justified resolve-users annotation, and prune the two baseline rows for the deleted actions.download-file.test.ts rather than adding allowances.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.
  • [P2] Retain the distinct Claw reader boundary regressions — src/claws/schema-conformance.test.ts:1-4
    Removing the development-snapshot group drops checks that are not duplicated by reader.test.ts. Its retained integrity test changes package.json whitespace, whereas the deleted test changes workspace/SOUL.md and detects omission of the separate workspace-byte contribution at reader.ts:457. Its invalid-package fixture also omits version entirely, so it does not replace rejection of a present noncanonical version such as 01.0.0. Keep these small cases in the reader owner suite; otherwise those reader regressions can escape the claimed replacement coverage.
    Confidence: 0.96
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 92415c1e5fe7.

Provenance checked

  • Slack interactive action authority coverage keeps the original intent (7edd2e0: Stop provider requests and retries after interactive caller authority ends; the consolidated HTTP scenarios retain those outcomes.)
  • Browser cold-start coverage keeps the original intent (b461dc6: Separate browser startup lifetime from action deadlines; the receiving suite retains cancellation, startup-deadline, and action-deadline scenarios.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:test-mock-exports --base 1a7c815
  • pnpm test extensions/slack/src/actions.read.test.ts extensions/slack/src/resolve-users.test.ts src/claws/reader.test.ts src/claws/schema-conformance.test.ts
  • git diff --check 1a7c815

What I checked:

  • Pinned change inspected: The introduced diff changes tests, test support, and test inventories without changing production runtime code. (aae650ee4de6)
  • Mock-export contract: The guard rejects new closed first-party factories without pass-through or an adjacent isolation annotation, and separately rejects stale baseline entries; the rationale is recorded in fix(test): prevent new incomplete first-party module mocks #164673. (scripts/check-test-mock-exports.mts:195, aae650ee4de6)
  • Slack mock violations: The moved media factory lacks pass-through or an isolation annotation, resolve-users loses its existing annotation, and two baseline rows still name the deleted actions.download-file suite. (extensions/slack/src/actions.read.test.ts:7, aae650ee4de6)
  • Distinct Claw hash input: The reader independently adds referenced workspace bytes to source integrity; the retained reader regression changes package.json bytes instead of a workspace source. (src/claws/reader.ts:457, aae650ee4de6)
  • Exact-head CI: The baseline-ratchets check reports mock-exports failure on the reviewed head. UI, test-type, and multiple changed-test checks passed; extension lint also failed, but its available annotation supplies no file-level diagnostic. (aae650ee4de6)
  • Retained coverage verified: Browser startup and rejection cases move into existing browser suites; Slack authority and download cases move into existing Slack suites; shared visible-clock tests retain hidden-tab polling and disposal checks. (ui/src/lib/reactive/visible-clock.test.tsx:111, aae650ee4de6)

Likely related people:

  • Peter Steinberger: Raw commit 07e2877 adds scripts/check-test-mock-exports.mts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 07e28778a9b4; files: scripts/check-test-mock-exports.mts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and support +2080/-3840 The reduction fits the maintenance goal; three additional deletions update tooling and baseline inventories.

Labels

Label changes:

  • add P3: This is test maintenance with no production behavior change.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • 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 no production behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • 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 26, 2026, 6:32 AM ET / 10:32 UTC.

@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:40
@steipete
steipete disabled auto-merge October 26, 2026 10:50
@steipete
steipete enabled auto-merge (squash) October 26, 2026 10:51
@steipete
steipete merged commit 1c230a0 into main Oct 26, 2026
149 of 151 checks passed
@steipete
steipete deleted the tcr/land-d606-1793007811 branch October 26, 2026 11:17
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
openclaw#184463)

* test(gateway): deslop o0281 tests

* test(gateway): consolidate o0281 boundary proof

Remove history encoding replays covered by session-transcript.worker.schema-freshness.test.ts: transfers bounded history JSON without retaining worker buffers; retain deflate opt-out at chat-history-model-policy.test.ts: skips worker deflation when model projection replaces serialized history.

Legacy compaction metrics remain covered by server.chat-history-cursor.test.ts: keeps live and cursor sequences identical after compaction and a same-session reset. Model capability negotiation remains covered by models.prepared.test.ts and models-connect-publication.integration.test.ts. Fixture isolation remains owned by openclaw-test-state.test.ts and config/paths.test.ts.

Remove redundant admission assertions covered by agent.pre-dispatch-failure.test-utils.ts: restores admitted restart recovery if pending input admission fails. Preserve all cancellation outcomes, replay authority checks, and lifecycle interleavings. CI-only: formatting, diff checks, and plain oxlint passed; tests were not run.

* test(mattermost): deslop o0283 tests

Keep picker selection, detached delivery, transcript ordering, and unavailable-model coverage in monitor-model-picker.test.ts (handles the picker with catalog availability). Replace the duplicate question-suite matrix with the non-selection empty-catalog fallback identity case. Warning composition remains covered by that case and the canonical empty-selection case.

Reuse renderer, reconnect, and participation fixtures; trim internal slash-registration shape assertions while retaining command dedupe, team routing, activation, and failure coverage. CI-only: formatting, plain oxlint, and diff checks passed; no tests or coverage run. Shard LOC 1470 -> 1284 (12.7%); preserve distinct boundary cases rather than force the 20% target.

* test(mattermost): finish structural cuts for o0283

Replace the bespoke timeout settlement helper with the SDK timeout race, retaining the 31s, 750ms, and 60002ms watchdogs. Keep real HTTP cancellation and reaction thread-routing proof while removing request inventories and wrapper fixtures.

Consolidate persistence restoration and historical-record coverage in restores historical participation without extending its original expiry. Account for current record writes in isolates participation by account, channel, and thread. Trim redundant registration snapshots and fixture-only metadata; retain access-denial and expiry assertions.

CI-only: plain oxlint, oxfmt, and git diff --check pass. No tests or coverage run. Additional reduction 1284 -> 1175 lines; original shard 1470 -> 1175 (20.1%). No production or support-file changes.

* test(claws): deslop o0286 tests

Remove reader cases duplicated by schema.test.ts: human-authored Markdown, BOM integrity, frontmatter/YAML/UTF-8 rejection, competing SOUL sources, intermediate symlinks, per-file and aggregate limits, in-package links, and package escapes. Keep the case-folded collision, direct-plan boundary, hardlink, and JSON decoding/limits regressions.

Keep snapshot metadata and workspace-byte binding in reader.test.ts; remove their exact schema-conformance copies. Consolidate draft setup and optional package-boundary mock registration without changing their assertions or public helper interfaces.

CI-only shard: plain oxlint, oxfmt and git diff --check passed; no tests, coverage, or typechecks run. Lines 1648 to 1380 (16.3%); below the 20% target to retain distinct consent, privacy, provenance, schema, and lifecycle boundaries.

* test(daemon): deslop o0284 tests

Share node-service isolation and compact daemon fixtures without changing their assertions. Keep native rebind success and definition-race proof in service-rebind-guard.test.ts; remove their lower-level duplicates while retaining post-read authority and compensation cases.

CI-only campaign: formatting, diff check, and plain oxlint passed. No test or coverage execution. Retain distinct identity, permission, parser, and lifecycle checks rather than forcing the 20 percent line target.

* test(daemon): consolidate o0284 fixture and rebind layers

Merge rebind cases into the existing native-guard suite and retain its mock registration path. Delete the unreferenced systemdUnitProperties fixture. Reuse nativeExit, consolidate numeric receipt checks, and remove duplicated success counts and argv replay assertions.

Keep bus-error classification proof in install.test.ts handles service probe failure and configure.daemon.test.ts handles systemd probe failure; retain the distinct legacy command-failure case. CI-only: oxfmt, diff check, and plain oxlint pass; no tests run. Total shard is 979 lines from 1150; retain distinct parser, lifecycle-policy, collision, and authority checks despite remaining below the 20 percent target.

* test(daemon): finish o0284 structural consolidation

Share systemd identity selection setup while preserving file, marker, legacy-alias, and node-kind decisions. Fold final authority-revocation settlement into the rebind scenario harness, retaining both errors, cleanup cause, and receipt invalidation.

Combine escaped and empty ExecStart round trips with exact rendered output. Remove same-branch profile, errno, and parser replays; retain missing executable and missing entrypoint separately. Trim fixture construction and redundant implementation assertions.

CI-only: no tests or coverage runs. Plain oxlint, formatting, diff check, and independent source preservation review passed. Shard now totals 920 lines from 1150 (20 percent reduction).

* test(plugins): deslop o0285 tests

Collapse single-use dashboard and channel fixtures, narrow tool fixture setup, and share successful uninstall-plan assertions. Preserve all cases, schema-source regression checks, dashboard authority checks, and uninstall ownership assertions. The remaining shard files have distinct lifecycle, deadline, normalization, and snapshot-scope contracts; leave them unchanged rather than force a line target.

* test(plugins): consolidate o0285 duplicate proof

Share the async preparation interleaving and retain its concurrency, ordering, publication and timing assertions. Keep context-engine fallback in the multi-child uninstall test and recovery in the migration case. Collapse empty profile metadata checks and remove diagnostic wording snapshots.

Byte-copy coverage remains in install-shared.test.ts (reviews the final staged artifact after source-copy mutations) and install.path.test.ts (retains caller-owned rollback and staged artifact review for a %s). Bundled setup registration counters retain module reuse proof without a parallel process-event spy. Reuse existing public-surface artifact writers. CI-only: static formatting, oxlint and diff checks passed; no tests run.

* test(plugins): trim o0285 snapshot fixture scaffolding

Use the metadata fixture's policy-hash input and retain observable zero-filesystem-read proof instead of also spying on an internal manifest loader. Preserve all distinct cold-discovery, workspace, environment, partial-scope, activation and alias cases.

* test(slack): deslop o0287 tests

Share the HTTP authority fixture while retaining all direct-send and action revocation cases. Move the duplicate thread-priority/no-touch proof into conversation-bindings, which exercises the real binding owner.

Remove presentation control replays already covered by reply-blocks: keeps plain-text controls literal when they accompany structured data. Keep chart/table escaping, authored text, and the card receipt regression. Read pagination retains result assertions in place of duplicate request-shape assertions.

CI-only validation: oxfmt, plain oxlint and diff-check pass. 1090 to 1002 test lines; 49 to 48 expanded cases. Below the 20% line target: remaining tests protect distinct authority, lifecycle, pagination, credential, admission and rendering behavior.

* test(slack): consolidate o0287 owner fixtures

Merge download cases into the existing actions.read suite and remove the deleted path from the protected-test inventory. Consolidate reply-bound cases and user-resolution fixtures while keeping every distinct authority and error behavior.

Exercise route preparation directly with supplied unbound inspections; real binding priority and no-touch coverage remains in conversation-bindings. Delete the now-unused route inspection test wrapper.

Keep one chart escaping path in presentation edits; pie rendering remains covered by shared-interactive (renders at most two native charts per message), with header/divider rendering in outbound-adapter. Preserve the facade card receipt regression while removing duplicate Block Kit object snapshots and the module-mock layer.

CI-only: plain oxlint, oxfmt and diff-check pass. Shard test LOC 1090 -> 870 (-20.18%), plus 17 unused test-support lines removed. No tests or coverage executed.

* test(gateway): deslop o0290 tests

Remove unused actor seeding from incognito preflights: provider review, environment and activity-summary owners branch on the incognito key before acquiring session state. Keep every response, no-SQL and no-acquisition assertion, and verify no memory owner is created.

Use the shared temporary-directory cleanup for recovery diagnostics and one direct cron reconciliation fixture. Preserve all 45 expanded cases, including redaction, durable-key, placement, admission and lifecycle contracts. CI-only campaign: plain oxlint, oxfmt and diff checks passed; execution and coverage deferred to hosted CI. Reduction is below target because no further duplicate behavior was established.

* test(gateway): remove duplicate o0290 lifecycle coverage

Keep sidecar joins, both admission fences and warning-callback shutdown in server-idle-task.lifecycle.test.ts; remove the identical nested block from server-idle-task.test.ts.

Keep persisted-key reuse in the projector reopen test, and schema projection compatibility in openclaw-state-schema-compatibility.test.ts. Remove the duplicate backend reuse proof and internal SQL-count layer. Keep Mention Inbox committed snapshots, rollback outcomes and concurrent-delivery atomicity without counting internal statements. Drop the unknown-agent incognito provider variant, which rejects at the same key-only guard before agent resolution.

CI-only campaign: plain oxlint, formatting, diff check and staged secret scan passed. No test, coverage or build runs. Cumulative shard lines: 1458 to 1238, below the requested 20 percent target; retained distinct security, durability and lifecycle contracts.

* test(ui): deslop o0288 tests

Share schema fixtures, tab queries, panel content assertions, and iframe cleanup. Consolidate open Markdown fence assertions in one table while retaining preamble, list, and blockquote cases. All expanded cases remain; this shard falls short of the 20 percent line target rather than removing distinct behavior.

* test(ui): consolidate o0288 component coverage

Keep elapsed-time visibility and timer retirement at visible-clock.test.tsx (bounds timers for hundreds of rows, parks while hidden, and releases the final readers). Keep completed Markdown equivalence at markdown-streaming.test.ts (caches completed lists, code, and tables in the long streamed reply).

Keep count/text badges at pages/agents/view.test.tsx (shows the skills count only for the selected agent report; offers normally-absent files in the add picker and badges only real faults). Keep all-owner persistence at session-owner-filter.test.ts (restores owner/involvement choices before initial subscription). Preserve security, retry, focus, and lifecycle assertions while removing repeated fixtures and implementation-only checks.

* test(browser): deslop o0289 tests

Share action fixtures and simplify rejection-handler tracking while retaining all 71 cases and their assertions. Compact the Windows fixture without changing its consumers or admission checks. No production changes. CI-only validation; the small independent safety and lifecycle suites do not support the requested 20% cut without dropping distinct behavior.

* test(browser): consolidate o0289 lifecycle suites

Move cold-start dispatcher cases into server-context.hot-reload-defaults and rejection/installation-rotation cases into runtime-lifecycle.shutdown-race, sharing their launch and shutdown fixtures. Preserve deferred-start invalidation, caller cancellation, startup/action deadlines, adapter ownership and handler-drain ordering.

Use one action budget table, with hover covering the identical drag/select budget branch. Remove copied vision prompt/metadata wiring assertions; retain agent-owner admission and sanitized-file routing. Combine inline-prose and line-start media neutralization in one input. Remove only the two deleted-file mock baseline entries.

CI-only: formatting, plain oxlint and diff-check passed; no test execution. Shard now 1069 versus 1201 original lines (11 percent reduction), still below the requested 20 percent.

* test(browser): consolidate o0289 lifecycle assertions

Move rejection-handler lifetime checks into the real deferred shutdown drain; the shared stop helper verifies full-runtime unregistration. Use one cancellation scenario to prove abandoned-first-caller startup retention, concurrent replacement requests and reuse after startup. Preserve every Windows admission rejection while simplifying fixture guards, and retain process-census safety checks.

Static-only validation: formatting, plain oxlint and diff-check pass. No tests or coverage runs. Original shard 1201 lines -> 1042 (13.2 percent), still short of 20 percent; larger remaining candidate deletions would substitute opt-in live tests for routine security coverage.

* test(gateway): deslop o0291 tests

Reuse repository and presence fixtures, share binding identity, and simplify completion observations while retaining all authority, durability, and lifecycle cases. CI-only validation: oxlint, oxfmt, and diff check; no runtime or coverage commands.

* test(gateway): remove redundant o0291 fixture and catalog layers

Remove unused setupInference and pendingInference support; inference-lifecycle.test.ts owns its local pending helper. Keep worker-to-direct-account downgrade publication, while repeated observations, recovery, and account isolation remain covered by prepared-model-runtime.catalog-auth.test.ts (keeps response tier observations account-bound; notifies downgrade, recovery, and expiry). Remove redundant internal call-shape/count assertions and unused transcript fixture payloads. Preserve provenance, revocation, stop ordering, and durable recovery cases. CI-only static gates passed; no test or coverage runs.

* test(infra): deslop o0292 tests

Share stale-refresh setup in coalesces stale refreshes (cacheable=%s), retaining both cacheable and noncacheable outcomes. Reuse worker and incognito fixtures and simplify rejection narrowing and launchctl responses without removing boundary assertions.

* test(infra): consolidate o0292 fixtures and duplicate coverage

Reuse pairing and main-thread SQL fixtures. Share worker failure setup while preserving direct-input exit/OOM and lazy-input attribution cases. Table foreground and one-shot handoff preparation.

The retained-runtime dependency-owner npm case covers the removed hoisted dependency replay. update-global cleans-only-renamed cases retain missing/failed pacman coverage. Path guard tests retain lexical containment variants; ordered relocation checks retain source/alias/sibling behavior, and update-candidate-plugin-tree.scale retains dense ownership integration coverage.

CI-only: plain oxlint, oxfmt and diff checks passed; no tests or coverage run. Original shard 1506 lines, now 1363; target shortfall retained to preserve unique recovery, approval and native cancellation contracts.

* test(gateway): deslop o0293 tests

Exercise common recovery ownership guards once before ingress restoration. Keep internal and Control UI success/ordinary-run rejection in the retained restores-only-admitted table, with channel delivery and execution-identity checks unchanged.

* test(gateway): reduce o0293 fixture and assertion layers

Reuse the controller-owned RPC source fixture and cleanup for delivery scope checks. Remove image provider call-shape duplication covered by media-understanding/apply.test.ts and runner.vision-skip.test.ts. Keep the Gateway custody assertions while removing nested yield replay covered by subagent-requester-turn-liveness.test.ts: keeps the physical requester live through backend detach and yield until its turn settles. Retain caller outcomes, privacy boundaries, and distinct admission paths.

* test(tooling): deslop o0294 tests

Inline single-use outbound wrappers and share fixture paths and ONNX input. Preserve all test cases and assertions, including transport preparation, SDK evaluation, and rejection behavior. CI-only campaign: formatting, diff check, and plain oxlint passed; tests and coverage deferred to hosted CI.

* test(tooling): consolidate o0294 boundary proof

Assert reporter configuration inside its owning child process instead of serializing and reasserting the same result. Reuse decision runtime fixtures and inline the remaining one-use outbound setup.

ONNX model/callback and unsupported-reasoning assertions remain in extensions/onnx/src/decisions.test.ts (preserves classifier estimates and the physical worker admission callback; rejects reasoning before dispatch), with prepared SDK rejection also covered by src/agents/decision-inference.integration.test.ts. SQLite close/skip ordering remains asserted in sqliteLifecycleFixtureFiles; retain outer failure attribution and captured lease identity instead of repeating per-case statuses and internal retirement log wording.

CI-only: oxfmt, plain oxlint, and diff check passed. No test, build, coverage, or typecheck execution. Shard remains below the 20 percent target rather than dropping distinct authority, redaction, release, or lifecycle proof.

* test(tooling): remove o0294 fixture bookkeeping

Remove R2 upload-state self-assertion; keep real abort/no-publication and privacy observations. Configure the native prebuilt probe through startVitest's Vite overrides instead of a generated config file. Reuse Node's subprocess result type and one serial config walker.

No tests, builds, coverage, or typechecks run under CI-only mode. Plain oxlint, oxfmt, and diff check pass. Distinct behavior retained; 20 percent target remains unmet.

* test(commands): deslop o0295 tests

Consolidate config and store preservation assertions across database port admission cases. Keep distinct no-op engines, Windows new/resume/rollback entry points, mixed-engine admission and pinned-family refusal.

Remove same-branch Windows sqlite/dry-run variants covered by the retained Windows refusal case, mixed-engine dry-run covered by requires a family for mixed installs before touching stores, and reverse pinning covered by refuses a global port that cannot move the pinned family selection. Platform admission is unconditional at the public entry point; both pinning fixtures reach the same assertPortSelection rejection.

CI-only campaign: plain oxlint, oxfmt and git diff --check passed; tests and coverage intentionally not run. Shard lines 1000 -> 974; expanded cases 31 -> 27. Target 20% not reached: other files retain distinct hosted routing, migration, cleanup, redaction, service-authority and recovery contracts.

* test: preserve relay exports and public diagnostic assertions

* test(ui): return void from mock cleanup callback

* test(daemon): retain managed service identity in profile fixture

* test(gateway): avoid returning mock as hook cleanup

* test(slack): retain void HTTP fixture callback

* test(channels): preserve mocked module export contracts

* test: prune obsolete mock export baseline entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack commands Command implementations extensions: browser gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts 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