Skip to content

test(agents,ui,channels): remove low-value tests (batch d522) - #183445

Merged
steipete merged 37 commits into
mainfrom
tcr/land-d522-1792916494
Oct 25, 2026
Merged

steipete merged 37 commits into
mainfrom
tcr/land-d522-1792916494

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This batch removes duplicate test layers and repeated fixture setup across agents, model setup, reply handling, channels, UI, ClickClack, CLI, Cron, Gateway, sessions, and plugins.

User Impact

No intended user-visible behavior change. The final replay removes 1,779 test/support lines net, with no production-code changes. Distinct authority, recovery, persistence, and lifecycle contracts remain in their owner suites.

Why This Change Was Made

Replay all 30 supplied campaign commits onto pinned main 8f1f7cf3a86c, preserving their subjects. Conflicting deletions were reduced conservatively to preserve newer main contracts. This is a bounded test-maintenance batch, not a runtime optimization claim.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <changed TS/JS files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <changed TS/JS files>: exit 0.
  • git diff --check 8f1f7cf3a86c4f2ea5f80d48e074a46e8c7abc7f: passed.
  • CI-only campaign policy: no local tests, coverage, typecheck, check-changed, Crabbox, or Testbox runs. Required openclaw/ci-gate is the behavioral gate.
  • Source reports explicitly say coverage was not measured; no numerical coverage-preservation claim is made.
  • Three independent review runs completed alongside hosted CI; seventeen preservation findings were accepted across three reviews and ten findings rejected with owner evidence below.
  • CODEOWNERS inspection: no changed file matches the current owned-path rules.
  • No visual product changes, dependency changes, or production seams removed.
Replay decisions and retained contracts

All 30 commits applied; none skipped wholesale. Conflict decisions:

  • s0241: retained main's private compaction helper, newer approval context, and multi-answer OpenRouter fixture/assertions; the removed compaction accounting helper was already absent. Kept nonconflicting cleanup.
  • s0243: retained main's separated workspace/prompt-settings tests and dropped the conflicting system-prompt consolidation. Kept main's inline pending-input model while adopting the shared HTTP-server fixture.
  • s0242: dropped conflicting activation, first-run, and wizard-runner consolidation from the latter two commits. Restored the original Gateway-owner recovery suite in a corrective commit because its planned destination was the retained runner. Other model-setup changes remain.
  • s0245: retained main's update-campaign and server-preferences navigation suites instead of replaying conflicting older fixture rewrites.
  • s0247: retained current pre-bootstrap process coverage; dropped its conflicting native-fixture rewrite.
  • s0246: retained current inbound/outbound suites on conflict, including the existing typed completion fixture. Retained mention-gating and its CI routing because its planned inbound destination was not applied. The later review restored the Gateway and thread-reply suites together, including the unchanged mock baseline.
  • s0249: retained conflicting stream-validation, failure-alert, timeout-normalization, and recovery-schedule suites; kept other fixture consolidation.
  • s0248: retained current auth-context rate-limiter fixture and its tests; kept other Gateway reductions.
  • s0251: retained current branching suite after conflict; kept three small session fixture reductions.
  • s0250: retained current doctor-artifact, loader-admission, install-compensation, and diagnostics-resource suites after conflicts; kept nonconflicting reductions.

Preservation review

The first independent review raised 16 findings. Eight were accepted conservatively by dropping the affected file-level cleanup: moderation sender enforcement; queued original model ceilings; early cancellation of oversized ClickClack error bodies; follow-up target/privacy assertions; mixed rejected-exec loop streaks; exact native sessions.create admission; pending config flush before activation; and ordinary route-loader retry. The original main files now remain unchanged for those contracts.

Eight first-pass findings were rejected after source inspection (the OpenRouter file was subsequently restored for the distinct zero-cost concern):

  • Implicit approval authorization: src/infra/channel-approval-auth.test.ts covers missing/disabled/empty-approver capabilities; commands-approve.ts applies one channel-independent unauthorized-sender guard, retained in the command suite.
  • OpenRouter completion allowlist: src/decisions/runtime.test.ts denies SDK policy before provider dispatch and asserts the provider evaluator is not called. This is the shared authorization owner; the retained OpenRouter integration still proves transport, credentials, usage, and live revocation.
  • Explicit unavailable sandbox: src/agents/bash-tools.exec-host-contract.test.ts runs both eager and lazy exec through Tool Search input validation and requires the sandbox-unavailable rejection.
  • Direct-only Tool Search: src/agents/tool-search.test.ts retains “keeps direct-only tools visible and redirects mistaken catalog calls only while declared,” including direct visibility and catalog exclusion.
  • Stored Cron skill selections: src/cron/isolated-agent/run.session-read.test.ts retains “prepares full target and source rows without host database reads,” which writes an existing target with pinned selections and checks their preservation.
  • Index persistence authority: the same changed receipt suite retains revocation at transaction and commit for refresh/restore, asserting rejection and an unchanged committed row; raw invocation counts are not the primary proof.
  • Legacy migration import avoidance: legacyFixture records “module” at import time, and the retained modern-declaration table requires an empty event list. Importing without invoking the detector still fails.
  • Account-connect OAuth: ui/src/pages/model-providers/model-providers-page.login.test.ts retains registered Models-page callback completion and terminal-error/recovery flows through models.authLogin.

A second preservation review raised eight more findings. All eight were resolved conservatively by restoring the affected main files: prepared-model runtime, ClickClack Gateway and its thread-reply companion, OpenRouter integration, image-steering media tests, device-token policy close, update-report authority, Cron definition integrity, and Cron PR automation. The mock baseline is unchanged after restoring its companion suite.

CI on prior head 57406de27c95 reported a batch-caused incomplete ModelDefinitionConfig fixture in prepared-model-runtime.test.ts (job: https://github.com/openclaw/openclaw/actions/runs/40177300709/job/121121320399). Restoring that file removes both the type error and the new exact-object matcher issue. No local typecheck/test rerun was performed; fresh-head hosted CI is the proof.

The earlier replay-only undefined OpenRouter fixture variable was fixed before this review; that entire file now matches main. The third review completed with three findings. The diagnostic-detail finding was accepted by restoring src/plugins/payload-verification.test.ts to main. Two findings were rejected: vi.hoisted stores a mock callback, so createGatewaySnapshotFixture() executes only when that callback is later invoked after imports initialize; and model-setup-page.test.ts (restored to main) retains “redacts initial detection failures and recovers through Retry,” including the initial-load error/Retry path. That review repair only removed the diagnostic suite from this PR's diff; no new test logic was added. All accepted findings are resolved; retained rejections are source-backed above.

Hosted CI repair

Run 40178496175 passed the test/type repair stage but flagged the three changed agent-runner-utils.test.ts mock factories against the existing mock-export baseline. Dropped only those name-only factory rewrites, retaining main's exact factory shapes; no baseline exception was added or widened. Job: https://github.com/openclaw/openclaw/actions/runs/40178496175/job/121124677353

Final-head CI run 40177968251 exposed additional batch-caused static fixture errors:

Only plain changed-file lint/format and diff checks ran locally, all passing; hosted CI validates the new head. No checks were rerun merely to chase green.

Per-shard files, lexical declarations, and source-report coverage statements

Replay inventory

Counts compare the replay with pinned main base 8f1f7cf3a86c. Declarations are lexical counts, not executed cases. Test-support files are included in shard LOC.

s0241

File Test LOC before → after Declarations before → after
src/agents/agent-runtime-config.secret-owners.test.ts 416 → 409 12 → 11
src/agents/bash-tools.exec.store-env.test.ts 428 → 421 12 → 11
src/agents/cli-output-reasoning.test.ts 418 → 384 9 → 9
src/agents/outcome-fallback-runtime-contract.test.ts 420 → 356 7 → 4
src/agents/runtime-recovery.incognito.test.ts 424 → 421 7 → 7
src/agents/tool-search-selection.test.ts 426 → 320 9 → 8
Total 2532 → 2311 (-221) 56 → 50 (-6)

Source report coverage statement: LOC: 5,058 → 4,971 (−87, −1.7%). Target not met. Static declarations: 109 → 109; counter-expanded cases: 170 → 169. No runtime counts or coverage measured, per CI-only instructions.

s0242

File Test LOC before → after Declarations before → after
ui/src/pages/model-setup/model-setup-discovery.test.ts 246 → 211 4 → 3
ui/src/pages/model-setup/model-setup-first-run.test-support.ts 294 → 325 0 → 0
ui/src/pages/model-setup/model-setup-first-run.test.ts 631 → 624 12 → 12
ui/src/pages/model-setup/model-setup-reconnect.test.ts 245 → 241 4 → 4
ui/src/pages/model-setup/model-setup-refresh.test.ts 394 → 344 9 → 6
Total 1810 → 1745 (-65) 29 → 25 (-4)

Source report coverage statement: Oxlint exited 0; formatting and diff checks passed. Tests, coverage, and check-changed were not run, per CI-only mode.

s0243

File Test LOC before → after Declarations before → after
src/auto-reply/reply/abort.acp-boundary.test.ts 416 → 392 1 → 1
src/auto-reply/reply/agent-runner-required-maintenance.pending-input.test.ts 418 → 414 1 → 1
src/auto-reply/reply/agent-runner-utils.test.ts 421 → 380 10 → 9
src/auto-reply/reply/commands-approve.test.ts 416 → 369 10 → 9
src/auto-reply/reply/commands-login.consent.test.ts 420 → 400 5 → 4
src/auto-reply/reply/commands-system-prompt.test.ts 407 → 394 8 → 8
src/auto-reply/reply/get-reply-directives-apply.test.ts 424 → 390 8 → 8
src/auto-reply/reply/reply-utils.test.ts 428 → 381 24 → 22
src/auto-reply/reply/route-reply.test.ts 429 → 386 12 → 10
Total 3779 → 3506 (-273) 79 → 72 (-7)

Source report coverage statement: Plain oxlint exited 0; formatting and diff-check passed. Tests, coverage, and check-changed were intentionally not run under CI-only mode.

s0244

File Test LOC before → after Declarations before → after
src/channels/plugins/account-config-mutation.test.ts 274 → 270 7 → 7
src/channels/plugins/binding-routing.test.ts 332 → 327 11 → 11
src/channels/plugins/bundled.shape-guard.test.ts 676 → 596 15 → 15
src/channels/plugins/catalog.test.ts 219 → 216 7 → 7
src/channels/plugins/message-action-dispatch.registry.test.ts 538 → 498 17 → 15
src/channels/plugins/package-state-probes.test.ts 237 → 210 7 → 6
src/channels/plugins/read-only.test.ts 795 → 671 20 → 18
src/channels/plugins/setup-wizard-helpers.test.ts 525 → 461 20 → 19
src/channels/plugins/setup-wizard.test.ts 406 → 387 6 → 6
src/channels/plugins/status.test.ts 229 → 187 8 → 5
Total 4231 → 3823 (-408) 118 → 109 (-9)

Source report coverage statement: Formatting, git diff --check, and plain oxlint passed. Tests, coverage, and check-changed were not run under CI-only mode; hosted CI remains pending. No production/support files changed and no bugs or flakes were fixed.

s0245

File Test LOC before → after Declarations before → after
ui/src/app/app-host.gateway-lineage.test.ts 419 → 406 6 → 6
ui/src/app/app-shell-command-palette-loading.test.ts 372 → 349 11 → 9
ui/src/app/lazy-shell-action.test.ts 431 → 424 9 → 9
ui/src/app/mentions.test.ts 486 → 480 13 → 13
Total 1708 → 1659 (-49) 39 → 37 (-2)

Source report coverage statement: Plain oxlint, formatting, and diff checks passed. Tests, coverage, and check-changed were not run, per CI-only mode. No bugs or flakes fixed.

s0246

File Test LOC before → after Declarations before → after
extensions/clickclack/src/accounts.test.ts 313 → 277 10 → 10
extensions/clickclack/src/activity.test.ts 308 → 201 10 → 7
extensions/clickclack/src/inbound.test.ts 624 → 613 19 → 19
extensions/clickclack/src/progress.test.ts 229 → 209 7 → 6
extensions/clickclack/src/sender-authority.test.ts 466 → 462 6 → 6
extensions/clickclack/src/setup-surface.test.ts 552 → 454 21 → 18
Total 2492 → 2216 (-276) 73 → 66 (-7)

Source report coverage statement: Formatting, plain oxlint, and git diff --check passed. No tests, coverage, or check-changed ran, per CI-only mode. No production/helper changes or bug fixes.

s0247

File Test LOC before → after Declarations before → after
src/cli/gateway-cli/register.option-collisions.test.ts 389 → 387 14 → 14
src/cli/gateway-cli/run-loop-natural-exit.test-support.ts 416 → 405 7 → 7
src/cli/gateway-cli/run-loop-package-lifecycle.test-support.ts 534 → 533 0 → 0
src/cli/gateway-cli/run-loop-request.test-support.ts 576 → 561 11 → 11
src/cli/gateway-cli/run-loop-restart-ownership.test-support.ts 330 → 312 5 → 5
src/cli/gateway-cli/run-loop-shutdown-completion.test-support.ts 405 → 377 9 → 9
src/cli/gateway-cli/run-loop-startup.test-support.ts 327 → 313 2 → 2
src/cli/gateway-cli/run-loop-stop.test-support.ts 535 → 518 7 → 7
src/cli/gateway-cli/run-loop.test-support.ts 344 → 336 1 → 1
Total 3856 → 3742 (-114) 56 → 56 (0)

Source report coverage statement: Formatting, git diff --check, and plain oxlint passed. Tests, coverage and check-changed were not run, as required by CI-only mode. Coordinator decision: accept the limited cut or reassign for further review.

s0248

File Test LOC before → after Declarations before → after
src/gateway/server/ws-connection/authenticated-request-dispatch.abort.test.ts 220 → 215 4 → 3
src/gateway/server/ws-connection/authenticated-request-dispatch.server.test.ts 490 → 457 7 → 7
src/gateway/server/ws-connection/connect-hello.setup-completion.test.ts 324 → 312 4 → 2
src/gateway/server/ws-connection/message-handler.worker-metrics.test.ts 352 → 349 10 → 10
Total 1386 → 1333 (-53) 25 → 22 (-3)

Source report coverage statement: Formatting, plain oxlint (exit 0), and git diff --check passed. Tests, coverage, and typechecks were not run, per CI-only instructions. No production or support files changed; no bug fixes claimed.

s0249

File Test LOC before → after Declarations before → after
src/cron/maintenance-lifecycle.test.ts 438 → 422 14 → 13
src/cron/service.channel-requester.test.ts 398 → 382 7 → 7
src/cron/service.declarative-jobs.test.ts 451 → 445 8 → 8
src/cron/service.jobs.test.ts 446 → 442 19 → 19
src/cron/service.session-payload.test.ts 381 → 336 4 → 4
src/cron/service.stream-worker.test.ts 389 → 373 4 → 4
src/cron/session-run.test.ts 434 → 402 8 → 8
Total 2937 → 2802 (-135) 64 → 63 (-1)

Source report coverage statement: Formatting, plain oxlint (exit 0), and git diff --check passed. Tests, coverage, and typechecking were not run, per CI-only mode. No production or shared-support changes; no bug/flake fixes.

s0250

File Test LOC before → after Declarations before → after
src/plugins/context-engine-install-lifecycle.test.ts 408 → 323 6 → 6
src/plugins/doctor-contract-registry.state-migrations.test.ts 424 → 400 13 → 11
src/plugins/installed-plugin-index-store-write.receipt.test.ts 404 → 397 7 → 7
src/plugins/plugin-sdk-native-resolver.test.ts 416 → 400 8 → 8
src/plugins/plugin-version-drift.test.ts 408 → 368 10 → 10
Total 2060 → 1888 (-172) 44 → 42 (-2)

Source report coverage statement: Formatting, plain oxlint, and diff-check passed with exit 0. Tests, coverage, and check-changed were not run, per CI-only mode.

s0251

File Test LOC before → after Declarations before → after
src/agents/sessions/agent-session-responses-eof.test.ts 468 → 462 3 → 3
src/agents/sessions/agent-session-steering-context.test.ts 515 → 511 6 → 6
src/agents/sessions/agent-session-transcript-worker.test.ts 498 → 495 5 → 5
Total 1481 → 1468 (-13) 14 → 14 (0)

Source report coverage statement: Plain oxlint exited 0; formatting and git diff --check passed. No production/helper changes. Tests and coverage were not run, per CI-only mode.

LOC split

production: +0 / −0 (net 0)

tests: +1984 / −3682 (net -1698)

support: +80 / −161 (net -81)

metadata: +0 / −0 (net 0)

Share scoped catalog setup and prompt-policy construction; reuse runtime fixtures and assert notices directly. Preserve security, recovery, and lifecycle cases.

The CLI per-index duplicate is covered by dedupes and continues snapshot thinking after tool-interleaved streaming; its continuation assertions are retained there. Split tagged-reasoning buffering remains covered by holds reasoning with a split tag name until its close tag is complete.
Keep Incognito admission logging in tool-loop-admission.incognito.test.ts. Keep warning buckets in agent-tools.before-tool-call.e2e.test.ts and execution accounting in the retained composed agent-loop cases. Remove the unused compaction accounting helper.

Keep sandbox rejection in bash-tools.exec-host-contract.test.ts; search dispatch in tool-search.mcp-error.test.ts and tool-search.test.ts; search metadata in tool-search.metadata.test.ts. Keep approval handoff dispatch in bash-tools.exec-approval-followup.test.ts and node recovery copy in infra/exec-approval-reply.test.ts.

Keep generic decision authorization in decisions/runtime.test.ts, compatibility in decisions/compatibility.test.ts, and native OpenRouter request/error/cost contracts in extensions/openrouter/decision-provider.test.ts. Keep classification mappings in the Codex adapter outcome contract. Retain native route, credentials, usage and live revocation integration assertions.
Share catalog application setup, reuse existing model fixtures, simplify conditional OpenRouter auth setup, and consolidate stale-silence exhaustion into the preferred-summary table while retaining the no-fallback identity case.
Reuse directive and runner fixtures, compact approval cases, and remove unused sandbox skill filesystem setup. Preserve authority, lifecycle, privacy, and delivery assertions.

Remove duplicate formatRunLabel truncation and runtime-context sanitization cases; reply-plumbing.test.ts retains identical cases. The retained mixed resolved/unresolved image case covers native image bytes and ordering.

CI-only proof: plain oxlint, oxfmt, and diff-check. Shard LOC 4927 to 4785; the 25% target is not safely reachable without dropping distinct behaviors.
Remove mock-only warning replay, redundant authority adapter variants, duplicate delivery outcomes and input variants. Share sandbox policy/path fixtures and reuse the abort registry session/queue builders.

Keepers: bootstrap-files.test.ts warning tests; channel-approval-auth.test.ts implicit authorization; sandbox/tool-policy.test.ts classification rejection; commands-login.test.ts profile adoption and refresh completion; reply-tool-authority.test.ts inbound authority projection; agent-runner-direct-runtime-config.test.ts followup queue path; directive-handling.mixed-inline.test.ts thinking validation; route-reply.delivery-result.test.ts suppression; abort.test.ts cutoff persistence; block-reply-pipeline.test.ts captionless media merge.

CI-only static proof: oxlint, oxfmt and diff-check. No test runs. Shard original 4927 lines to 4526; further cuts would remove distinct authority/lifecycle proof, so the 25 percent target remains unmet.
Keep parser behavior at stronger streaming owner boundaries: embedded-agent-subscribe.handlers.messages.lifecycle.test.ts preserves visible text after split protocol prefixes and final media; directive-delivery and text-end-reconciliation suites preserve split reply directives. Retain malformed prefixes, fenced text, sticky reply IDs and resets locally.

Keep image rejection in agent-runner.runreplyagent.e2e.test.ts queues-a-followup matrix and prepared media-context reuse in agent-runner.media-ownership.test.ts delivery-owner table. Consolidate audio projection into the existing embedded-context scenario and retain the false-input control. Reuse HTTP fixture cleanup and cancellation gate helpers.

No tests/builds run under CI-only instructions. Plain oxlint, formatting and diff-check pass. Shard 4526 to 4448 lines this pass; original 4927 to 4448. The 25 percent target remains unmet under distinct-behavior retention.
Share native catalog fixtures and ready-view setup without removing distinct behavior assertions. Exercise verification progress and success as one transition. The reconnect suite's waits for route readiness before detection case absorbs the duplicate refresh-suite route-readiness probe and its untracked-read warning assertion. Keep cancellation, receipt recovery, authority, expiry, and reconnect interleavings intact. CI-only campaign: local oxlint, oxfmt, and diff checks; no test or coverage runs.
Retire the duplicate initial retry probe into the page redaction/retry case, and combine scope/revision draft clearing with late-rescan rejection. The real-Gateway same-target case covers the retired runner interrupted-answer case. ConfiguredModel's successful verification test owns provider/model replacement; model-specific label/error association remains in the view suite. Share fixtures and remove repeated RPC inventories while retaining authority, receipt, no-replay, cancellation and lifecycle assertions. CI-only: oxfmt, plain oxlint and diff checks passed; no test or coverage runs.
Share mounted first-run fixtures, collapse cold/warm catalog setup, and consolidate repeated presentation assertions without removing distinct authority, cancellation, or recovery paths. Keep Gateway-owner recovery cases in the same jsdom project in wizard-runner.test.ts.

Provider connection OAuth callback and terminal guidance remain covered by model-providers-page.login.test.ts: settles sign-in through the registered Models page and keeps recovery guidance in the next step. Config write ordering and post-mutation refresh remain covered by config-write-coordinator.test.ts; page-specific access revocation and wizard mutation ordering remain here. Clipboard fallback remains covered by clipboard.test.ts and copy-button.test.tsx.

CI-only campaign: plain oxlint, oxfmt, and git diff --check passed; tests and coverage intentionally not run. Shard LOC 4826 to 4136 (14.3% reduction); 25% target remains unmet rather than dropping distinct lifecycle and authority proof.
Share MCP route fixtures and rely on existing outlet/router cleanup owners. Consolidate composing, commit-pending, and disposed palette handoff retirement into one parameterized suite while retaining all cases and assertions. No production or shared support changes.
Keep update run races in overlays-update-race.test.ts and status response ownership in overlays-update-status-responses.test.ts. Their campaign copies repeat the same test bodies; the only extra fresh-target assertions restated internal RPC options.

Keep persisted navigation adoption in server-prefs.adoption.test.ts and ordering/outbox settlement in server-prefs.navigation-intent.test.ts. Remove their duplicate describe blocks and the fixture options they alone used.

Share native destination and new-session rejection setup without dropping invalid-route, credential scope, permission, or onboarding checks. Replace stale resetUpdateTest and observeServerPrefsCommits imports with the existing cleanup owner and a local commit receipt. No test runs under campaign CI-only mode.
Keep error/retry context proof in router-outlet-solid.test.tsx: preserves a routed page's focused draft through loader updates and retryable errors, then retires it on navigation. Keep pending-to-loaded outlet proof in router-outlet-presentation.test.tsx: shows the pending destination when its outlet is replaced before the module loads; loading accessibility stays in presentation-primitives.test.tsx.

Keep mention refresh joins in both revision cases, move palette submit-lock assertions into its Enter table while retaining selection handoff proof, reuse renderComposerInto for the lineage composer and share connected-shell timer cleanup. Preserve distinct transient MCP ownership, authority and recovery boundaries. CI-only campaign: no tests run.
Factor bundled module fixtures and cached-failure assertions. Consolidate custom lifecycle preservation into the status URL-redaction case, preserving all lifecycle, identity and nonmutation checks. Trim wizard and package-state fixture verbosity without removing policy or error paths.
Share package probe, linkage, account-patch and read-only discovery fixtures. Remove internal call-shape/success-count assertions while retaining returned outcomes and denial-before-effect checks. The named/unnamed cold-adapter case covers the removed unnamed-account replay. Preserve lazy bundled-root metadata across cache-partition phases.
Keep cold-adapter name trimming and nonmutation in the manifest adapter test. Provider formatting, wildcard inventory and inspector precedence remain in agents.commands.list.test.ts: builds a read-only mixed account inventory without exposing unavailable credentials; renders canonical account scopes, deduplicating aliases without merging wildcard diagnostics.

Sender gating remains in message-action-routing.test.ts: preserves no-context owner Discord admin actions through the shared runner. Official reads, downloads and stale-response suppression remain in channel-message-read-authority.integration.test.ts and slack-download-read-authority.integration.test.ts. Async alias success/refusal remains in imessage-reply-alias.integration.test.ts: matches a cold SQLite current-message binding through the registered iMessage adapter.

Retain rejected alias propagation and distinct scope/lifecycle gates. Consolidate inspection alias/lifecycle checks into raw-inspection filtering. Account normalization stays in account-id.test.ts and IRC setup; binding projection/touch stays in retained routing rows and session-binding-routing.worker.test.ts.
Consolidate same-phase mock count assertions using the existing helper. Preserve all cases and lifecycle, admission, and CLI boundary assertions; further removal would discard distinct coverage. CI-only validation: oxfmt, diff check, and plain oxlint.
Drop bootstrap trace inventories while preserving admission, environment, and state-manifest proof. Share Commander setup and assert the single busy JSON response directly. Remove secondary startup/probe call-shape assertions and the duplicate package no-respawn assertion.

Keep owner handoff identity, lifecycle timing, and all cases. Existing run-loop cases retain startup operation and host-control proof; service-cgroup timing retains the 85000ms deadline without repeating its log wording. CI-only: oxfmt, plain oxlint, and diff check passed.
Remove post-outcome exit/count bookkeeping and secondary log/call-shape checks. Keep all interleaving cases, effect barriers, recovery commands, owner identity, and generation guards. Scope host-retirement instrumentation to its owning case.

The service-cgroup table retains foreground/supervisor lock metadata; the exited result retains the wrapper return-code proof. No test or production paths removed. CI-only static gates passed: oxfmt, plain oxlint, git diff --check. Shard remains below the requested reduction target.
Reuse activity and history fixtures, compact ordered progress and gateway assertions, and retain distinct authority, recovery, and transport cases.

The ambiguous failed activity POST test retains the shared enqueue error and successful-finalization proof from the deleted transport-error duplicate. The session-policy test retains the final routed session key instead of duplicating internal helper arguments.

CI-only campaign: plain oxlint, formatting, and diff checks passed; no tests or coverage executed. Safe reduction is 4819 to 4693 lines; further cuts would drop distinct boundary coverage.
Merge thread reply cases into gateway and mention gating into inbound, preserving direct lookup, unreadable-message, policy-revalidation and authority cases. Remove only obsolete path and mock-baseline entries.

Keep HTTP nonce serialization and attachment lookup in uploads bytes, creates a nonce-keyed message, and reads its persisted attachment. Archive PATCH serialization remains in service-events: coalesces event bursts at the earliest deadline and reconciles the renamed session. Stream cancellation remains in provider-http-errors: releases complete/truncated body readers; the local error test asserts the exact 8 KiB bound.

Consolidate activity status/provenance and native privacy assertions into their existing lifecycle flows. Move text sanitization into the real beta sender case. Remove repeated prefix variants covered by identity and route-reply tests, and setup wrapper cases covered by the saved-config hook and setup-credential owner.

CI-only: plain oxlint, oxfmt and diff check pass; no tests or coverage run. This additional commit cuts 534 test lines; cumulative 4819 to 4159 (13.7 percent), below the requested 25 percent without dropping remaining distinct boundary proof.
Consolidate command-menu capacity into the bounded-menu case and other-bot dispatch into the scoped-context case. Preserve readiness error clearing, replay warnings, all authority interleavings, and credential defaults.

Use a shared loopback server owner for the oversized JSON regression, trim unread fixture fields, table equivalent routing and bot-loop setups, and keep exact activity assertions with less repetition. Replace the stale createInboundCompletion import with a local typed completion fixture.

Plain oxlint, formatting and diff checks pass. No tests, builds or coverage were run. Additional test LOC: 4159 to 3985; cumulative 4819 to 3985 (17.3 percent), still below the 25 percent target.
Consolidate session receipts, scheduler fixtures, and maintenance invalidation setup while retaining every case and authority, recovery, and lifecycle assertion.

Remove redundant stream update call-shape proof covered by the retirement-reply-loss case durable and resident stopped-state assertions. The selected-PR autoFix case retains its final exact effect trace instead of repeating intermediate prefixes.

CI-only campaign: plain oxlint, oxfmt, and diff checks passed; runtime tests and coverage deferred to hosted CI. The remaining suites are already dense; preserve distinct boundaries rather than force the 25 percent line target.
Drop the receipt-identity block duplicated by service.recovery-identity.test.ts: recovers the pending legacy result after a predecessor, pending, or late edit. That suite retains exact receipts, timestamp ties, history, replacement state, and cleanup assertions.

Drop repeated failure-alert incident and fallback wiring cases. Retained coverage: failure-alerts.persistence tests for incident persistence and shared cooldown; failure-repair repairs once per failure streak; failure-alerts.outcome delivers to the queue session owner; service.failure-alert-notifications routes rejected alerts.

The real service.run-queue owned-running test and service.timer-maintenance active-due test cover active marker preservation before maintenance. Merge script cap and explicit timeout-reset checks into one payload lifecycle. Existing skill pins remain covered by isolated-agent/run.session-read full target/source preparation.

CI-only: formatting, diff check, and plain oxlint pass. No tests or coverage run. Cumulative shard reduction is 4997 to 4632 lines; the 25 percent target remains unmet rather than deleting distinct authority and durability proof.
Reuse the existing admission, operator-recovery, and real session fixtures; preserve all test cases and assertions. Remove unrelated owner and scheduled-policy data from runtime-authority storage fixtures and drop the obsolete recovery harness overrides.

Use the narrow createJob state contract directly instead of casting a partial object to CronServiceState. CI-only: formatting, diff check, and plain oxlint passed; no tests, coverage, or builds run. The cumulative shard is 4997 to 4571 lines, below the requested 25 percent reduction.
Reuse hello, request, profile and barrier fixtures while retaining authority and transport assertions. Join the existing dispatcher completion instead of maintaining a second report-handler completion channel.

Remove the duplicate malformed-scope string case: the remaining rejects non-array scopes test covers the same validateConnectParams branch. Keep hello update redaction at the payload boundary instead of duplicating internal snapshot call-shape checks.

CI-only campaign: oxfmt, plain oxlint and diff-check passed; runtime tests and coverage intentionally deferred to hosted CI. Lines 4997 to 4895; cases 157 to 156. Below the 25 percent target because remaining cases cover distinct authority, cancellation, transport, accounting and lifecycle boundaries.
Keep auth-state coverage in auth-context.state.test.ts, queue grouping in queue.authority.test.ts, shared compression in ws-connection.serialized-json.test.ts, and report attempt fencing in update-report-run.test.ts and update-failure-report-transport.test.ts.

Keep hello route withdrawal and replacement assertions at sendGatewayHello; server-tailscale.test.ts owns route cleanup and exit. Remove obsolete membership probes whose mocked presence path is no longer read by hello. Consolidate UI descriptor cases and trim duplicate serializer, capability-inventory and internal-call assertions.

CI-only: formatting, plain oxlint and diff-check passed; no runtime tests or coverage run. Original shard 4997 lines to 4389 (12.2 percent reduction); the 25 percent target remains unmet without removing distinct retained boundaries.
Replace stacked auth-decision fixture factories with one typed builder and share the bootstrap failure setup across distinct failure rows. Reuse the canonical WebSocket fixture for suspension admission.

Remove retired symbol-issuer forgery scaffolding: request authority now belongs to a WeakMap. Keep copied-request rejection at that live boundary. The deleted equivalent-grant lifecycle replay remains covered by server-reload-handlers.identity-scopes.test.ts: preserves proxy runs until each revocation ends.

CI-only: formatting, plain oxlint and diff-check passed; no runtime tests or typecheck run. This pass removes 133 lines, reaching 4256 from original4997 (14.8 percent); the 25 percent target remains unmet.
Remove duplicate retained-data and write-hold suites from branching. session-manager-retained-data.test.ts retains rejection, outer-transaction, suffix-query, reopened metadata, and deep JSON coverage. session-manager-write-hold.test.ts retains lock preparation, keyed replay, stale-generation, and descendant reparenting coverage.

Reuse existing message/tool fixtures without removing distinct agent-session assertions. Static lint, formatting, and diff checks pass; test execution deferred to hosted CI by campaign instruction.
Share context-engine plugin fixtures and retain all activation, collision, cold-start and uninstall checks. Consolidate the two explicit-modern-declaration fallback cases into one table without deleting either case. Reuse the JSON fixture writer for native resolver tests.

Keep payload failure category, plugin identity, path and continuation assertions; remove exact internal diagnostic wording. All package, bundle, entrypoint and peer-link branches remain in the same named cases. CI-only shard: formatting, plain oxlint and diff check passed; no tests or coverage run. Reduction: 4677 to 4516 lines (3.44%); distinct lifecycle, auth and persistence contracts prevent an honest 25% cut.
Consolidate cohort filtering into one real inventory report and dynamic/declared migration ordering into one owner-order scenario. Remove the normal-stop replay covered by retains pending disposal in a live stop caller; retain the closed-startup interleaving.

Drop internal callback counts and a duplicate receipt predecessor dump while retaining actual SQLite row and authority checks. Remove the combined-symlink row covered by staging link to canonical and canonical directory link. Flatten single-child loader suites and simplify the native ESM probe program without dropping its imports or assertions.

CI-only: no tests, coverage, or typechecking run. Plain oxlint, formatting, and diff check passed. This follow-up removes 93 more lines: cumulative 4677 to 4426 (5.37%), below the requested 25%. No whole-file deletion has an equivalent keeper; distinct native-resource, compiled-artifact, authority and durable-write contracts remain.
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes agents Agent runtime and tooling extensions: clickclack size: XL labels Oct 25, 2026
@steipete
steipete enabled auto-merge (squash) October 25, 2026 08:30
@steipete
steipete disabled auto-merge October 25, 2026 08:35
@steipete
steipete enabled auto-merge (squash) October 25, 2026 08:36
@steipete
steipete disabled auto-merge October 25, 2026 08:41
@steipete
steipete enabled auto-merge (squash) October 25, 2026 08:42
@steipete
steipete disabled auto-merge October 25, 2026 08:46
@steipete
steipete enabled auto-merge (squash) October 25, 2026 08:46
@steipete
steipete disabled auto-merge October 25, 2026 08:52
@steipete
steipete enabled auto-merge (squash) October 25, 2026 08:54
@steipete
steipete disabled auto-merge October 25, 2026 09:05
@steipete
steipete enabled auto-merge (squash) October 25, 2026 09:05
@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 fixtures and removes repeated assertions and overlapping test cases across runtime, channels, plugins, and UI suites.

Example: ClickClack activity changes from running to failed during an in-flight POST.

  • Before: Separate tests cover status changes and in-flight updates.
  • After: A parameterized lifecycle test checks that the persisted body becomes “Read sample: failed; sample.txt”.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test-only maintenance supported by source inspection and passing focused hosted checks, with one small unused fixture addition and the aggregate gate still pending.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR changes only tests and fixtures; hosted CI exercises the affected suites, and no changed user-visible behavior requires separate live proof.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Product

Kind: Test only · Worth it: Yes
Reason: The maintainer-approved direction reduces repeated fixture and assertion maintenance without changing product behavior.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored test cleanup open; the reductions are useful, with one small unused fixture addition to remove.

Priority: P3
Reviewed head: 9fc520d60bda0f40d5e6e7fcb052411509268701

Before merge

  • Remove the unused first-run fixture wrapper (P3) - The newly exported createMountedFirstRun has no callers anywhere in src, test, or ui. Consequently, it consolidates no setup and protects no behavior, while adding another fixture API beside the existing createFirstRunContext and mountDetection owners. Remove this unused wrapper to satisfy the repository's smallest-complete-change and test-scaffolding rules.

Findings

  • [P3] Remove the unused first-run fixture wrapper — ui/src/pages/model-setup/model-setup-first-run.test-support.ts:198-205
Agent review details

How this fits together

These Vitest suites feed synthetic requests, events, and fixtures into existing production owners and check their results; the PR changes no production implementation.

flowchart LR
  A[Synthetic inputs] --> B[Shared test fixtures]
  B --> C[Runtime and channel owners]
  B --> D[UI and plugin owners]
  C --> E[Behavior assertions]
  D --> E
  E --> F[Hosted CI gate]
Loading

Technical review

Best possible solution:

Keep the owner-suite consolidations and remove the unused createMountedFirstRun wrapper.

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

No user-facing bug reproduction applies to this test-only cleanup; source inspection establishes the unused fixture.

Is this the best way to solve the issue?

Consolidating repeated proof into existing owner suites is consistent with repository testing policy.

Full review comments:

  • [P3] Remove the unused first-run fixture wrapper — ui/src/pages/model-setup/model-setup-first-run.test-support.ts:198-205
    The newly exported createMountedFirstRun has no callers anywhere in src, test, or ui. Consequently, it consolidates no setup and protects no behavior, while adding another fixture API beside the existing createFirstRunContext and mountDetection owners. Remove this unused wrapper to satisfy the repository's smallest-complete-change and test-scaffolding rules.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is correct
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2678ee8e0e04.

Provenance checked

  • Tool Search selection coverage keeps the original intent (3ff4a6c: Allow selective schema deferral while preserving direct tools, required tools, and policy restrictions.)
  • Model-setup detection and catalog refresh keeps the original intent (72ad5e9: Derive detection readiness from owner reads while retaining retry and draft continuity.)
  • Read-only channel account presentation keeps the original intent (fd67ed8: Preserve configured account names in agent listings without loading channel runtimes.)
  • ClickClack durable activity keeps the original intent (67044ce: Publish durable commentary and tool activity with coalescing and best-effort transport.)
  • Cron ordinary session turns keeps the original intent (ec5d369: Make ordinary automation jobs authoritative while preserving scheduling, history, and authority.)
  • Context-engine lifecycle keeps the original intent (53fb615: Keep declared engine ownership consistent through activation, cold start, repair, and removal.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • rg -n createMountedFirstRun src test ui (expect no matches)
  • git diff --check
  • Required openclaw/ci-gate succeeds on the repaired head

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 64faa7f adds ui/src/pages/model-setup/model-setup-refresh.test.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 64faa7fee842; files: ui/src/pages/model-setup/model-setup-refresh.test.ts)
  • Brad: Raw commit 3ff4a6c adds src/agents/tool-search-selection.test.ts:28 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3ff4a6cb2781; files: src/agents/tool-search-selection.test.ts)
  • PollyBot13: Raw commit 53fb615 adds src/plugins/context-engine-install-lifecycle.test.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 53fb615aafeb; files: src/plugins/context-engine-install-lifecycle.test.ts)

PR surface

Tests -1779. Total -1779 across 68 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 68 2060 3839 -1779
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 68 2060 3839 -1779

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +0/-0; tests/support +2060/-3839, net -1779 The reduction is confined to test maintenance; it establishes no runtime performance improvement.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no intended production behavior change.
  • 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 cleanup with no intended production behavior change.
  • 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, 5:23 AM ET / 09:23 UTC.

@steipete
steipete merged commit 6d249d2 into main Oct 25, 2026
130 checks passed
@steipete
steipete deleted the tcr/land-d522-1792916494 branch October 25, 2026 09:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…aw#183445)

* test(agents): deslop s0241 tests

Share scoped catalog setup and prompt-policy construction; reuse runtime fixtures and assert notices directly. Preserve security, recovery, and lifecycle cases.

The CLI per-index duplicate is covered by dedupes and continues snapshot thinking after tool-interleaved streaming; its continuation assertions are retained there. Split tagged-reasoning buffering remains covered by holds reasoning with a split tag name until its close tag is complete.

* test(agents): remove duplicated s0241 proof layers

Keep Incognito admission logging in tool-loop-admission.incognito.test.ts. Keep warning buckets in agent-tools.before-tool-call.e2e.test.ts and execution accounting in the retained composed agent-loop cases. Remove the unused compaction accounting helper.

Keep sandbox rejection in bash-tools.exec-host-contract.test.ts; search dispatch in tool-search.mcp-error.test.ts and tool-search.test.ts; search metadata in tool-search.metadata.test.ts. Keep approval handoff dispatch in bash-tools.exec-approval-followup.test.ts and node recovery copy in infra/exec-approval-reply.test.ts.

Keep generic decision authorization in decisions/runtime.test.ts, compatibility in decisions/compatibility.test.ts, and native OpenRouter request/error/cost contracts in extensions/openrouter/decision-provider.test.ts. Keep classification mappings in the Codex adapter outcome contract. Retain native route, credentials, usage and live revocation integration assertions.

* test(agents): consolidate s0241 fixtures

Share catalog application setup, reuse existing model fixtures, simplify conditional OpenRouter auth setup, and consolidate stale-silence exhaustion into the preferred-summary table while retaining the no-fallback identity case.

* test(auto-reply): deslop s0243 tests

Reuse directive and runner fixtures, compact approval cases, and remove unused sandbox skill filesystem setup. Preserve authority, lifecycle, privacy, and delivery assertions.

Remove duplicate formatRunLabel truncation and runtime-context sanitization cases; reply-plumbing.test.ts retains identical cases. The retained mixed resolved/unresolved image case covers native image bytes and ordering.

CI-only proof: plain oxlint, oxfmt, and diff-check. Shard LOC 4927 to 4785; the 25% target is not safely reachable without dropping distinct behaviors.

* test(auto-reply): consolidate s0243 test layers

Remove mock-only warning replay, redundant authority adapter variants, duplicate delivery outcomes and input variants. Share sandbox policy/path fixtures and reuse the abort registry session/queue builders.

Keepers: bootstrap-files.test.ts warning tests; channel-approval-auth.test.ts implicit authorization; sandbox/tool-policy.test.ts classification rejection; commands-login.test.ts profile adoption and refresh completion; reply-tool-authority.test.ts inbound authority projection; agent-runner-direct-runtime-config.test.ts followup queue path; directive-handling.mixed-inline.test.ts thinking validation; route-reply.delivery-result.test.ts suppression; abort.test.ts cutoff persistence; block-reply-pipeline.test.ts captionless media merge.

CI-only static proof: oxlint, oxfmt and diff-check. No test runs. Shard original 4927 lines to 4526; further cuts would remove distinct authority/lifecycle proof, so the 25 percent target remains unmet.

* test(auto-reply): remove redundant s0243 owner replays

Keep parser behavior at stronger streaming owner boundaries: embedded-agent-subscribe.handlers.messages.lifecycle.test.ts preserves visible text after split protocol prefixes and final media; directive-delivery and text-end-reconciliation suites preserve split reply directives. Retain malformed prefixes, fenced text, sticky reply IDs and resets locally.

Keep image rejection in agent-runner.runreplyagent.e2e.test.ts queues-a-followup matrix and prepared media-context reuse in agent-runner.media-ownership.test.ts delivery-owner table. Consolidate audio projection into the existing embedded-context scenario and retain the false-input control. Reuse HTTP fixture cleanup and cancellation gate helpers.

No tests/builds run under CI-only instructions. Plain oxlint, formatting and diff-check pass. Shard 4526 to 4448 lines this pass; original 4927 to 4448. The 25 percent target remains unmet under distinct-behavior retention.

* test(model-setup): deslop s0242 tests

Share native catalog fixtures and ready-view setup without removing distinct behavior assertions. Exercise verification progress and success as one transition. The reconnect suite's waits for route readiness before detection case absorbs the duplicate refresh-suite route-readiness probe and its untracked-read warning assertion. Keep cancellation, receipt recovery, authority, expiry, and reconnect interleavings intact. CI-only campaign: local oxlint, oxfmt, and diff checks; no test or coverage runs.

* test(model-setup): consolidate s0242 owner-boundary proof

Retire the duplicate initial retry probe into the page redaction/retry case, and combine scope/revision draft clearing with late-rescan rejection. The real-Gateway same-target case covers the retired runner interrupted-answer case. ConfiguredModel's successful verification test owns provider/model replacement; model-specific label/error association remains in the view suite. Share fixtures and remove repeated RPC inventories while retaining authority, receipt, no-replay, cancellation and lifecycle assertions. CI-only: oxfmt, plain oxlint and diff checks passed; no test or coverage runs.

* test(model-setup): consolidate s0242 fixtures and owner proof

Share mounted first-run fixtures, collapse cold/warm catalog setup, and consolidate repeated presentation assertions without removing distinct authority, cancellation, or recovery paths. Keep Gateway-owner recovery cases in the same jsdom project in wizard-runner.test.ts.

Provider connection OAuth callback and terminal guidance remain covered by model-providers-page.login.test.ts: settles sign-in through the registered Models page and keeps recovery guidance in the next step. Config write ordering and post-mutation refresh remain covered by config-write-coordinator.test.ts; page-specific access revocation and wizard mutation ordering remain here. Clipboard fallback remains covered by clipboard.test.ts and copy-button.test.tsx.

CI-only campaign: plain oxlint, oxfmt, and git diff --check passed; tests and coverage intentionally not run. Shard LOC 4826 to 4136 (14.3% reduction); 25% target remains unmet rather than dropping distinct lifecycle and authority proof.

* test(ui): deslop s0245 tests

Share MCP route fixtures and rely on existing outlet/router cleanup owners. Consolidate composing, commit-pending, and disposed palette handoff retirement into one parameterized suite while retaining all cases and assertions. No production or shared support changes.

* test(ui): remove duplicated s0245 suite layers

Keep update run races in overlays-update-race.test.ts and status response ownership in overlays-update-status-responses.test.ts. Their campaign copies repeat the same test bodies; the only extra fresh-target assertions restated internal RPC options.

Keep persisted navigation adoption in server-prefs.adoption.test.ts and ordering/outbox settlement in server-prefs.navigation-intent.test.ts. Remove their duplicate describe blocks and the fixture options they alone used.

Share native destination and new-session rejection setup without dropping invalid-route, credential scope, permission, or onboarding checks. Replace stale resetUpdateTest and observeServerPrefsCommits imports with the existing cleanup owner and a local commit receipt. No test runs under campaign CI-only mode.

* test(ui): consolidate s0245 presentation proof

Keep error/retry context proof in router-outlet-solid.test.tsx: preserves a routed page's focused draft through loader updates and retryable errors, then retires it on navigation. Keep pending-to-loaded outlet proof in router-outlet-presentation.test.tsx: shows the pending destination when its outlet is replaced before the module loads; loading accessibility stays in presentation-primitives.test.tsx.

Keep mention refresh joins in both revision cases, move palette submit-lock assertions into its Enter table while retaining selection handoff proof, reuse renderComposerInto for the lineage composer and share connected-shell timer cleanup. Preserve distinct transient MCP ownership, authority and recovery boundaries. CI-only campaign: no tests run.

* test(channels): deslop s0244 tests

Factor bundled module fixtures and cached-failure assertions. Consolidate custom lifecycle preservation into the status URL-redaction case, preserving all lifecycle, identity and nonmutation checks. Trim wizard and package-state fixture verbosity without removing policy or error paths.

* test(channels): consolidate s0244 fixtures and assertions

Share package probe, linkage, account-patch and read-only discovery fixtures. Remove internal call-shape/success-count assertions while retaining returned outcomes and denial-before-effect checks. The named/unnamed cold-adapter case covers the removed unnamed-account replay. Preserve lazy bundled-root metadata across cache-partition phases.

* test(channels): remove duplicated s0244 test layers

Keep cold-adapter name trimming and nonmutation in the manifest adapter test. Provider formatting, wildcard inventory and inspector precedence remain in agents.commands.list.test.ts: builds a read-only mixed account inventory without exposing unavailable credentials; renders canonical account scopes, deduplicating aliases without merging wildcard diagnostics.

Sender gating remains in message-action-routing.test.ts: preserves no-context owner Discord admin actions through the shared runner. Official reads, downloads and stale-response suppression remain in channel-message-read-authority.integration.test.ts and slack-download-read-authority.integration.test.ts. Async alias success/refusal remains in imessage-reply-alias.integration.test.ts: matches a cold SQLite current-message binding through the registered iMessage adapter.

Retain rejected alias propagation and distinct scope/lifecycle gates. Consolidate inspection alias/lifecycle checks into raw-inspection filtering. Account normalization stays in account-id.test.ts and IRC setup; binding projection/touch stays in retained routing rows and session-binding-routing.worker.test.ts.

* test(cli): deslop s0247 tests

Consolidate same-phase mock count assertions using the existing helper. Preserve all cases and lifecycle, admission, and CLI boundary assertions; further removal would discard distinct coverage. CI-only validation: oxfmt, diff check, and plain oxlint.

* test(cli): trim s0247 fixture and assertion layers

Drop bootstrap trace inventories while preserving admission, environment, and state-manifest proof. Share Commander setup and assert the single busy JSON response directly. Remove secondary startup/probe call-shape assertions and the duplicate package no-respawn assertion.

Keep owner handoff identity, lifecycle timing, and all cases. Existing run-loop cases retain startup operation and host-control proof; service-cgroup timing retains the 85000ms deadline without repeating its log wording. CI-only: oxfmt, plain oxlint, and diff check passed.

* test(cli): remove duplicate s0247 lifecycle assertions

Remove post-outcome exit/count bookkeeping and secondary log/call-shape checks. Keep all interleaving cases, effect barriers, recovery commands, owner identity, and generation guards. Scope host-retirement instrumentation to its owning case.

The service-cgroup table retains foreground/supervisor lock metadata; the exited result retains the wrapper return-code proof. No test or production paths removed. CI-only static gates passed: oxfmt, plain oxlint, git diff --check. Shard remains below the requested reduction target.

* test(clickclack): deslop s0246 tests

Reuse activity and history fixtures, compact ordered progress and gateway assertions, and retain distinct authority, recovery, and transport cases.

The ambiguous failed activity POST test retains the shared enqueue error and successful-finalization proof from the deleted transport-error duplicate. The session-policy test retains the final routed session key instead of duplicating internal helper arguments.

CI-only campaign: plain oxlint, formatting, and diff checks passed; no tests or coverage executed. Safe reduction is 4819 to 4693 lines; further cuts would drop distinct boundary coverage.

* test(clickclack): consolidate s0246 owner suites

Merge thread reply cases into gateway and mention gating into inbound, preserving direct lookup, unreadable-message, policy-revalidation and authority cases. Remove only obsolete path and mock-baseline entries.

Keep HTTP nonce serialization and attachment lookup in uploads bytes, creates a nonce-keyed message, and reads its persisted attachment. Archive PATCH serialization remains in service-events: coalesces event bursts at the earliest deadline and reconciles the renamed session. Stream cancellation remains in provider-http-errors: releases complete/truncated body readers; the local error test asserts the exact 8 KiB bound.

Consolidate activity status/provenance and native privacy assertions into their existing lifecycle flows. Move text sanitization into the real beta sender case. Remove repeated prefix variants covered by identity and route-reply tests, and setup wrapper cases covered by the saved-config hook and setup-credential owner.

CI-only: plain oxlint, oxfmt and diff check pass; no tests or coverage run. This additional commit cuts 534 test lines; cumulative 4819 to 4159 (13.7 percent), below the requested 25 percent without dropping remaining distinct boundary proof.

* test(clickclack): reduce remaining s0246 fixtures

Consolidate command-menu capacity into the bounded-menu case and other-bot dispatch into the scoped-context case. Preserve readiness error clearing, replay warnings, all authority interleavings, and credential defaults.

Use a shared loopback server owner for the oversized JSON regression, trim unread fixture fields, table equivalent routing and bot-loop setups, and keep exact activity assertions with less repetition. Replace the stale createInboundCompletion import with a local typed completion fixture.

Plain oxlint, formatting and diff checks pass. No tests, builds or coverage were run. Additional test LOC: 4159 to 3985; cumulative 4819 to 3985 (17.3 percent), still below the 25 percent target.

* test(cron): deslop s0249 tests

Consolidate session receipts, scheduler fixtures, and maintenance invalidation setup while retaining every case and authority, recovery, and lifecycle assertion.

Remove redundant stream update call-shape proof covered by the retirement-reply-loss case durable and resident stopped-state assertions. The selected-PR autoFix case retains its final exact effect trace instead of repeating intermediate prefixes.

CI-only campaign: plain oxlint, oxfmt, and diff checks passed; runtime tests and coverage deferred to hosted CI. The remaining suites are already dense; preserve distinct boundaries rather than force the 25 percent line target.

* test(cron): remove duplicate s0249 recovery and alert coverage

Drop the receipt-identity block duplicated by service.recovery-identity.test.ts: recovers the pending legacy result after a predecessor, pending, or late edit. That suite retains exact receipts, timestamp ties, history, replacement state, and cleanup assertions.

Drop repeated failure-alert incident and fallback wiring cases. Retained coverage: failure-alerts.persistence tests for incident persistence and shared cooldown; failure-repair repairs once per failure streak; failure-alerts.outcome delivers to the queue session owner; service.failure-alert-notifications routes rejected alerts.

The real service.run-queue owned-running test and service.timer-maintenance active-due test cover active marker preservation before maintenance. Merge script cap and explicit timeout-reset checks into one payload lifecycle. Existing skill pins remain covered by isolated-agent/run.session-read full target/source preparation.

CI-only: formatting, diff check, and plain oxlint pass. No tests or coverage run. Cumulative shard reduction is 4997 to 4632 lines; the 25 percent target remains unmet rather than deleting distinct authority and durability proof.

* test(cron): reuse s0249 authority and session fixtures

Reuse the existing admission, operator-recovery, and real session fixtures; preserve all test cases and assertions. Remove unrelated owner and scheduled-policy data from runtime-authority storage fixtures and drop the obsolete recovery harness overrides.

Use the narrow createJob state contract directly instead of casting a partial object to CronServiceState. CI-only: formatting, diff check, and plain oxlint passed; no tests, coverage, or builds run. The cumulative shard is 4997 to 4571 lines, below the requested 25 percent reduction.

* test(gateway): deslop s0248 tests

Reuse hello, request, profile and barrier fixtures while retaining authority and transport assertions. Join the existing dispatcher completion instead of maintaining a second report-handler completion channel.

Remove the duplicate malformed-scope string case: the remaining rejects non-array scopes test covers the same validateConnectParams branch. Keep hello update redaction at the payload boundary instead of duplicating internal snapshot call-shape checks.

CI-only campaign: oxfmt, plain oxlint and diff-check passed; runtime tests and coverage intentionally deferred to hosted CI. Lines 4997 to 4895; cases 157 to 156. Below the 25 percent target because remaining cases cover distinct authority, cancellation, transport, accounting and lifecycle boundaries.

* test(gateway): remove redundant s0248 test layers

Keep auth-state coverage in auth-context.state.test.ts, queue grouping in queue.authority.test.ts, shared compression in ws-connection.serialized-json.test.ts, and report attempt fencing in update-report-run.test.ts and update-failure-report-transport.test.ts.

Keep hello route withdrawal and replacement assertions at sendGatewayHello; server-tailscale.test.ts owns route cleanup and exit. Remove obsolete membership probes whose mocked presence path is no longer read by hello. Consolidate UI descriptor cases and trim duplicate serializer, capability-inventory and internal-call assertions.

CI-only: formatting, plain oxlint and diff-check passed; no runtime tests or coverage run. Original shard 4997 lines to 4389 (12.2 percent reduction); the 25 percent target remains unmet without removing distinct retained boundaries.

* test(gateway): consolidate s0248 authority fixtures

Replace stacked auth-decision fixture factories with one typed builder and share the bootstrap failure setup across distinct failure rows. Reuse the canonical WebSocket fixture for suspension admission.

Remove retired symbol-issuer forgery scaffolding: request authority now belongs to a WeakMap. Keep copied-request rejection at that live boundary. The deleted equivalent-grant lifecycle replay remains covered by server-reload-handlers.identity-scopes.test.ts: preserves proxy runs until each revocation ends.

CI-only: formatting, plain oxlint and diff-check passed; no runtime tests or typecheck run. This pass removes 133 lines, reaching 4256 from original4997 (14.8 percent); the 25 percent target remains unmet.

* test(sessions): deslop s0251 tests

Remove duplicate retained-data and write-hold suites from branching. session-manager-retained-data.test.ts retains rejection, outer-transaction, suffix-query, reopened metadata, and deep JSON coverage. session-manager-write-hold.test.ts retains lock preparation, keyed replay, stale-generation, and descendant reparenting coverage.

Reuse existing message/tool fixtures without removing distinct agent-session assertions. Static lint, formatting, and diff checks pass; test execution deferred to hosted CI by campaign instruction.

* test(plugins): deslop s0250 tests

Share context-engine plugin fixtures and retain all activation, collision, cold-start and uninstall checks. Consolidate the two explicit-modern-declaration fallback cases into one table without deleting either case. Reuse the JSON fixture writer for native resolver tests.

Keep payload failure category, plugin identity, path and continuation assertions; remove exact internal diagnostic wording. All package, bundle, entrypoint and peer-link branches remain in the same named cases. CI-only shard: formatting, plain oxlint and diff check passed; no tests or coverage run. Reduction: 4677 to 4516 lines (3.44%); distinct lifecycle, auth and persistence contracts prevent an honest 25% cut.

* test(plugins): consolidate s0250 owner-boundary fixtures

Consolidate cohort filtering into one real inventory report and dynamic/declared migration ordering into one owner-order scenario. Remove the normal-stop replay covered by retains pending disposal in a live stop caller; retain the closed-startup interleaving.

Drop internal callback counts and a duplicate receipt predecessor dump while retaining actual SQLite row and authority checks. Remove the combined-symlink row covered by staging link to canonical and canonical directory link. Flatten single-child loader suites and simplify the native ESM probe program without dropping its imports or assertions.

CI-only: no tests, coverage, or typechecking run. Plain oxlint, formatting, and diff check passed. This follow-up removes 93 more lines: cumulative 4677 to 4426 (5.37%), below the requested 25%. No whole-file deletion has an equivalent keeper; distinct native-resource, compiled-artifact, authority and durable-write contracts remain.

* test(model-setup): preserve recovery proof after replay

* test(agents): retain OpenRouter fixture provider after replay

* test: retain distinct boundary proof identified in review

* test: retain remaining boundary fixtures after CI and review

* test(plugins): preserve payload diagnostic contracts

* test: drop incompatible fixture reductions identified by CI

* test(auto-reply): retain grandfathered mock factory shapes
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 cli CLI command changes extensions: clickclack 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