Skip to content

test(runtime): remove low-value tests (batch d513) - #183250

Merged
steipete merged 35 commits into
mainfrom
tcr/land-d513-1792902246
Oct 25, 2026
Merged

steipete merged 35 commits into
mainfrom
tcr/land-d513-1792902246

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces duplicate test layers, repeated fixture setup, and implementation-shaped assertions in campaign batch d513.

User Impact

No user-visible behavior or production-code change. Existing auth, lifecycle, delivery, and storage contracts remain the retention boundary; reductions that conflict with current main are omitted.

Why This Change Was Made

Replays the 30 requested campaign commits onto pinned main 2370228b7b4006abd696d21d2b426ad8dbd6aba3. All 30 were replayed, with conflicting file-level reductions dropped in favor of the current implementation. The UI shard has no net change: its ownership fixture conflicted and its remaining indicator rewrite imported a shared fixture outside this batch. LINE recovery and card-image suites were restored because their destination consolidation was dropped.

Evidence

CI-only mode: pnpm install --frozen-lockfile --prefer-offline, changed-file node_modules/.bin/oxfmt --write, plain node_modules/.bin/oxlint -c .oxlintrc.json, and git diff --check passed. No Vitest, check-changed, typecheck, coverage, or Testbox/Crabbox execution was run. Hosted openclaw/ci-gate selects the executable proof from changed files. Local test wall time: not run; CI seconds: pending.

The supplied shard reports explicitly say coverage was not run under CI-only mode; they contain no measured coverage totals. This PR does not claim the earlier generic coverage-drop gate was measured for these commits.

Final diff: 72 test/support files, +2,912 / -5,527 lines (net -2,615); production +0 / -0. Metadata additionally removes one obsolete line from config/test-mock-exports-baseline.txt: 73 total files, +2,912 / -5,528 (net -2,616). No CODEOWNERS patterns match the changed paths.

Per-shard actual replay inventory

LOC totals include changed test-support files. Declaration counts are a static textual census of it/test registrations, not executed or table-expanded case counts.

Shard Test/support LOC before → after Static declarations before → after Coverage totals
s0138 1805 → 1716 47 → 42 Not run (CI-only shard report)
s0139 3508 → 3383 87 → 84 Not run (CI-only shard report)
s0140 5043 → 4824 93 → 86 Not run (CI-only shard report)
s0141 4277 → 4023 96 → 92 Not run (CI-only shard report)
s0142 4195 → 3580 81 → 63 Not run (CI-only shard report)
s0143 0 → 0 0 → 0 Not run (CI-only shard report)
s0144 4497 → 4252 75 → 74 Not run (CI-only shard report)
s0145 3046 → 2926 31 → 31 Not run (CI-only shard report)
s0146 4922 → 4249 112 → 99 Not run (CI-only shard report)
s0147 635 → 573 19 → 17 Not run (CI-only shard report)
s0149 1412 → 1363 32 → 31 Not run (CI-only shard report)
s0150 3847 → 3683 111 → 109 Not run (CI-only shard report)

s0138: extensions/openai/realtime-quicksilver-delegation.test.ts, extensions/openai/realtime-quicksilver-gateway-direct.test.ts, extensions/openai/realtime-quicksilver-session-retirement.test.ts, extensions/openai/realtime-voice-provider-routing.test.ts

s0139: src/worker/embedded-agent-live.runtime.test.ts, src/worker/inference-stream.runtime.test.ts, src/worker/launch-descriptor.test.ts, src/worker/native-inference-stream.test.ts, src/worker/native-runtime.test-support.ts, src/worker/native-runtime.test.ts, src/worker/native-worker.integration.test.ts, src/worker/worker-rpc-clients.test.ts, src/worker/worker.chat-abort.test.ts

s0140: src/auto-reply/reply/agent-runner-execution-cli-admission.test.ts, src/auto-reply/reply/commands-context-report.test.ts, src/auto-reply/reply/commands-export-session.test.ts, src/auto-reply/reply/commands-plugin.scheduled-turns.test-support.ts, src/auto-reply/reply/commands-plugin.test.ts, src/auto-reply/reply/commands-reset-hooks.test.ts, src/auto-reply/reply/commands-status.test.ts, src/auto-reply/reply/dispatch-from-config.tts-stream.test.ts, src/auto-reply/reply/reply-run-registry.preparation.test.ts, src/auto-reply/reply/reply-turn-admission.test.ts

s0141: src/agents/bash-tools.exec.script-preflight.test.ts, src/agents/bash-tools.test.ts, src/agents/embedded-agent-runner.session-fork.test.ts, src/agents/github-tool-identity.test.ts, src/agents/model-catalog-view.test.ts, src/agents/model-fallback-candidates.test.ts, src/agents/model-fallback.probe.test.ts, src/agents/models-config.write-serialization.test.ts, src/agents/prepared-model-catalog.resources.test.ts

s0142: src/plugins/bundle-mcp.test.ts, src/plugins/current-plugin-metadata-snapshot.test.ts, src/plugins/host-hook-cleanup.session-store.test.ts, src/plugins/interactive.test.ts, src/plugins/management-service.workspace-inventory.test.ts, src/plugins/memory-runtime.owners.test.ts, src/plugins/plugin-peer-link.test.ts, src/plugins/provider-discovery.test.ts, src/plugins/tools.inspection.test.ts

s0143: No net files; omitted during replay.

s0144: src/gateway/github-user-identity.oidc.test.ts, src/gateway/operator-approval-placement-grants.test.ts, src/gateway/server-methods.suspension-continuations.test.ts, src/gateway/server.chat-history-cursor.test.ts, src/gateway/server.sessions.reset-acp-timeout.test.ts, src/gateway/session-row-projection.foreground.test.ts, src/gateway/session-sharing-preparation.test.ts, src/gateway/session-utils-owners.test.ts

s0145: src/gateway/github-publication-existing-pr.test.ts, src/gateway/http-utils.authorize-request.test.ts, src/gateway/server-aux-handlers.authority.test.ts, src/gateway/server-plugin-reload.memory.test-support.ts, src/gateway/server.config-security-policy.test.ts, src/gateway/server.requester-pause-authority.test.ts

s0146: src/gateway/chat-display-projection.test.ts, src/gateway/control-ui-assistant-media-policy.test.ts, src/gateway/operator-role-policy.test.ts, src/gateway/server-worker-placement-startup-maintenance.test.ts, src/gateway/server.sessions.create.worktrees.test.ts, src/gateway/session-sharing.worker.test.ts, src/gateway/session-utils.fs.test.ts

s0147: extensions/line/src/bot-message-context.test.ts

s0149: src/commands/agents.delete.test.ts, src/commands/sessions.test.ts

s0150: src/daemon/launchd-service-membership.test.ts, src/daemon/launchd-update-intent.test.ts, src/daemon/service-audit.test.ts, src/daemon/service-command-read.test.ts, src/daemon/service.test.ts, src/daemon/systemd-loaded-unit-inventory.test.ts, src/daemon/systemd-user-transport.test.ts

Conflict decisions

For each file below, the conflicting commit's edits to that file were dropped wholesale, keeping the prior replay/main version. Clean changes from other commits may remain in the same file. This preserves newer assertions and avoids mixing incompatible fixture generations.

  • extensions/openai/decision-provider.test.ts
  • extensions/openai/index.test.ts
  • extensions/openai/openai-chatgpt-device-code.test.ts
  • extensions/openai/speech-provider.test.ts
  • extensions/openai/speech-runtime.contract.test.ts
  • extensions/openai/realtime-voice-bridge-reconnect.test.ts
  • extensions/openai/token-sharing-oauth.runtime.test.ts
  • src/worker/launch-descriptor.test.ts
  • src/worker/native-inference-stream.test.ts
  • src/worker/worker-command.runtime.test.ts
  • src/worker/inference-stream.runtime.test.ts
  • src/worker/transcript-message.test.ts
  • src/worker/worker-connection.test.ts
  • src/auto-reply/reply/commands-plugin.test.ts
  • src/auto-reply/reply/commands-status.test.ts
  • src/agents/exec-auto-reviewer.test.ts
  • src/agents/openclaw-tools.media-factory-plan.test.ts
  • src/plugins/plugin-module-generation.bun.test-support.ts
  • src/plugins/hooks.before-tool-call.test.ts
  • src/gateway/server.sessions.create.spawn.test.ts
  • src/gateway/session-row-event-trees.test.ts
  • src/gateway/http-utils.authorize-request.test.ts
  • src/gateway/server-secrets-reload.model-runtime.test.ts
  • src/gateway/server.agent-database-recreation-product-proof.test.ts
  • extensions/line/src/auto-reply-delivery.test.ts
  • extensions/line/src/channel.rich-messages.test.ts
  • extensions/line/src/monitor.lifecycle.test.ts
  • extensions/line/src/row-overflow-delivery.loopback.test.ts
  • extensions/line/src/webhook-spool.test.ts
  • ui/src/test-helpers/app-sidebar-cases/session-ownership.ts
  • src/daemon/inspect.test.ts
  • src/commands/audit.test.ts
  • src/commands/backup-restore.test.ts
  • src/commands/doctor-gateway-services.test.ts
  • src/commands/doctor-session-sqlite.deferred-plugin.test.ts
  • ui/src/test-helpers/app-sidebar-cases/session-indicators.ts

The LINE recovery and card-image file deletions were additionally dropped because their intended destination rewrite was omitted. One exact obsolete mock-baseline entry is removed; no production seams changed.

Review and CI corrections

The first isolated review raised 19 retention concerns. Seven were accepted: restored the subscription-limit usage metadata, distinct consecutive text occurrence IDs, Browser-runtime forwarding, and the original plugin trust/ingress, profile-method classification, and Windows installer escaping suites. Restoring those suites conservatively retains their other assertions too.

Twelve were declined after checking current owning proof:

  • Standing-grant revocation remains in operator-approval-placement-grants.test.ts, “prepares without host SQL and rejects a parent revoked before transport handoff.”
  • Worktree provisioning/reuse remains in server.sessions.create-worktree-spawn.test.ts, “keyed worktree creation reuses its recorded base after reopening the registry”; dirty contents, HEAD and one registry record remain in worktrees/service.canonical-paths.test.ts.
  • Audio pacing/padding/pause remain in realtime-quicksilver-media.runtime.test.ts; direct adoption, silence and readiness remain in the direct-Gateway suite, with pacesInputAudio and real packet pacing in bridge/socket-worker tests.
  • Stale final settlement remains at infra/outbound/delivery-completion.test.ts, “admits current custody in one command without a preparatory read”; TTS keeps its dispatch outcome assertions.
  • Optional-tool deny policy remains in tools.optional.test.ts, “reprojects wildcard-selected optional descriptors through narrower allows and denies.”
  • The actual afterInvoke failure/retry remains in Telegram bot.test.ts, “releases plugin-owned callback dedupe when submitted text processing fails.”
  • Disabled-engine real turns remain in context-engine/registry.selection.test.ts, “plugin disable produces ordinary logical turns without registration or degradation warnings.”
  • Fallback manager ownership remains in memory-core manager-registry.reload.test.ts; independent registry isolation remains in memory-runtime.owners.test.ts. This also covers the independent-registry concern about the Gateway reload helper.
  • Hook-selected provider IDs are explicitly asserted in models-config.providers.implicit.outcomes.test.ts, “keeps canonical outcome authority when only its alias is selected.”
  • Managed-root and regular-host-link repair remain in plugin-peer-link.test.ts and install.test.ts, including dependencies and optionalDependencies.
  • The adjacent screenshot-history test retains exact messages and input immutability; the removed expected replay window was generated by the same implementation helper, while the cost test retains byte/encoding bounds.

Initial hosted CI identified four replay type errors: mixed callback return paths, an overly broad terminal stop reason, generic RPC option coercion, and Vitest object-table inference. Each was corrected from the logs without local typechecks or test execution. New-head CI owns confirmation.

The second hosted run exposed a fixture-ordering regression: the consolidated no-SQL assertion warmed placement-preservation state before the concurrency spy was installed, so all three intended interleavings were bypassed. The no-SQL assertion is restored to an independent state fixture; cold claim/release/dispatch interleavings and their assertions remain intact. No retries, sleeps, timeout increases, skips, or weakened assertions were added.

The preservation lane passed on the next head. That run additionally found type-aware consistent-return lint in the interactive fixture and a mock-export ratchet requiring the auth mock's isolation rationale. The final exhaustive channel case is now an explicit default return, and the auth mock records why outcomes are controlled. Assertions and fixtures are unchanged by this two-line correction.

The following ratchet run confirmed the auth annotation was recognized and required deleting its now-obsolete exact exception. The final baseline edit is shrink-only: one named ./auth.js factory fingerprint, with no new exceptions. The diagnostics and subsequent corrections remain hosted-CI proof, not a local test/typecheck claim.

Rebase closeout

Main advanced during the conformance wait and introduced one conflict through 34a8d5c04cb5 in the placement-maintenance fixture. Rebased the full 35-commit stack onto 2370228b7b4006abd696d21d2b426ad8dbd6aba3. The sole resolution retains the consolidated setDispatchMock: its current shared owner already supplies main's new subscribeOrphanWorkspaceChanges method. No reviewed contracts or fixes were dropped. git range-diff confirms the other 34 patches are identical and the sole delta is replacing that inline method with the helper-owned equivalent. Changed-file oxfmt, plain oxlint, and diff-check were repeated; prior-head CI remains historical evidence and fresh-head CI is required.

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 25, 2026 04:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T05:38:07.321382Z b016a0f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: openai size: XL labels Oct 25, 2026
@steipete
steipete disabled auto-merge October 25, 2026 04:41
@steipete
steipete enabled auto-merge (squash) October 25, 2026 04:45
@steipete
steipete disabled auto-merge October 25, 2026 04:54
@steipete
steipete enabled auto-merge (squash) October 25, 2026 04:57
@steipete
steipete disabled auto-merge October 25, 2026 05:06
@steipete
steipete enabled auto-merge (squash) October 25, 2026 05:08
@steipete
steipete disabled auto-merge October 25, 2026 05:15
@steipete
steipete enabled auto-merge (squash) October 25, 2026 05:17
@steipete
steipete disabled auto-merge October 25, 2026 05:32
Keep decision result translation and per-question refusal proof in src/decisions/clawrouter.integration.test.ts (evaluates the default/per-agent selector through the registered ClawRouter owner and prepared native HTTP route), with lossless conversion in src/decisions/compatibility.test.ts. Shared reasoning and rejected-count gates remain in extensions/clawrouter/decision-provider.test.ts; retain native OpenAI routing, criteria, valid 255-choice and malformed-response proof here.

Consolidate delegation settlement and device exchange tables. Retain Gateway audio adoption and error ownership while removing the shared audio-clock pause replay covered by realtime-quicksilver-media.runtime.test.ts (keeps queued audio paced after a five-second scheduler pause). Default GA audio policy remains in realtime-voice-browser-auth.test.ts. Speech snapshot POST/path checks run through the public runtime synthesis owner.

CI-only: formatting, plain oxlint and diff-check passed; no tests or coverage run. Additional reduction 4691 to 4450 lines; cumulative 4972 to 4450 (10.5%), below target. Retain distinct auth, protocol, timeout and teardown regression proof rather than cut it to meet the metric.
Consolidate first-request timeout/cancellation, owner-retirement boundaries and device exchange variants into branch tables. Refresh and reconnect controls use persisted credential inputs instead of repeating interactive login; PKCE completion retains registration, sharing and identity-only proof. Isolate refresh-token nonce fixtures from previous login state.

Keep reconnect socket-open and error/cancel synchronous while sharing pre-open setup. One reconnect scenario now proves both stale-event fencing and fresh tool-call ownership. Join the sideband rejection and reentrant retirement setup without losing the distinct assertions. Foreign-provider cache rejection executes once instead of replaying in every native-route row.

Compared public Gateway lifecycle cases with sibling error, bridge-lifecycle, failure and transcript-publication suites: those use different owners or opaque-model finalization and cannot replace the retained public session.closed contracts. No entire file was redundant and no retired subject was found.

CI-only: formatting, plain oxlint and diff-check passed; no tests/build/coverage/typecheck run. Additional reduction 4450 to 4378 lines; cumulative 4972 to 4378 (11.9%). The 25% target remains unmet; do not delete unique authority, protocol or lifecycle proof to manufacture it.
Consolidate worker command fixtures, inherited-field candidates, native stream events, and live event construction while retaining every test case and distinct authority, privacy, replay, and lifecycle assertion.

The GitHub field assertion is redundant with the whole-descriptor equality in round-trips turn-bound GitHub identity without adding it to worker admission. Keep the hash-pinned historical pre-prompt-context parser unchanged.

CI-only validation: plain oxlint, oxfmt, and git diff --check. No test, coverage, or build commands run. Reduction is below the 25% target because the remaining suites protect distinct boundary behavior.
Remove the stale env-read fixture proof: native runtime receives resolved credentials, while the old counter only observed its own test helper. Preserve missing-credential rejection before workspace access.

Use harness-owned cleanup and minimal command descriptors. Replace speculative exec reject-or-deny handling with exact current parser assertions. Remove the replay expected value computed by production itself; independent frame-budget and serialization-work checks remain. Content identity stays covered by fits observed screenshot history without changing durable messages; occurrence identity stays covered by keeps distinct reasoning occurrences through bounded worker payloads.

CI-only: plain oxlint, oxfmt, and git diff --check pass. No tests, coverage, or builds run. All test cases retained; the 25 percent target remains unmet because sibling coverage does not replace the remaining security, lifecycle, or durability boundaries.
Share real owner flows for signed text/thinking/tool arguments, screenshot retention/invalidation, and native resource settlement/revocation. Fold concurrent native runtime isolation into the existing real HTTP sentinel test, keeping survivor-after-close, credentials, cwd, and context assertions. Keep global registry independence in the retained isolated snapshot probe and remove its unused isolation branch.

Consolidate connection event fixtures and cleanup ownership. Remove the command-only Browser argument-shape test; behavioral Browser attachment remains in browser-runtime.test.ts uses the build-composed Browser runtime without filesystem discovery, and worker.runtime.test.ts settles Browser, computer, and transcript owners concurrently before finishing.

CI-only: plain oxlint, oxfmt, and git diff --check passed; no tests, coverage, or builds run. Listed shard is 4988 lines versus original 5251; the exclusive native-runtime helper also shrinks from 69 to 45. The 25 percent target remains unmet without dropping distinct protected contracts.
Reuse export templates and plugin load/disposal setup without changing boundary assertions. Remove multiline normalization replays covered by commands-registry-normalize.skill-payload.test.ts: preserves free-text arguments while retaining other commands' multiline policies. Keep origin routing and all distinct admission, custody, recovery, permission, and delivery cases. CI-only static validation: oxfmt, oxlint, and diff check; runtime proof deferred to hosted CI. Reduction is below target because remaining cases protect distinct behavior.
Keep ACP reset and stream delivery branches in parameterized cases; compact small fixtures and remove redundant internal wiring assertions. Export round-trip retains complete payload equality; display projection is covered by plugins/inline-view.test.ts, preserves the entire record without a renderer and never admits unbound MCP data. Preserve every authority, custody, and recovery assertion. CI-only checks: oxfmt, plain oxlint, diff check. No tests run; reduction remains below the requested 25 percent.
Remove non-plugin dispatch replay covered by commands-plugin.native-subagents.test.ts, does not rematch a non-plugin catalog decision from command-looking text. Remove stale settlement replay covered by infra/outbound/delivery-completion.test.ts, admits current custody in one command without a preparatory read. Remove ancestor classification replay covered by subagents/registry/subagent-list.test.ts, shows finished ancestors as done while suspended child results remain available; commands-status-subagents.test.ts retains renderer count proof.

Consolidate visible and queued recovery waits into the adopted-source case while retaining leaf propagation. Fold distinct direct-entry reset clearing into the durable target reset case. No production changes. CI-only static checks: oxfmt, plain oxlint, git diff --check. No tests run. Reduction remains below 25 percent because remaining cases protect distinct behavior.
Remove copied shell-policy, cancellation, and timeout layers retained by exec-auto-review.stress.test.ts. Keep all 12 malformed-response variants explicitly, plus the enhanced risk, sanitization, and concurrent authority checks.

Remove the copied managed credential isolation suite: github-managed-credential.test.ts retains the same issuer isolation, endpoint-change, pinned credential, mismatch, scope, YAML privacy, and tokenless-profile cases. Both sibling keepers remain in the same agents-core project.

Consolidate SQLite URI checks and repeated catalog/probe fixtures without dropping distinct lifecycle, authorization, or durability assertions. Shard LOC 6118 to 5517; remaining cases prevent an honest 25 percent cut. CI-only: formatting, plain oxlint, and diff checks passed; tests and coverage deferred to hosted CI.
Replace repeated mixed-failure stress with one sanitizer case per failure branch; exec-auto-review.stress.test.ts retains concurrent failure isolation. Reuse the typed reviewer harness and inline the single-use SQLite spawn fixture.

Remove internal catalog enumeration instrumentation, excess rows, and redundant invocation metadata while preserving output-based snapshot behavior and read-only provider-scoped acquisition. Consolidate authored inventory and private-write/cache-repair lifecycles, and trim fixture-only SQLite reopen proof.

Keep fallback probe outcomes, ordering, cooldown flags, and suspension settlement; model-fallback.test.ts and model-fallback.run-embedded.e2e.test.ts retain final-attempt and routing provenance coverage, while model-fallback-observation.test.ts owns diagnostic privacy. Remove inert mocked usage stats and duplicate diagnostic payload assertions.

CI-only validation: plain oxlint, oxfmt, and git diff --check passed. No tests or coverage run. Additional reduction 5517 to 5311 lines; cumulative 6118 to 5311, below the 25 percent target because remaining distinct contracts are retained.
Reuse the provider metadata and media fixture builders, consolidate preparation-throw sanitization with the existing failure table, and flatten nested prompt assertion scaffolding without changing its count, sentinel, privacy, or option checks.

Extend the private models cache lifecycle with external-write invalidation and assert regenerated bytes instead of a planner call count. Keep concurrent-write serialization and winning-model output checks. Reuse existing spawn input types and Node immediate promises without changing mock settlement.

Remove redundant warning wording and cache-hit replay variants while retaining invalid primary and fallback filtering, generation invalidation, and idempotent resolved routes. No further duplicated sibling layers or obsolete test subjects found.

CI-only: formatting, plain oxlint, and diff checks passed; no tests or coverage run. Additional 5311 to 5248 lines; cumulative 6118 to 5248. The 25 percent target remains unmet because further identified candidates protect distinct authority, wire-format, lifecycle, or durability behavior.
Remove duplicate thinking metadata tests retained in session-utils.metadata-perf.test.ts. Memory registry isolation remains covered by memory-runtime.owners.test.ts: drains the actual managed embedding owner before replacement. Session pagination remains covered by server.sessions.list-changed.test.ts: sessions.list uses persisted usage and selected model fields.

Keep generic profile failure dispatch proof and method registry classification instead of per-method failure replays. Preserve distinct authority, redaction immutability, execution admission, recovery and ordering assertions. CI-only: formatting, plain oxlint and diff checks; no tests run.
Keep HTTP recovery in auto-reply-delivery.test.ts and card normalization on the row-overflow-delivery.loopback.test.ts wire. Carry malformed receipts, unsupported image URLs and reply transport cases into those keepers.

Remove copied upgrade migration cases from webhook-spool.test.ts; webhook-spool-migration.test.ts retains the interrupted migration, dead-letter fences and lane-order assertions. The loopback select-delivery test retains overflow choices without repeated card prose.

Consolidate group/room and missing-image fixtures without removing their expanded cases. Remove the unused media-facts forwarding mock and stale mock-baseline entries for the deleted card suite. CI-only: formatting, plain oxlint and diff checks passed; runtime proof deferred to hosted CI.
Keep worktree provisioning/base reuse in server.sessions.create-worktree-spawn's keyed registry-reopen test; dirty checkout and HEAD preservation stay in service.canonical-paths.

Keep maintenance provider protection in session-accessor.sqlite-maintenance-worker's automatic planning test and concurrent lifecycle maintenance here; stop retries remain in server-worker-placement-startup. Reuse existing startup fixture owners.

Keep bounded model policy reload in operator-run-authority.worker's profile capture test. Carry identity, denial, config reload and display assertions into retained boundary cases.

Keep oversized metadata extraction in session-transcript-record-parser and metadata projection in session-transcript-message/readers. Archive precedence remains in session-transcript-readers and newest archive selection remains here.
Drop copied canvas wrapper expectations, profile resolver call-shapes, and provider schema rendering replay; formatter coverage remains in assistant-request-failure-copy. Keep Gateway privacy, partial-output and idempotence checks.

Consolidate preservation recaptures into concurrent maintenance coverage and unbounded model updates into the existing model authority flow. Fold capped tail reads and PDF preservation into real reset/archive recovery cases.

Preview ordering and work bounds remain tested here; visibility and truncation are owned by session-display-projection tests. Marker metadata remains covered by session-transcript-message and readers tests. No production changes or test execution.
Port shard s0143 commits 5058539e11c26136773572c1a448e56a99f59925 and 767cbbb423d31170ecc8a6052ae0cdf60982a55d onto the campaign lane.

Consolidate indicator fixtures and ownership menu assertions. Keep the newer shared fixture unchanged. Retain attention details and inline ownership avatar cases because the lane already removed their duplicate sibling implementations; the duplicate presence-card case is already absent.

CI-only proof: oxlint, oxfmt --check, and git diff --check exited 0. Independent source review found no actionable P0-P2 findings. All 17 cases in the two edited suites are retained. No runtime tests or coverage were run; affected-test execution belongs to landing PR CI.
Remove the copied service-absence suite from service.test.ts. The same stale-unit, missing-manager, system-unit fallback, revoked/expired binding, and strict-absence cases remain in src/daemon/service-absence.test.ts, including all refusal and no-LoadUnit assertions.

Consolidate Windows installer defaults, launcher decoding, XML-create assertions, and repeated input/round-trip fixtures without removing its behaviors. CI-only campaign: plain oxlint, oxfmt, and diff checks passed; no tests or coverage run. Shard line reduction remains below the 25% target to retain distinct ownership, lifecycle, diagnostic, and durability checks.
Reduce native CLI mode/root matrix to branch representatives; root route tests retain forced/private manager coverage. Remove marker-only ancestry replays: launchd membership is decided by native membership and PID ancestry, with the remaining ancestor, external, native-inside/unknown, and legacy-target cases retaining their assertions.

Share child lifecycle, strict command readers, inventory fixtures, expected service records, and stop setup. Remove redundant internal call-shape assertions while retaining observable outcomes, identity refusals, cleanup, deadlines, secret redaction, and no-fallback checks. No production or test-support changes.

CI-only: oxfmt, plain oxlint, and git diff --check passed. No tests, coverage, or builds run. Additional cut is 177 lines; cumulative s0150 total is 5157 from 5617 (-8.2%), below the requested 25% because further identified removals lost distinct boundary proof.
Keep Windows inline provenance in the quoted environment install/read round trip and managed-env exposure in service-audit.test.ts reports only exposed values for source. Remove their repeated composition test from the installer suite.

Keep argument escaping in cmd-argv.test.ts round-trips mixed command lines. The installer still checks environment metacharacter escaping, literal readback, cwd, CR/LF rejection, principals, registration and rollback.

CI-only validation: plain oxlint exited 0, oxfmt and diff check passed. No tests or builds run. Additional cut: 44 lines. Cumulative shard 5617 to 5113; the requested 25% reduction is still unmet.
Factor repeated session, archive-manifest, CLI-error, shared-workspace and service assertions. Reuse deferred-plugin fixture aliases. Preserve all 117 declarations and 200 expanded cases, including authority, persistence, replay, redaction and lifecycle boundaries.

Reduce shard LOC from 5761 to 5709 (0.9%); further structural cuts would remove distinct behavior. CI-only: oxfmt, plain oxlint and diff-check pass; no test or coverage runs. Existing missing backup-archive support and gateway native-helper exports remain coordinator follow-ups.
Keep legacy-service cleanup in doctor-gateway-legacy-services.test.ts and runtime/consent preview in doctor-gateway-service-preview.test.ts. Keep missing-retained-source recovery in doctor-session-sqlite.missing-retained-source.test.ts. These siblings exercise the same entrypoints and retain the removed assertions.

Retain locked-harness precedence in session-runtime-compat.test.ts and status.summary.runtime.test.ts. Remove backup creation-only fixtures already protected by src/infra/backup-create.test.ts exclusion and nested-agent restore cases; keep restore-specific manifest, durable-file, and relative-link assertions. Consolidate audit serialization and bound checks and remove vacuous JSON absence checks.

Additional 677 lines removed; original shard 5761 to 5032 (-12.7%), below 25% because remaining custody, authority and recovery paths are distinct. Static declarations 117 to 104 and expanded cases 200 to 171. CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run.
Restore LINE suites whose destination consolidation was dropped during replay. Drop the sidebar indicator rewrite because its shared fixture is outside this batch. CI-only: oxfmt, plain oxlint, and diff-check pass; hosted CI owns execution proof.
Restore independently useful auth, ingress, installer, model-quota, and occurrence identity proof after review. Correct the four hosted-CI type errors in the replay fixtures. Plain oxlint, formatting, and diff checks pass; isolated review of this corrective delta is clean. Runtime and typecheck confirmation remain hosted CI only.
Move the no-caller-thread-SQL proof back to a separate state fixture. Prewarming preservation before installing the concurrency observer prevented claim/release/dispatch interleavings. Retain all assertions and restore the independent proof. Formatting, plain oxlint, diff-check, and isolated review pass; hosted CI owns runtime proof.
Address hosted lint and mock-export ratchet diagnostics without changing test inputs or assertions. Formatting, plain oxlint, diff-check, and isolated review pass; hosted CI remains the runtime proof.
Remove the exact obsolete auth mock fingerprint requested by CI after its isolation rationale was documented. Shrink-only metadata; no code, assertions, or new exceptions. Plain lint, diff-check, and isolated review pass.
@steipete
steipete force-pushed the tcr/land-d513-1792902246 branch from 11e2249 to b016a0f Compare October 25, 2026 05:35
@steipete
steipete enabled auto-merge (squash) October 25, 2026 05:35
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates test fixtures and removes duplicate assertions while preserving coverage in existing owner suites.

Example: A native runtime finishes successfully or throws during a turn.

  • Before: Separate tests check resource cleanup and escaped-stream revocation.
  • After: One lifecycle test checks both outcomes, cleanup, and revocation.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test maintenance with retained boundary coverage and passing changed-test lanes; evidence remains harness-level, with no measured coverage or speed claim.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only PR changes no shipped behavior; current-head CI supplies executable test validation rather than a product demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated setup and implementation-shaped assertions while keeping distinct behavior at existing owners.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored test cleanup open. No actionable correctness or security findings remain; current-head changed-test lanes pass, while PostgreSQL conformance and the aggregate CI gate remain pending.

Priority: P3
Reviewed head: b016a0f7b0dffeebec421f6208f4565b9df9e45f

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed tests feed synthetic inputs through agent, Gateway, plugin, worker, channel, and daemon owners and assert their observable outcomes.

flowchart LR
  A[Test scenarios] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Transport and state boundaries]
  D --> E[Outcome assertions]
Loading

Technical review

Best possible solution:

Retain the consolidated owner-level tests and merge through the existing CI gates once they finish.

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

This PR reports no runtime bug; source inspection confirms a test-only cleanup, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

Consolidating fixtures and retaining distinct contracts in existing owner suites fits the repository's testing policy without introducing production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -2615, Other -1. Total -2616 across 73 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 72 2899 5514 -2615
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 73 2899 5515 -2616

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +0/-0; tests/support +2,899/-5,514 The reduction comes from fixture consolidation and duplicate-proof removal; it establishes no measured runtime or coverage improvement.

Labels

Label changes:

  • add P3: This is test maintenance with no production behavior change or urgent user-facing defect.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is test maintenance with no production behavior change or urgent user-facing defect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 25, 2026, 1:53 AM ET / 05:53 UTC.

@steipete
steipete merged commit 612ec03 into main Oct 25, 2026
138 checks passed
@steipete
steipete deleted the tcr/land-d513-1792902246 branch October 25, 2026 05:55
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
* test(openai): consolidate s0138 owner-boundary proof

Keep decision result translation and per-question refusal proof in src/decisions/clawrouter.integration.test.ts (evaluates the default/per-agent selector through the registered ClawRouter owner and prepared native HTTP route), with lossless conversion in src/decisions/compatibility.test.ts. Shared reasoning and rejected-count gates remain in extensions/clawrouter/decision-provider.test.ts; retain native OpenAI routing, criteria, valid 255-choice and malformed-response proof here.

Consolidate delegation settlement and device exchange tables. Retain Gateway audio adoption and error ownership while removing the shared audio-clock pause replay covered by realtime-quicksilver-media.runtime.test.ts (keeps queued audio paced after a five-second scheduler pause). Default GA audio policy remains in realtime-voice-browser-auth.test.ts. Speech snapshot POST/path checks run through the public runtime synthesis owner.

CI-only: formatting, plain oxlint and diff-check passed; no tests or coverage run. Additional reduction 4691 to 4450 lines; cumulative 4972 to 4450 (10.5%), below target. Retain distinct auth, protocol, timeout and teardown regression proof rather than cut it to meet the metric.

* test(openai): consolidate s0138 lifecycle fixtures

Consolidate first-request timeout/cancellation, owner-retirement boundaries and device exchange variants into branch tables. Refresh and reconnect controls use persisted credential inputs instead of repeating interactive login; PKCE completion retains registration, sharing and identity-only proof. Isolate refresh-token nonce fixtures from previous login state.

Keep reconnect socket-open and error/cancel synchronous while sharing pre-open setup. One reconnect scenario now proves both stale-event fencing and fresh tool-call ownership. Join the sideband rejection and reentrant retirement setup without losing the distinct assertions. Foreign-provider cache rejection executes once instead of replaying in every native-route row.

Compared public Gateway lifecycle cases with sibling error, bridge-lifecycle, failure and transcript-publication suites: those use different owners or opaque-model finalization and cannot replace the retained public session.closed contracts. No entire file was redundant and no retired subject was found.

CI-only: formatting, plain oxlint and diff-check passed; no tests/build/coverage/typecheck run. Additional reduction 4450 to 4378 lines; cumulative 4972 to 4378 (11.9%). The 25% target remains unmet; do not delete unique authority, protocol or lifecycle proof to manufacture it.

* test(worker): deslop s0139 tests

Consolidate worker command fixtures, inherited-field candidates, native stream events, and live event construction while retaining every test case and distinct authority, privacy, replay, and lifecycle assertion.

The GitHub field assertion is redundant with the whole-descriptor equality in round-trips turn-bound GitHub identity without adding it to worker admission. Keep the hash-pinned historical pre-prompt-context parser unchanged.

CI-only validation: plain oxlint, oxfmt, and git diff --check. No test, coverage, or build commands run. Reduction is below the 25% target because the remaining suites protect distinct boundary behavior.

* test(worker): reduce s0139 fixtures and duplicate checks

Remove the stale env-read fixture proof: native runtime receives resolved credentials, while the old counter only observed its own test helper. Preserve missing-credential rejection before workspace access.

Use harness-owned cleanup and minimal command descriptors. Replace speculative exec reject-or-deny handling with exact current parser assertions. Remove the replay expected value computed by production itself; independent frame-budget and serialization-work checks remain. Content identity stays covered by fits observed screenshot history without changing durable messages; occurrence identity stays covered by keeps distinct reasoning occurrences through bounded worker payloads.

CI-only: plain oxlint, oxfmt, and git diff --check pass. No tests, coverage, or builds run. All test cases retained; the 25 percent target remains unmet because sibling coverage does not replace the remaining security, lifecycle, or durability boundaries.

* test(worker): consolidate s0139 lifecycle and stream proofs

Share real owner flows for signed text/thinking/tool arguments, screenshot retention/invalidation, and native resource settlement/revocation. Fold concurrent native runtime isolation into the existing real HTTP sentinel test, keeping survivor-after-close, credentials, cwd, and context assertions. Keep global registry independence in the retained isolated snapshot probe and remove its unused isolation branch.

Consolidate connection event fixtures and cleanup ownership. Remove the command-only Browser argument-shape test; behavioral Browser attachment remains in browser-runtime.test.ts uses the build-composed Browser runtime without filesystem discovery, and worker.runtime.test.ts settles Browser, computer, and transcript owners concurrently before finishing.

CI-only: plain oxlint, oxfmt, and git diff --check passed; no tests, coverage, or builds run. Listed shard is 4988 lines versus original 5251; the exclusive native-runtime helper also shrinks from 69 to 45. The 25 percent target remains unmet without dropping distinct protected contracts.

* test(auto-reply): deslop s0140 tests

Reuse export templates and plugin load/disposal setup without changing boundary assertions. Remove multiline normalization replays covered by commands-registry-normalize.skill-payload.test.ts: preserves free-text arguments while retaining other commands' multiline policies. Keep origin routing and all distinct admission, custody, recovery, permission, and delivery cases. CI-only static validation: oxfmt, oxlint, and diff check; runtime proof deferred to hosted CI. Reduction is below target because remaining cases protect distinct behavior.

* test(auto-reply): consolidate s0140 fixtures and assertions

Keep ACP reset and stream delivery branches in parameterized cases; compact small fixtures and remove redundant internal wiring assertions. Export round-trip retains complete payload equality; display projection is covered by plugins/inline-view.test.ts, preserves the entire record without a renderer and never admits unbound MCP data. Preserve every authority, custody, and recovery assertion. CI-only checks: oxfmt, plain oxlint, diff check. No tests run; reduction remains below the requested 25 percent.

* test(auto-reply): remove s0140 owner-layer replays

Remove non-plugin dispatch replay covered by commands-plugin.native-subagents.test.ts, does not rematch a non-plugin catalog decision from command-looking text. Remove stale settlement replay covered by infra/outbound/delivery-completion.test.ts, admits current custody in one command without a preparatory read. Remove ancestor classification replay covered by subagents/registry/subagent-list.test.ts, shows finished ancestors as done while suspended child results remain available; commands-status-subagents.test.ts retains renderer count proof.

Consolidate visible and queued recovery waits into the adopted-source case while retaining leaf propagation. Fold distinct direct-entry reset clearing into the durable target reset case. No production changes. CI-only static checks: oxfmt, plain oxlint, git diff --check. No tests run. Reduction remains below 25 percent because remaining cases protect distinct behavior.

* test(agents): deslop s0141 tests

Remove copied shell-policy, cancellation, and timeout layers retained by exec-auto-review.stress.test.ts. Keep all 12 malformed-response variants explicitly, plus the enhanced risk, sanitization, and concurrent authority checks.

Remove the copied managed credential isolation suite: github-managed-credential.test.ts retains the same issuer isolation, endpoint-change, pinned credential, mismatch, scope, YAML privacy, and tokenless-profile cases. Both sibling keepers remain in the same agents-core project.

Consolidate SQLite URI checks and repeated catalog/probe fixtures without dropping distinct lifecycle, authorization, or durability assertions. Shard LOC 6118 to 5517; remaining cases prevent an honest 25 percent cut. CI-only: formatting, plain oxlint, and diff checks passed; tests and coverage deferred to hosted CI.

* test(agents): reduce remaining s0141 fixture layers

Replace repeated mixed-failure stress with one sanitizer case per failure branch; exec-auto-review.stress.test.ts retains concurrent failure isolation. Reuse the typed reviewer harness and inline the single-use SQLite spawn fixture.

Remove internal catalog enumeration instrumentation, excess rows, and redundant invocation metadata while preserving output-based snapshot behavior and read-only provider-scoped acquisition. Consolidate authored inventory and private-write/cache-repair lifecycles, and trim fixture-only SQLite reopen proof.

Keep fallback probe outcomes, ordering, cooldown flags, and suspension settlement; model-fallback.test.ts and model-fallback.run-embedded.e2e.test.ts retain final-attempt and routing provenance coverage, while model-fallback-observation.test.ts owns diagnostic privacy. Remove inert mocked usage stats and duplicate diagnostic payload assertions.

CI-only validation: plain oxlint, oxfmt, and git diff --check passed. No tests or coverage run. Additional reduction 5517 to 5311 lines; cumulative 6118 to 5311, below the 25 percent target because remaining distinct contracts are retained.

* test(agents): compact s0141 fixtures and branch assertions

Reuse the provider metadata and media fixture builders, consolidate preparation-throw sanitization with the existing failure table, and flatten nested prompt assertion scaffolding without changing its count, sentinel, privacy, or option checks.

Extend the private models cache lifecycle with external-write invalidation and assert regenerated bytes instead of a planner call count. Keep concurrent-write serialization and winning-model output checks. Reuse existing spawn input types and Node immediate promises without changing mock settlement.

Remove redundant warning wording and cache-hit replay variants while retaining invalid primary and fallback filtering, generation invalidation, and idempotent resolved routes. No further duplicated sibling layers or obsolete test subjects found.

CI-only: formatting, plain oxlint, and diff checks passed; no tests or coverage run. Additional 5311 to 5248 lines; cumulative 6118 to 5248. The 25 percent target remains unmet because further identified candidates protect distinct authority, wire-format, lifecycle, or durability behavior.

* test(plugins): deslop s0142 tests

Share repeated catalog, transport, trust and inspection fixtures; remove duplicate private-state assertions while retaining behavioral dispatch and tool execution checks.

The provider-normalization alias case retains plugin-id mapping coverage after removing the standalone single-provider replay. Preserve every distinct authority, containment, lifecycle, cleanup and transport case.

* test(plugins): consolidate s0142 owner-boundary proof

Remove repeated integration layers and consolidate same-path fixtures and assertions. Preserve approval, redaction, retirement, containment, scope and public plugin ingress boundaries.

Keepers: tools.optional.test.ts (reprojects wildcard-selected optional descriptors through narrower allows and denies); onboard-config.test.ts (defaults to full tools and preserves independent policies on rerun); Telegram bot.test.ts (releases plugin-owned callback dedupe when submitted text processing fails); agent-bundle-mcp-runtime.agent-bundle.test.ts (discovers an installed Agent Plugins bundle and executes its real stdio tool).

Keepers: install.test.ts (relinks host dependencies); doctor-plugin-host-links.test.ts (reports a malformed registered package and still repairs its valid sibling); memory-core manager-registry.reload.test.ts (retires a fallback-backed manager when its primary adapter is replaced); models-config.providers.implicit.outcomes.test.ts (keeps canonical outcome authority when only its alias is selected).

Private fingerprint-map assertions defer to manifest-registry-installed.test.ts (keeps frozen installed-index fingerprints process-stable without file signatures) and plugin-metadata-snapshot.test.ts (reuses an adopted snapshot across config objects until a lifecycle owner replaces it). Cache-clear survival, cloned provider/model identity, sanitized hook logging, and no-op/deferred session cleanup assertions now live in retained same-path cases.

* test(plugins): share s0142 lifecycle fixtures

Consolidate acknowledgment ordering with channel binding, generation checks with provider deduplication, Agent path validation with transport loading, and both session-store layouts in one shared table. Reuse canonical snapshot fixture policy construction and management config-write setup.

The context-engine registry.selection.test.ts case "plugin disable produces ordinary logical turns without registration or degradation warnings" keeps the removed logical-turn replay. Memory Core manager-registry.reload.test.ts keeps selective retirement of unaffected providers. Registry sibling isolation, pending acquisition, cleanup authority, persistence, trust denial and traversal checks remain in this shard.

* test(gateway): deslop s0144 tests

Remove duplicate worktree-selection cases from the spawn suite. The matching cases in server.sessions.create.worktree-selection.test.ts retain title selection during checkout, denied-model admission, nested and admin-selected cwd mapping, and non-admin setup-script policy.

Consolidate OIDC, cursor, reset, owner, and preview fixtures and assertions without dropping distinct authority or lifecycle cases. Preserve newcomer row/list behavior while removing JSON.stringify implementation instrumentation.

CI-only validation: oxfmt, plain oxlint, and git diff --check pass. Tests and coverage were intentionally not run.

* test(gateway): remove redundant s0144 proof layers

Reuse existing placement-policy and runtime-client fixtures and one OIDC state fixture. Consolidate email-only admission cases without losing expanded input coverage; keep one same-branch metadata and unqualified creator representative.

Remove cursor storage-helper replay already proven by the same case's public RPC reset, internal preview cache graph observations, and repeated sharing authorization probes. The retained stale-worker table and session-sharing-committed-read.test.ts keep committed authorization and no-SQL proof; the observer test keeps publication ordering.

The required-spawn creator case retains merged-owner ordering and involvement; the selected-person case now focuses on retaining the canonical selection beyond the facet limit. Preserve distinct security and lifecycle boundaries. CI-only: oxfmt, plain oxlint, and diff-check pass; no test runs.

* test(gateway): remove duplicate placement reversal case

The transport-handoff revocation test already proves approval-not-allow-always after reversing the parent. consumeAsync and validateAsync share the same production owner. Keep expiry, missing parent, missing placement, and transport-handoff authority assertions.

CI-only: plain oxlint, oxfmt, and git diff --check pass. No tests run. Further shard reduction remains below the requested target without removing distinct boundary behavior.

* test(gateway): deslop s0145 tests

* test(gateway): remove duplicate s0145 proof layers

Remove duplicate thinking metadata tests retained in session-utils.metadata-perf.test.ts. Memory registry isolation remains covered by memory-runtime.owners.test.ts: drains the actual managed embedding owner before replacement. Session pagination remains covered by server.sessions.list-changed.test.ts: sessions.list uses persisted usage and selected model fields.

Keep generic profile failure dispatch proof and method registry classification instead of per-method failure replays. Preserve distinct authority, redaction immutability, execution admission, recovery and ordering assertions. CI-only: formatting, plain oxlint and diff checks; no tests run.

* test(gateway): remove unused s0145 push hook

* test(line): deslop s0147 tests

Keep HTTP recovery in auto-reply-delivery.test.ts and card normalization on the row-overflow-delivery.loopback.test.ts wire. Carry malformed receipts, unsupported image URLs and reply transport cases into those keepers.

Remove copied upgrade migration cases from webhook-spool.test.ts; webhook-spool-migration.test.ts retains the interrupted migration, dead-letter fences and lane-order assertions. The loopback select-delivery test retains overflow choices without repeated card prose.

Consolidate group/room and missing-image fixtures without removing their expanded cases. Remove the unused media-facts forwarding mock and stale mock-baseline entries for the deleted card suite. CI-only: formatting, plain oxlint and diff checks passed; runtime proof deferred to hosted CI.

* test(gateway): deslop s0146 tests

* test(gateway): remove duplicate s0146 proof layers

Keep worktree provisioning/base reuse in server.sessions.create-worktree-spawn's keyed registry-reopen test; dirty checkout and HEAD preservation stay in service.canonical-paths.

Keep maintenance provider protection in session-accessor.sqlite-maintenance-worker's automatic planning test and concurrent lifecycle maintenance here; stop retries remain in server-worker-placement-startup. Reuse existing startup fixture owners.

Keep bounded model policy reload in operator-run-authority.worker's profile capture test. Carry identity, denial, config reload and display assertions into retained boundary cases.

Keep oversized metadata extraction in session-transcript-record-parser and metadata projection in session-transcript-message/readers. Archive precedence remains in session-transcript-readers and newest archive selection remains here.

* test(gateway): consolidate s0146 boundary fixtures

Drop copied canvas wrapper expectations, profile resolver call-shapes, and provider schema rendering replay; formatter coverage remains in assistant-request-failure-copy. Keep Gateway privacy, partial-output and idempotence checks.

Consolidate preservation recaptures into concurrent maintenance coverage and unbounded model updates into the existing model authority flow. Fold capped tail reads and PDF preservation into real reset/archive recovery cases.

Preview ordering and work bounds remain tested here; visibility and truncation are owned by session-display-projection tests. Marker metadata remains covered by session-transcript-message and readers tests. No production changes or test execution.

* test(ui): deslop s0143 tests

Port shard s0143 commits 5058539e11c26136773572c1a448e56a99f59925 and 767cbbb423d31170ecc8a6052ae0cdf60982a55d onto the campaign lane.

Consolidate indicator fixtures and ownership menu assertions. Keep the newer shared fixture unchanged. Retain attention details and inline ownership avatar cases because the lane already removed their duplicate sibling implementations; the duplicate presence-card case is already absent.

CI-only proof: oxlint, oxfmt --check, and git diff --check exited 0. Independent source review found no actionable P0-P2 findings. All 17 cases in the two edited suites are retained. No runtime tests or coverage were run; affected-test execution belongs to landing PR CI.

* test(daemon): deslop s0150 tests

Remove the copied service-absence suite from service.test.ts. The same stale-unit, missing-manager, system-unit fallback, revoked/expired binding, and strict-absence cases remain in src/daemon/service-absence.test.ts, including all refusal and no-LoadUnit assertions.

Consolidate Windows installer defaults, launcher decoding, XML-create assertions, and repeated input/round-trip fixtures without removing its behaviors. CI-only campaign: plain oxlint, oxfmt, and diff checks passed; no tests or coverage run. Shard line reduction remains below the 25% target to retain distinct ownership, lifecycle, diagnostic, and durability checks.

* test(daemon): consolidate s0150 boundary fixtures

Reduce native CLI mode/root matrix to branch representatives; root route tests retain forced/private manager coverage. Remove marker-only ancestry replays: launchd membership is decided by native membership and PID ancestry, with the remaining ancestor, external, native-inside/unknown, and legacy-target cases retaining their assertions.

Share child lifecycle, strict command readers, inventory fixtures, expected service records, and stop setup. Remove redundant internal call-shape assertions while retaining observable outcomes, identity refusals, cleanup, deadlines, secret redaction, and no-fallback checks. No production or test-support changes.

CI-only: oxfmt, plain oxlint, and git diff --check passed. No tests, coverage, or builds run. Additional cut is 177 lines; cumulative s0150 total is 5157 from 5617 (-8.2%), below the requested 25% because further identified removals lost distinct boundary proof.

* test(daemon): remove s0150 installer proof replays

Keep Windows inline provenance in the quoted environment install/read round trip and managed-env exposure in service-audit.test.ts reports only exposed values for source. Remove their repeated composition test from the installer suite.

Keep argument escaping in cmd-argv.test.ts round-trips mixed command lines. The installer still checks environment metacharacter escaping, literal readback, cwd, CR/LF rejection, principals, registration and rollback.

CI-only validation: plain oxlint exited 0, oxfmt and diff check passed. No tests or builds run. Additional cut: 44 lines. Cumulative shard 5617 to 5113; the requested 25% reduction is still unmet.

* test(commands): deslop s0149 tests

Factor repeated session, archive-manifest, CLI-error, shared-workspace and service assertions. Reuse deferred-plugin fixture aliases. Preserve all 117 declarations and 200 expanded cases, including authority, persistence, replay, redaction and lifecycle boundaries.

Reduce shard LOC from 5761 to 5709 (0.9%); further structural cuts would remove distinct behavior. CI-only: oxfmt, plain oxlint and diff-check pass; no test or coverage runs. Existing missing backup-archive support and gateway native-helper exports remain coordinator follow-ups.

* test(commands): remove duplicate s0149 test layers

Keep legacy-service cleanup in doctor-gateway-legacy-services.test.ts and runtime/consent preview in doctor-gateway-service-preview.test.ts. Keep missing-retained-source recovery in doctor-session-sqlite.missing-retained-source.test.ts. These siblings exercise the same entrypoints and retain the removed assertions.

Retain locked-harness precedence in session-runtime-compat.test.ts and status.summary.runtime.test.ts. Remove backup creation-only fixtures already protected by src/infra/backup-create.test.ts exclusion and nested-agent restore cases; keep restore-specific manifest, durable-file, and relative-link assertions. Consolidate audit serialization and bound checks and remove vacuous JSON absence checks.

Additional 677 lines removed; original shard 5761 to 5032 (-12.7%), below 25% because remaining custody, authority and recovery paths are distinct. Static declarations 117 to 104 and expanded cases 200 to 171. CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run.

* test: preserve current proof when dropping conflicted reductions

Restore LINE suites whose destination consolidation was dropped during replay. Drop the sidebar indicator rewrite because its shared fixture is outside this batch. CI-only: oxfmt, plain oxlint, and diff-check pass; hosted CI owns execution proof.

* test: retain boundary regressions and repair replay types

Restore independently useful auth, ingress, installer, model-quota, and occurrence identity proof after review. Correct the four hosted-CI type errors in the replay fixtures. Plain oxlint, formatting, and diff checks pass; isolated review of this corrective delta is clean. Runtime and typecheck confirmation remain hosted CI only.

* test(gateway): keep preservation interleaving cold

Move the no-caller-thread-SQL proof back to a separate state fixture. Prewarming preservation before installing the concurrency observer prevented claim/release/dispatch interleavings. Retain all assertions and restore the independent proof. Formatting, plain oxlint, diff-check, and isolated review pass; hosted CI owns runtime proof.

* test: clarify mock isolation and exhaustive dispatch return

Address hosted lint and mock-export ratchet diagnostics without changing test inputs or assertions. Formatting, plain oxlint, diff-check, and isolated review pass; hosted CI remains the runtime proof.

* test: prune documented auth mock baseline

Remove the exact obsolete auth mock fingerprint requested by CI after its isolation rationale was documented. Shrink-only metadata; no code, assertions, or new exceptions. Plain lint, diff-check, and isolated review pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: line Channel integration: line commands Command implementations extensions: openai 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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant