Skip to content

test(core,plugins): remove low-value tests (batch d504) - #183075

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d504-1792889282
Oct 25, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d504-1792889282

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Test fixtures and duplicated proof layers add maintenance cost without distinct behavioral coverage. This lands the safe current-main subset of campaign batch d504.

User Impact

No user-visible behavior or production code changes. Retained tests continue to own authority, privacy, persistence, protocol, recovery, and lifecycle contracts; this change consolidates setup and removes duplicate assertions/cases. No runtime speedup or newly measured coverage claim is made.

Evidence

  • Base pinned to fdad53b1bc1d66d98a11da12fb633a75f8285ecb; 29 source commits replayed fully or partially in the supplied order.
  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <55 changed files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <55 changed files>: exited 0.
  • git diff --check fdad53b1bc1d66d98a11da12fb633a75f8285ecb: passed.
  • CI-only operator instruction: no local Vitest, check-changed, tsgo, coverage, or Testbox runs. Hosted openclaw/ci-gate is the execution proof. Independent autoreview runs alongside CI.
  • Testbox IDs: none created. No UI changes or screenshots.
  • CODEOWNERS: none of the changed paths matches the current owned-path rules.

Actual replay size

Production: +0/-0 LOC. Tests and test support: +3417/-6837 LOC (net -3420), 55 files. Static declaration counts below count it/test registration syntax, not executed/expanded cases. Counts cover the files retained in this PR, not the original whole-shard inventory.

Shard Files Test/support LOC delta Static declarations before → after
s0041 3 +185/-415 15 → 11
s0042 7 +434/-907 75 → 69
s0043 2 +97/-170 22 → 21
s0044 4 +325/-602 53 → 50
s0045 4 +303/-504 60 → 55
s0046 7 +344/-767 79 → 73
s0047 4 +220/-306 32 → 30
s0048 7 +156/-508 81 → 76
s0049 4 +121/-252 57 → 51
s0050 5 +408/-912 80 → 69
s0051 2 +390/-636 22 → 22
s0052 6 +434/-858 104 → 90
s0040 0 skipped unchanged
Retained files by shard

s0041

  • src/infra/database-engine/inherited-auth.conformance.test.ts
  • src/infra/database-engine/reserved-incognito.conformance.test.ts
  • src/infra/database-engine/transcript-projection-flush.conformance.test.ts

s0042

  • src/agents/clawrouter-service-tier.integration.test.ts
  • src/agents/cli-credentials.test.ts
  • src/agents/embedded-agent-subscribe.directive-delivery.test.ts
  • src/agents/native-mcp-runtime.test.ts
  • src/agents/openclaw-tools.browser-plugin.integration.test.ts
  • src/agents/prepared-model-runtime.catalog-publication.test.ts
  • src/agents/requester-tool-policy.test.ts

s0043

  • src/cli/config-cli.integration.test.ts
  • src/cli/local-state-owner.process.test.ts

s0044

  • src/gateway/server-methods/chat-history-handler.test.ts
  • src/gateway/server-methods/chat.abort-authorization.test.ts
  • src/gateway/server-methods/requester-model-catalog.test.ts
  • src/gateway/server-methods/usage.sessions-usage-owner-attribution.integration.test.ts

s0045

  • src/infra/device-pairing-worker.test.ts
  • src/infra/package-update-activation-immutable.test.ts
  • src/infra/session-cost-usage-worker-io.test.ts
  • src/infra/update-candidate-rehearsal.resources.test.ts

s0046

  • src/gateway/github-publication.test-support.ts
  • src/gateway/node-invoke-plugin-policy.test.ts
  • src/gateway/server-methods.session-narrow-mutations.test.ts
  • src/gateway/server.agent-input-authority.test.ts
  • src/gateway/server.hooks.test.ts
  • src/gateway/server.subagent-stop-followup.product.test.ts
  • src/gateway/session-lifecycle-state.test.ts

s0047

  • src/commands/agents.commands.list.test.ts
  • src/commands/model-picker.test.ts
  • src/commands/sessions-tail.test.ts
  • src/commands/triage-target.test.ts

s0048

  • extensions/qa-lab/src/bus-server.test.ts
  • extensions/qa-lab/src/scenario-flow-runner-cron-proof.test.ts
  • extensions/qa-lab/src/scenario-flow-runner.test-support.ts
  • extensions/qa-lab/src/suite-runtime-flow.test.ts
  • extensions/qa-lab/src/suite.test.ts
  • extensions/qa-lab/src/test-file-scenario-command-lifecycle.test.ts
  • extensions/qa-lab/src/test-file-scenario-runner.docker.test.ts

s0049

  • src/agents/agent-tools-agent-config.test.ts
  • src/agents/cli-executable-identity.test.ts
  • src/agents/mcp-stdio-transport.test.ts
  • src/agents/prepared-model-runtime.remote-publication.test.ts

s0050

  • src/agents/embedded-agent-runner/run/attempt-client-tools.test.ts
  • src/agents/embedded-agent-runner/run/attempt-session-runtime-prepare.test.ts
  • src/agents/embedded-agent-runner/run/attempt-system-prompt.test.ts
  • src/agents/embedded-agent-runner/run/attempt.test.ts
  • src/agents/embedded-agent-runner/run/terminal-preparation.test.ts

s0051

  • extensions/codex/src/app-server/attempt-context.test.ts
  • extensions/codex/src/app-server/plugin-activation.test.ts

s0052

  • extensions/whatsapp/src/channel-outbound.test.ts
  • extensions/whatsapp/src/channel-react-action.test.ts
  • extensions/whatsapp/src/login-qr.test.ts
  • extensions/whatsapp/src/monitor-inbox.access-and-echo.test.ts
  • extensions/whatsapp/src/monitor-inbox.delivery-and-dedupe.test.ts
  • extensions/whatsapp/src/outbound-base.test.ts

Campaign coverage evidence

The supplied results/s0040.md through results/s0052.md reports explicitly say tests and coverage were not run under CI-only mode. They contain no measured coverage totals line to reproduce. The earlier generic ≤1% coverage description therefore is not claimed as measured evidence for this batch. Historical shard LOC/declaration inventories are superseded for this replay by the actual-diff table above.

Replay decisions

cc88e60f0f67 (s0040) was skipped entirely: all five files conflicted with newer main assertions or removed inline/helper scaffolding. For the remaining conflict-affected commits, the entire conflicting file hunk set was dropped and the pre-pick version retained, preserving newer main behavior and any earlier accepted batch changes. Clean independent files were retained. No production seam was removed.

Dropped file hunk sets by source commit:

  • 231d1a104d15: cli-output-framing, native-mcp-runtime.
  • 3902dd4ff6b8: cli-output-framing.
  • 5fa89f2e3164: database-engine/archive-restore.postgres, port-command.integration.
  • ceee8187700d: database-engine/port-command.integration, update-preflight.conformance.
  • 14a53b6c1f11: database-engine/archive-restore.postgres, port-command.integration, session-actor.conformance, update-preflight.conformance.
  • 456b603aa0ec: cli/plugins-authoring-command, plugins-install-config, run-main.command-dispatch, update-cli.
  • 6cf07312ad9b: cli/config-cli.integration, plugins-authoring-command, plugins-install-config, update-cli.
  • 090263b41441: infra/exec-approval-channel-runtime, exec-approval-forwarder, kysely-sync, sqlite-worker-shared-state.
  • bedc145ab010: infra/exec-approval-forwarder, sqlite-worker-shared-state.
  • f848fdbe279f: gateway/server-plugin-subagent-runtime, server.hooks.
  • 614f94cd084b: commands/auth-choice, backup-schedule, channels.remove.
  • 8a76fa55fac9: commands/auth-choice, backup-schedule.
  • fa18ec840eeb: commands/auth-choice, backup-schedule, channels.remove, doctor-config-preflight.admission.process, triage-target.
  • 3c7a05e701c5: gateway/server-methods/cron-stream-approval.integration, nodes, requester-cron-authority.integration, sessions-read-cache; also dropped the associated cron-stream support expansion because its callers were dropped.
  • 886f84c9e572: qa-lab/crabline-transport, evidence-gallery, scorecard-gap-report.
  • b97e2994d913, 1ee47284f814: qa-lab/crabline-transport, evidence-gallery.
  • 5826ce1e869e: agents/cli-auth-epoch, mcp-stdio-transport.
  • 278b2025bd2e: agents/agent-tools-agent-config.exec, bash-tools.exec-notify, cli-auth-epoch, cli-executable-identity, tool-surface-plan.
  • 2488c5715643: codex/compact, native-subagent-monitor, side-question support.
  • 7a1ec9311437: whatsapp/inbound.media, monitor-inbox.socket-lifecycle.
  • 2641114abf8c: embedded-agent-runner/assistant-failure, attempt.model-diagnostic-lifecycle, message-tool-terminal.
  • 584c0383445e: those same three files plus setup.

Some source deletions already matched main and yielded no diff (for example Code Mode and Codex projector duplicates); the remaining independent changes in those commits were retained. All other commits applied cleanly. Commit messages are preserved; this replay-decision section identifies any claims in source commit messages whose hunks were not retained.

Review and first-head CI follow-up

Independent review accepted two findings: retained-pending submitted-input recovery and real multirow conversation conformance have distinct SQLite/PostgreSQL value. Restored post-ready.conformance.test.ts completely to main. The restoration and the subsequent CI repairs passed fresh independent P0–P2 review.

Eight findings were rejected after source verification:

  • MCP views: the retained file's afterEach disposes every runtime; the runtime owner aborts lifecycle work and closes current sessions and native children.
  • All-store schema discovery: src/cli/update-cli/schema-preflight.test.ts retains the configured, retired, and custom-path discovery matrix. The higher-level target-schema cleanup was nevertheless dropped after CI exposed a separate fixture mismatch.
  • Custom streams: embedded-agent-runner/stream-resolution.test.ts retains Cloudflare boundary selection and refreshed runtime-auth call assertions.
  • MCP environment ownership: agent-bundle-mcp-runtime.agent-bundle.test.ts retains real user-owned PLUGIN_DATA collision proof.
  • Rich observations: the unchanged test caller already filters the helper to only message and wrong-edit-marker; the other variants were never registered.
  • SQLite key repair: doctor-session-incognito-key-repair.test.ts retains every key-bearing linkage, JSON projection, reopen, and idempotence assertions.
  • Activation record: expectUnchanged calls expectSelection, which still asserts read() equals the entire record.
  • Lifecycle clears: the retained spread-result assertion explicitly checks status, endedAt, and runtimeMs are undefined.

First-head CI run: https://github.com/openclaw/openclaw/actions/runs/40148823486. Repaired/drop decisions, without local test execution:

  • Restored detached HEAD and staged/unstaged setup for exact worktree removal.
  • Replaced stale backupRows with the existing SQLite snapshot reader and restored the cron fixture's asserted first-job access.
  • Preserved the literal source-reply mode type, guarded optional mock-call indexing, and removed default void type arguments.
  • Dropped entire cleanup sets in bash-tools.exec.security-floor.test.ts, session-actor.conformance.test.ts, approval-reactions.test.ts, and update-cli.target-schema.test.ts after type/fixture failures.
  • Dropped update-cli-mocks.test-support.ts cleanup after mock-export ratchet failures; no baseline exception was added.
  • Dropped kysely-sync.test.ts and model-auth-availability.session-pin.test.ts cleanup after native-authorization and selected-profile mismatches, rather than weakening assertions.
  • The first rebase onto ad2172d77e260e3039febbc4f531bd476245f912 included earlier catalog-client fixture work, but hosted CI still exposed an untouched helper type failure.

The size and file table above reflect these final decisions, not the larger first head. Runtime proof is the new exact-head hosted CI; no old-head green result is claimed for the repaired head.

PostgreSQL follow-up and final base

Second-head CI: https://github.com/openclaw/openclaw/actions/runs/40149780674. All non-PostgreSQL jobs passed except the same untouched catalog-helper type failure. PostgreSQL shards 2/3 and 3/3 passed. Shard 1/3 exposed the Matrix fixture's original-artifact versus captured-snapshot path mismatch; dropped matrix-roots.postgres.test.ts cleanup completely and restored main's full test. A fresh independent P0–P2 restoration review was clean.

Previous conflict-free rebase: fed1c12d0d4eeaec93bbd78a54e6926f4be76889, including canonical main fix 465fd7af01b6 for the catalog-helper type failure. No inherited-failure bypass is being requested; the final head must satisfy fresh hosted CI. All 55 changed files passed oxfmt, plain oxlint (exit 0), and diff checking after this rebase. The actual size and shard tables above reflect the final 55-file subset.

Main-conflict refresh

The PR became conflicting while the PostgreSQL checks were running. Rebased onto pinned main fdad53b1bc1d66d98a11da12fb633a75f8285ecb. The single conflict was in server.subagent-stop-followup.product.test.ts: preserved main's new sweepPastKillReconciliation helper and its clock-driven terminal-kill confirmation behavior, while keeping the branch's earlier client type alias and removing only its duplicate old declaration. Main's shared HTTP reader and newer assertions remain intact. No behavioral decision or weakened assertion was introduced.

The final subset remains +3417/-6837 test/support LOC across 55 files, with +0/-0 production LOC. All 55 files passed oxfmt, plain oxlint (exit 0), and diff checking again. New exact-head CI is required after this conflict refresh; earlier-head runs are not presented as current-head proof.

@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.

@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-25T02:04:35.213684Z 63f1cee 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.

@steipete
steipete enabled auto-merge (squash) October 25, 2026 00:59
@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: qa-lab extensions: codex size: XL labels Oct 25, 2026
@steipete
steipete disabled auto-merge October 25, 2026 01:03
@steipete
steipete force-pushed the tcr/land-d504-1792889282 branch from 0286319 to 22c38da Compare October 25, 2026 01:13
@steipete
steipete enabled auto-merge (squash) October 25, 2026 01:13
@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 and scenarios across core and bundled plugins.

Example: A terminal lifecycle write loses authority before commit.

  • Before: A mocked lifecycle test repeats authority checks covered by a persistence integration test.
  • After: The persistence integration test remains responsible for proving rejection and unchanged session state.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no definite introduced defect found, but exact-head validation is incomplete and two type-check failures remain unattributed.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-directed test-only cleanup changes no shipped behavior; hosted test and type-check results remain supporting validation rather than a runtime feature 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-directed cleanup reduces repeated test maintenance while preserving checked authority, persistence, protocol, and lifecycle boundaries.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed test cleanup has maintenance value, and inspection found no definite introduced defect; exact-head CI remains unresolved.

Priority: P3
Reviewed head: 22c38da7470835859d35ae6ab08779cc0e10334d

Before merge

None.

Findings

None.

Agent review details

How this fits together

The changed suites exercise agent, Gateway, CLI, database, and plugin owners using synthetic inputs and verify their outputs, persisted state, and lifecycle effects.

flowchart LR
  A[Synthetic inputs] --> B[Shared test fixtures]
  B --> C[Core runtime owners]
  B --> D[Bundled plugin owners]
  C --> E[Boundary assertions]
  D --> E
  E --> F[Hosted CI gate]
Loading

Technical review

Best possible solution:

Keep distinct boundary regressions in their existing owner suites while consolidating repeated setup and assertions.

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

No runtime bug is claimed; this read-only review inspected the introduced test changes and retained coverage without executing target code.

Is this the best way to solve the issue?

Consolidating fixtures and retaining stronger owner-boundary tests fits the stated cleanup, with no definite correctness defect established by source inspection.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway terminal lifecycle coverage keeps the original intent (d179dc3: Persist terminal outcomes independently of optional chat presentation and retain live authority through commit; the reason is documented in fix(bug): telegram session remains running ~15 minutes after successful terminal delivery on beta.3 #132309.)
  • Codex plugin activation tests keeps the original intent (a1ac559: Native plugin activation requires explicit installation identity, inventory refresh, and policy enforcement; the refactored tests retain those cases.)
  • Project-scoped memory prompts keeps the original intent (d41a56f: Curated memory must respect active project scope; embedded-prompt and project-memory sibling tests retain that contract.)
  • PostgreSQL transcript projection tests keeps the original intent (03834a7: Bound projection write trips while preserving transcript/search contents, transaction boundaries, replay, and rollback; this PR retains those behavioral scenarios.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9d4610c adds extensions/codex/src/app-server/plugin-activation.test.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9d4610cbd102; files: extensions/codex/src/app-server/plugin-activation.test.ts)
  • Kevin Lin: Raw commit a1ac559 adds extensions/codex/src/app-server/plugin-activation.test.ts:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a1ac559ed7e6; files: extensions/codex/src/app-server/plugin-activation.test.ts)
  • Kyle Klouzal: Raw commit 2333bd5 adds src/gateway/session-lifecycle-state.test.ts:234 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 2333bd59dbeb; files: src/gateway/session-lifecycle-state.test.ts)

PR surface

Tests -3428. Total -3428 across 56 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 56 3379 6807 -3428
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 56 3379 6807 -3428

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and support +3379/-6807, net -3428. The reduction comes from fixture consolidation and duplicate-proof removal without adding production machinery.

Labels

Label changes:

  • add P3: This is maintenance of test coverage with no intended user-visible runtime change.
  • 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 maintenance of test coverage with no intended user-visible runtime change.
  • 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Classify the exact-head type-check failures from full diagnostics and complete the existing CI gate.

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 24, 2026, 9:33 PM ET / October 25, 2026, 01:33 UTC.

Consolidate credential JSON and temp-home fixtures, attachment envelopes, catalog replies, MCP view cleanup, and HTTP rejection assertions. Preserve all existing cases and distinct authority, protocol, delivery, and lifecycle assertions. CI-only validation: formatting, plain oxlint, and diff checks; runtime proof deferred to hosted CI.
Remove copied cancellation attribution, admitted output-schema, and HTTP suites from native-mcp-runtime.test.ts. Their exact cases remain in native-mcp-runtime.cancellation.test.ts, native-mcp-runtime.output.test.ts, and native-mcp-runtime.http.test.ts under the same agents-core routing.

Consolidate credential clock/cache fixtures and remove redundant provider call-shape checks. Catalog publication event flags remain covered by prepared-model-runtime.publication-events.test.ts; ordinary framing overflow remains covered by cli-output-partial-messages.test.ts and the local blank-frame limit case. CI-only: formatting, plain oxlint, and diff checks; no tests run.
Remove the catalog status replay covered by session-row-projection.backfill.test.ts, session-row-projection-catalog.test.ts, and prepared-model-runtime.publication-events.test.ts. Keep the real auth-rotation publication integration and native activation cases.

Drop the held-XML resolver replay covered by embedded-agent-subscribe.handlers.messages.tool-markup.test.ts and the runtime allowlist replay covered by extra-params.provider-runtime.test.ts. Preserve source replacement and persistent policy assertions. Consolidate active-login fixtures and rely on fixture-owned MCP disposal for final cleanup. No test runs; formatting, plain oxlint, and diff checks pass.
Remove duplicate round-trip and recovery-matrix cases covered by port-command.recovery.integration.test.ts and family-scoped cases covered by port-command.mixed.integration.test.ts. Both keepers run in the infra project with the same port-command worker setup.

Consolidate port recovery setup, archive seed writes, and transcript projection observations without removing distinct custody, WAL, revocation, or durability assertions. Drop inherited-auth phase logging only.

CI-only validation: plain oxlint, oxfmt, and git diff --check passed. Shard LOC 5739 -> 5330 (7.1%); declarations 60 -> 55. The 25% line target is not met: remaining tests exercise distinct engine, restore, auth, migration, and lifecycle behavior. No tests or coverage run locally.
Remove mocked multi-root publication recovery in favor of the real Matrix roots recovery test, carrying over original-capture, target identity, shared-root and manifest-cleanup assertions. First-use migration remains owned by port-command.test.ts and credential continuity by port-command.credentials.integration.test.ts.

Remove internal auth, codec and actor receipt checks duplicated by real provider requests and persisted/reopened data. Share owner, mutation, index-state and repair fixtures. Retain PostgreSQL baseline-capture routing and unconditional SQLite repair coverage.

CI-only validation: oxfmt, plain oxlint and diff checks pass; no tests or coverage run. Additional cut 5330 -> 5042 lines; cumulative 5739 -> 5042 (12.1%). The 25% target remains unmet; retained cases protect distinct backend, durability, security and ordering paths.
Reduce shard test LOC from 5739 to 4301 cumulatively, preserving PostgreSQL SQL regressions, credential rebinding, restore publication ordering, and source-preservation boundaries.

Keepers: Matrix account-root backup rows remain in matrix-roots.postgres.test.ts; Logbook and Team Reports exact backup round-trips remain in logbook-port.postgres.test.ts. Gateway startup is owned by gateway-session-startup.conformance.test.ts and gateway-agent-inspection.conformance.test.ts. Opaque archive preservation and missing capsules are owned by backup-restore.test.ts and backup-verify-completeness.test.ts.

Updater family admission remains in update-database-engine-admission.test.ts. Final restored JSON/blob/socket assertions replace intermediate snapshot dumps. Local credential variants remain in update-database-restore.test.ts. Matrix diagnostics remain in doctor-database-diagnostics.postgres.test.ts, and unconditional SQLite key repair remains in doctor-session-incognito-key-repair.test.ts.

Cron restart, preference mutation, submitted-input lookup and metadata initialization remain in service.read-ops-nonblocking.test.ts, user-preferences.test.ts, session-accessor.pending-inputs.test.ts and session-actor-initialization.test.ts. Share transcript navigation fixtures and remove redundant projection layouts without changing query-budget assertions.

CI-only: oxfmt, plain oxlint and git diff --check passed. No tests, coverage or typecheck run.
Reuse the existing version parser in updater mocks and remove forwarding-only mock wrappers. Preserve all CLI schema, config publication, plugin recovery, dispatch, and process lifecycle cases.
Consolidate adoption into provenance, rollback into interrupted recovery, native replacement into receipt refresh, reader ownership into lazy iteration, dynamic authorizer into invalidation, and fractional costs into selected-cache proof. Retain each lifecycle interleaving and explicit fractional range/no-replay assertion.

Presence publication remains covered by device-pairing-publication.test.ts; ordinary pointer rollback remains covered by update-immutable-activation.test.ts. Remove same-branch native-route and finalizer rows, preserving distinct policy and lifecycle assertions. CI-only: plain oxlint, oxfmt, and diff checks pass; no test runs.
Share lifecycle event, terminal and cron fixtures; consolidate the node policy pre/post-dispatch cases and hook payload setup. Preserve all 171 expanded cases and security/lifecycle assertions.

CI-only validation: plain oxlint, oxfmt and git diff --check passed. Tests and coverage deferred to hosted CI. Shard LOC: 5645 -> 5503 (-142, 2.5%); no production or shared-support changes.
Remove duplicate lifecycle layers covered by session-lifecycle-state.worker.test.ts (queued resumed goal), session-lifecycle-run-failure.test.ts (bounded errors and before/after commit authority), and session-lifecycle-state.persistence.test.ts (failure timing and next-run clears).

Share scripted retirement transport while preserving all stop/follow-up and sibling/delete cases. Reuse dispatchAuthorizationRequest and consolidate identical synthetic Git failure responses. CI-only: plain oxlint, formatting and diff-check passed; no tests run. Cumulative shard LOC 5645 -> 5341 (-5.4%), below the requested 25%.
Keep mixed-grant scope proof at method-scopes.own-session.test.ts stronger-scope case. Drop same-branch pending-chat and reentrant successor variants, retain queued identity mutations. Keep pre-reset regression through stale-goal persistence and one representative inactive-goal branch.

Keep query-token rejection at server.plugin-http-auth.test.ts and mapped global wake targeting at server/hooks.agent-trust.test.ts. Reuse existing approval database and execution-hold fixtures; remove selection argument checks duplicated by model-identifying results.

CI-only: plain oxlint, formatting and diff-check passed, no tests run. Additional 168 lines removed; cumulative 5645 -> 5173 (-8.4%), still below the requested 25%. No files deleted or production changes.
Consolidate local provider, job, and session-render fixtures while retaining every test case and security/lifecycle assertion. Remove internal call-shape duplication already proved by the mixed account inventory, account removal outcomes, and installation-addressability cases.

CI-only shard: oxfmt, plain oxlint, and diff check pass; no tests or coverage run. Reduce 4212 test lines to 4132 (1.9%). The 25% target is not safely attainable here: remaining picker, provider-auth, admission, and session cases cover distinct branches and authority/durability contracts.
Keep provider-menu threshold, filtering, alias and cancellation proof in model-picker.provider-menu.test.ts: preserves counts and choices for $count models and propagates provider-menu cancellation before choosing a model. Remove their five duplicated cases from model-picker.test.ts.

Use one renamed, paginated managed-backup lookup scenario; consolidate tail filtering into the progress-rendering case. Replace the test-owned auth storage simulation with persistence-boundary payload assertions and use one unrelated session to guard projection privacy.

CI-only: oxfmt, plain oxlint and git diff --check pass. No tests/builds/coverage run. Original shard 4212 lines, now 4005 (-4.9%); remaining distinct auth, admission, targeting, lifecycle and persistence boundaries prevent an honest 25% cut.
Remove the redundant benign deprecated-catalog replay; auth-choice.apply.api-providers.test.ts retains the install-catalog path in resolves workspace-only deprecated auth choices from the %s. Keep ANSI/newline escaping here. Consolidate removal rejection cases without losing their distinct assertions.

Share account inventory fixtures and cleanup, drop unused CLI/provider fixture data, and reuse admission file/hash helpers with scoped database disposal. All remaining auth, policy, migration and lifecycle behavior stays covered. CI-only static gates pass; no tests or builds run. Original shard 4212 lines to 3902 (-7.4%); the 25% target remains unmet.
Port s0044 commits 33332aa946b370bd22c4c3dd2de05e10418d99d5 and 353307531f57beb99cf64e2cf267c7da14cff886 onto the campaign lane. Preserve the lane's sandboxStreamJob and settledOperation exports and its createDeferred-based ownership read behavior in the consolidated fixture.

CI-only validation: oxlint on all nine touched files, oxfmt --check, git diff --check, and independent review passed. Runtime tests and coverage were not run; affected-test execution is deferred to landing PR CI.
Keep provider message identity and thread routing in the existing crabline-transport-message-id, provider-identity and thread-routing sibling suites. Keep gallery read sharing, containment and retry attribution in evidence-gallery.presentation.test.ts.

Remove copied runtime dependency identity assertions and duplicate mocked web registration proof; suite-runtime-flow.web.test.ts retains real opener, abort, retry and cleanup ownership checks. Preserve distinct timeout, authority, redaction, lifecycle and artifact contracts.

CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Shard LOC 5879 to 5358 (8.9 percent), below the 25 percent target to retain unique behavior.
Remove seventeen unexecuted Telegram observation variants: the only helper caller filters to message and wrong-edit-marker. Preserve both executed flows and their redaction, receipt and correlation assertions.

Share bus cleanup, gateway configuration access and summary outcome fixtures. Remove Docker receipt success replay covered by suite-launch.runtime.test.ts: carries the actual prepared Docker receipt through aggregate native delegation.

CI-only static gates: plain oxlint, oxfmt and diff-check passed. No tests or coverage run. Shard total 5879 to 5121 lines; remaining distinct boundary proof prevents an honest 25 percent cut.
Use one timed harness for four distinct preparation/action deadline cases without dropping their lifecycle assertions. Consolidate gallery array projections while retaining cardinality, exact redaction, runner and proof-gap fields.

Remove the Matrix ID regex already asserted by crabline-transport-message-id.test.ts and the finite oversized-search replay already covered by the same-route overflow clamp case.

CI-only: oxfmt, plain oxlint and diff-check pass; no tests or coverage run. Shard total 5879 to 5048 lines, below the requested 25 percent reduction because remaining distinct behavior is retained.
Remove duplicated Code Mode cancellation and grant tests retained in code-mode-headless.cancellation.test.ts and code-mode-headless.budget.test.ts. Remove repeated MCP client protocol, timeout, write-failure and framing cases retained in mcp-stdio-client.test.ts; callback write rejection remains in the transport probe table.

Reuse auth and package fixtures without removing distinct security behavior. Keep unique repeated-stop cleanup assertions. CI-only campaign: plain oxlint, oxfmt and diff checks passed; tests and coverage deferred to hosted CI. Shard LOC 5691 -> 5210 (8.5%); retain distinct authority and lifecycle proof rather than force the 25% target.
Remove the local-web replay from tool-surface-plan; tool-surface-local-web.test.ts retains its schema, policy, provenance and prepared-presentation assertions. Keep catalog behavior at hosted compaction, tool-search.test.ts and the harness bridge. Group-scope-tree.test.ts and assembled filtering retain the raw policy tests removed here.

MCP client unit and real cleanup suites retain error cause, repeated-stop failure and absent cleanup receipt. The real bundle runtime fixture retains user-owned PLUGIN_DATA path protection. Consolidate recovery-authority setup, same-branch auth rows and shared fixture plumbing; keep distinct approval targets, secret redaction and lifecycle checks.

CI-only: plain oxlint, oxfmt and diff checks passed. No tests or coverage run. Additional bounded reduction; cumulative shard LOC remains below the requested 25 percent cut because unique auth, exec and publication paths are retained.
Remove copied projector snapshot and async-delivery suites; their matching cases remain in event-projector-snapshot.test.ts and event-projector.async-delivery.test.ts. Remove uncalled fork registration and unused fixture helpers. Share activation and workspace setup without dropping distinct policy assertions.
Remove duplicate metadata-cache and reply-context suites from socket-lifecycle; their dedicated monitor-inbox.metadata-cache.test.ts and monitor-inbox.reply-context.test.ts siblings retain the same assertions, including invalidation races. Keep both siblings on the extension database-workers route.

Consolidate repeated action, approval, send and inbox fixtures without dropping distinct authorization, privacy, replay or lifecycle contracts. Keep QR rotation in the concurrent-waiter case and the linked shortcut in the successful-relink case; keep indentation proof at payload delivery.

CI-only shard: plain oxlint, oxfmt and diff check pass. No tests, coverage or typecheck run. Test LOC 5923 -> 4952 (-16.4%); below the 25% target. Static declarations 151 -> 121; expanded cases 201 -> 182. Remaining distinct contracts retained for coordinator review.
Remove duplicated completion and recovery cases covered by message-tool-terminal.loop.test.ts, message-tool-terminal.tool-authored.test.ts, and assistant-failure.failover.test.ts. Retain explicit negative reply-publication assertions and all distinct authority, privacy, recovery, and accounting cases.

Consolidate local prompt, session-history, terminal, and diagnostic fixtures. CI-only validation: plain oxlint, oxfmt, and git diff --check; no tests or coverage executed. Shard test LOC: 6144 -> 5262 (-14.4%); further reduction would discard distinct protected behavior.
Remove redundant prompt projections covered by system-prompt and sanitize-for-prompt tests; retain prepared prompt model identity. Stream routing remains covered by stream-resolution tests, argument repair by attempt.tool-call-argument-repair tests, and filesystem policy by tool-fs-policy tests. Terminal restart and cron projections retain owner coverage in terminal-preparation.yield and terminal-tool-failure tests.

Consolidate same-path input tables and exact trace fixtures; trim unobserved runtime fixture fields and returned-mock inventories. Preserve authority, privacy, accounting, replay, and lifecycle assertions. Plain oxlint, formatting, and diff checks pass; no tests or coverage run under CI-only instructions. Cumulative shard LOC 6144 -> 4886 (20.5%), below the requested 25% preservation-constrained target.
Restore backend-specific submitted-input and multirow conformance. Drop unsafe reductions in updater schema and mock scaffolding, execution-review fixtures, session-actor decoding, and approval-reaction tuples. Keep detached and staged exact-removal setup; repair stale helper references, literal typing, mock indexing, and default type arguments. CI-only local validation: oxfmt, plain oxlint, diff check. Independent repair review found no actionable P0-P2 issue.
Drop the two cleanup hunk sets exposed by hosted CI rather than weakening selected-profile or native-authorization assertions. Both files match pinned main ad2172d. Plain oxlint, oxfmt, diff check, and independent restoration review passed; runtime validation stays in PR CI.
Drop the cleanup hunk set after PostgreSQL CI exposed an original-artifact versus captured-snapshot path mismatch. Restore this file exactly to pinned main instead of adding new fixture machinery or weakening assertions. CI-only static gates and independent restoration review passed.
@steipete
steipete force-pushed the tcr/land-d504-1792889282 branch from 53da38a to 63f1cee Compare October 25, 2026 02:01
@steipete
steipete enabled auto-merge (squash) October 25, 2026 02:02
@steipete
steipete merged commit 2a20995 into main Oct 25, 2026
124 checks passed
@steipete
steipete deleted the tcr/land-d504-1792889282 branch October 25, 2026 02:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
)

* test(agents): deslop s0042 tests

Consolidate credential JSON and temp-home fixtures, attachment envelopes, catalog replies, MCP view cleanup, and HTTP rejection assertions. Preserve all existing cases and distinct authority, protocol, delivery, and lifecycle assertions. CI-only validation: formatting, plain oxlint, and diff checks; runtime proof deferred to hosted CI.

* test(agents): remove duplicated s0042 test layers

Remove copied cancellation attribution, admitted output-schema, and HTTP suites from native-mcp-runtime.test.ts. Their exact cases remain in native-mcp-runtime.cancellation.test.ts, native-mcp-runtime.output.test.ts, and native-mcp-runtime.http.test.ts under the same agents-core routing.

Consolidate credential clock/cache fixtures and remove redundant provider call-shape checks. Catalog publication event flags remain covered by prepared-model-runtime.publication-events.test.ts; ordinary framing overflow remains covered by cli-output-partial-messages.test.ts and the local blank-frame limit case. CI-only: formatting, plain oxlint, and diff checks; no tests run.

* test(agents): consolidate s0042 owner-boundary proof

Remove the catalog status replay covered by session-row-projection.backfill.test.ts, session-row-projection-catalog.test.ts, and prepared-model-runtime.publication-events.test.ts. Keep the real auth-rotation publication integration and native activation cases.

Drop the held-XML resolver replay covered by embedded-agent-subscribe.handlers.messages.tool-markup.test.ts and the runtime allowlist replay covered by extra-params.provider-runtime.test.ts. Preserve source replacement and persistent policy assertions. Consolidate active-login fixtures and rely on fixture-owned MCP disposal for final cleanup. No test runs; formatting, plain oxlint, and diff checks pass.

* test(database-engine): deslop s0041 tests

Remove duplicate round-trip and recovery-matrix cases covered by port-command.recovery.integration.test.ts and family-scoped cases covered by port-command.mixed.integration.test.ts. Both keepers run in the infra project with the same port-command worker setup.

Consolidate port recovery setup, archive seed writes, and transcript projection observations without removing distinct custody, WAL, revocation, or durability assertions. Drop inherited-auth phase logging only.

CI-only validation: plain oxlint, oxfmt, and git diff --check passed. Shard LOC 5739 -> 5330 (7.1%); declarations 60 -> 55. The 25% line target is not met: remaining tests exercise distinct engine, restore, auth, migration, and lifecycle behavior. No tests or coverage run locally.

* test(database-engine): consolidate s0041 retained coverage

Remove mocked multi-root publication recovery in favor of the real Matrix roots recovery test, carrying over original-capture, target identity, shared-root and manifest-cleanup assertions. First-use migration remains owned by port-command.test.ts and credential continuity by port-command.credentials.integration.test.ts.

Remove internal auth, codec and actor receipt checks duplicated by real provider requests and persisted/reopened data. Share owner, mutation, index-state and repair fixtures. Retain PostgreSQL baseline-capture routing and unconditional SQLite repair coverage.

CI-only validation: oxfmt, plain oxlint and diff checks pass; no tests or coverage run. Additional cut 5330 -> 5042 lines; cumulative 5739 -> 5042 (12.1%). The 25% target remains unmet; retained cases protect distinct backend, durability, security and ordering paths.

* test(database-engine): cut redundant s0041 proof layers

Reduce shard test LOC from 5739 to 4301 cumulatively, preserving PostgreSQL SQL regressions, credential rebinding, restore publication ordering, and source-preservation boundaries.

Keepers: Matrix account-root backup rows remain in matrix-roots.postgres.test.ts; Logbook and Team Reports exact backup round-trips remain in logbook-port.postgres.test.ts. Gateway startup is owned by gateway-session-startup.conformance.test.ts and gateway-agent-inspection.conformance.test.ts. Opaque archive preservation and missing capsules are owned by backup-restore.test.ts and backup-verify-completeness.test.ts.

Updater family admission remains in update-database-engine-admission.test.ts. Final restored JSON/blob/socket assertions replace intermediate snapshot dumps. Local credential variants remain in update-database-restore.test.ts. Matrix diagnostics remain in doctor-database-diagnostics.postgres.test.ts, and unconditional SQLite key repair remains in doctor-session-incognito-key-repair.test.ts.

Cron restart, preference mutation, submitted-input lookup and metadata initialization remain in service.read-ops-nonblocking.test.ts, user-preferences.test.ts, session-accessor.pending-inputs.test.ts and session-actor-initialization.test.ts. Share transcript navigation fixtures and remove redundant projection layouts without changing query-budget assertions.

CI-only: oxfmt, plain oxlint and git diff --check passed. No tests, coverage or typecheck run.

* test(cli): deslop s0043 tests

Reuse the existing version parser in updater mocks and remove forwarding-only mock wrappers. Preserve all CLI schema, config publication, plugin recovery, dispatch, and process lifecycle cases.

* test(cli): remove duplicate s0043 test layers

Keep exit and signal contracts in run-main.exit.test.ts, validation error matrices in plugins-authoring-validation.test.ts, real root and lazy-group help in help-exit.process.test.ts, and exhaustive multi-store discovery in update-cli/schema-preflight.test.ts. Retain CLI admission, recovery, redaction, and ownership assertions while consolidating repeated fixtures. Align retained dispatch tests with the current mock exports.

* test(cli): consolidate s0043 owner-boundary proof

Retain schema discovery in update-cli/schema-preflight.test.ts, metadata admission in update-command-metadata-diagnostics.test.ts, manager refusal in update-command-fresh-terminal.test.ts, and nonfatal plugin health in update-command-service.test.ts plus update-cli.plugin-convergence.test.ts. Keep package-entry installation in plugins/install-package-entries.test.ts and exact Git snapshot/reuse behavior in worktrees/service.exact-state.test.ts and worktrees/service.test.ts. Share registered config command fixtures and conflict setup while retaining each publication, authority, privacy, and lifecycle boundary.

* test(infra): deslop s0045 tests

Consolidate pairing worker fixture reads, operator inputs, node generation lookup, and corrupt-sibling cleanup. Preserve all test cases and authority, persistence, and lifecycle assertions.

* test(infra): remove duplicated s0045 test layers

Keep synchronous-writer grant coverage in sqlite-worker-shared-state-admission.test.ts and plugin fallback policy coverage in exec-approval-forwarder.plugin.test.ts. Consolidate approval RPC and snapshot startup-floor proof, trim unused pairing fixture metadata, and remove implementation-derived assertions while retaining authority, recovery, accounting, and lifecycle checks.

* test(infra): retain populated pairing browser-origin fixture

* test(infra): consolidate s0045 behavioral scenarios

Consolidate adoption into provenance, rollback into interrupted recovery, native replacement into receipt refresh, reader ownership into lazy iteration, dynamic authorizer into invalidation, and fractional costs into selected-cache proof. Retain each lifecycle interleaving and explicit fractional range/no-replay assertion.

Presence publication remains covered by device-pairing-publication.test.ts; ordinary pointer rollback remains covered by update-immutable-activation.test.ts. Remove same-branch native-route and finalizer rows, preserving distinct policy and lifecycle assertions. CI-only: plain oxlint, oxfmt, and diff checks pass; no test runs.

* test(gateway): deslop s0046 tests

Share lifecycle event, terminal and cron fixtures; consolidate the node policy pre/post-dispatch cases and hook payload setup. Preserve all 171 expanded cases and security/lifecycle assertions.

CI-only validation: plain oxlint, oxfmt and git diff --check passed. Tests and coverage deferred to hosted CI. Shard LOC: 5645 -> 5503 (-142, 2.5%); no production or shared-support changes.

* test(gateway): consolidate s0046 lifecycle proof and fixtures

Remove duplicate lifecycle layers covered by session-lifecycle-state.worker.test.ts (queued resumed goal), session-lifecycle-run-failure.test.ts (bounded errors and before/after commit authority), and session-lifecycle-state.persistence.test.ts (failure timing and next-run clears).

Share scripted retirement transport while preserving all stop/follow-up and sibling/delete cases. Reuse dispatchAuthorizationRequest and consolidate identical synthetic Git failure responses. CI-only: plain oxlint, formatting and diff-check passed; no tests run. Cumulative shard LOC 5645 -> 5341 (-5.4%), below the requested 25%.

* test(gateway): remove s0046 duplicate proof layers

Keep mixed-grant scope proof at method-scopes.own-session.test.ts stronger-scope case. Drop same-branch pending-chat and reentrant successor variants, retain queued identity mutations. Keep pre-reset regression through stale-goal persistence and one representative inactive-goal branch.

Keep query-token rejection at server.plugin-http-auth.test.ts and mapped global wake targeting at server/hooks.agent-trust.test.ts. Reuse existing approval database and execution-hold fixtures; remove selection argument checks duplicated by model-identifying results.

CI-only: plain oxlint, formatting and diff-check passed, no tests run. Additional 168 lines removed; cumulative 5645 -> 5173 (-8.4%), still below the requested 25%. No files deleted or production changes.

* test(commands): deslop s0047 tests

Consolidate local provider, job, and session-render fixtures while retaining every test case and security/lifecycle assertion. Remove internal call-shape duplication already proved by the mixed account inventory, account removal outcomes, and installation-addressability cases.

CI-only shard: oxfmt, plain oxlint, and diff check pass; no tests or coverage run. Reduce 4212 test lines to 4132 (1.9%). The 25% target is not safely attainable here: remaining picker, provider-auth, admission, and session cases cover distinct branches and authority/durability contracts.

* test(commands): remove duplicate s0047 test layers

Keep provider-menu threshold, filtering, alias and cancellation proof in model-picker.provider-menu.test.ts: preserves counts and choices for $count models and propagates provider-menu cancellation before choosing a model. Remove their five duplicated cases from model-picker.test.ts.

Use one renamed, paginated managed-backup lookup scenario; consolidate tail filtering into the progress-rendering case. Replace the test-owned auth storage simulation with persistence-boundary payload assertions and use one unrelated session to guard projection privacy.

CI-only: oxfmt, plain oxlint and git diff --check pass. No tests/builds/coverage run. Original shard 4212 lines, now 4005 (-4.9%); remaining distinct auth, admission, targeting, lifecycle and persistence boundaries prevent an honest 25% cut.

* test(commands): compact s0047 fixture layers

Remove the redundant benign deprecated-catalog replay; auth-choice.apply.api-providers.test.ts retains the install-catalog path in resolves workspace-only deprecated auth choices from the %s. Keep ANSI/newline escaping here. Consolidate removal rejection cases without losing their distinct assertions.

Share account inventory fixtures and cleanup, drop unused CLI/provider fixture data, and reuse admission file/hash helpers with scoped database disposal. All remaining auth, policy, migration and lifecycle behavior stays covered. CI-only static gates pass; no tests or builds run. Original shard 4212 lines to 3902 (-7.4%); the 25% target remains unmet.

* test(gateway): consolidate s0044 boundary fixtures

Port s0044 commits 33332aa946b370bd22c4c3dd2de05e10418d99d5 and 353307531f57beb99cf64e2cf267c7da14cff886 onto the campaign lane. Preserve the lane's sandboxStreamJob and settledOperation exports and its createDeferred-based ownership read behavior in the consolidated fixture.

CI-only validation: oxlint on all nine touched files, oxfmt --check, git diff --check, and independent review passed. Runtime tests and coverage were not run; affected-test execution is deferred to landing PR CI.

* test(qa-lab): deslop s0048 tests

Keep provider message identity and thread routing in the existing crabline-transport-message-id, provider-identity and thread-routing sibling suites. Keep gallery read sharing, containment and retry attribution in evidence-gallery.presentation.test.ts.

Remove copied runtime dependency identity assertions and duplicate mocked web registration proof; suite-runtime-flow.web.test.ts retains real opener, abort, retry and cleanup ownership checks. Preserve distinct timeout, authority, redaction, lifecycle and artifact contracts.

CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Shard LOC 5879 to 5358 (8.9 percent), below the 25 percent target to retain unique behavior.

* test(qa-lab): trim unreachable s0048 fixtures

Remove seventeen unexecuted Telegram observation variants: the only helper caller filters to message and wrong-edit-marker. Preserve both executed flows and their redaction, receipt and correlation assertions.

Share bus cleanup, gateway configuration access and summary outcome fixtures. Remove Docker receipt success replay covered by suite-launch.runtime.test.ts: carries the actual prepared Docker receipt through aggregate native delegation.

CI-only static gates: plain oxlint, oxfmt and diff-check passed. No tests or coverage run. Shard total 5879 to 5121 lines; remaining distinct boundary proof prevents an honest 25 percent cut.

* test(qa-lab): consolidate s0048 deadline and projection proof

Use one timed harness for four distinct preparation/action deadline cases without dropping their lifecycle assertions. Consolidate gallery array projections while retaining cardinality, exact redaction, runner and proof-gap fields.

Remove the Matrix ID regex already asserted by crabline-transport-message-id.test.ts and the finite oversized-search replay already covered by the same-route overflow clamp case.

CI-only: oxfmt, plain oxlint and diff-check pass; no tests or coverage run. Shard total 5879 to 5048 lines, below the requested 25 percent reduction because remaining distinct behavior is retained.

* test(agents): deslop s0049 tests

Remove duplicated Code Mode cancellation and grant tests retained in code-mode-headless.cancellation.test.ts and code-mode-headless.budget.test.ts. Remove repeated MCP client protocol, timeout, write-failure and framing cases retained in mcp-stdio-client.test.ts; callback write rejection remains in the transport probe table.

Reuse auth and package fixtures without removing distinct security behavior. Keep unique repeated-stop cleanup assertions. CI-only campaign: plain oxlint, oxfmt and diff checks passed; tests and coverage deferred to hosted CI. Shard LOC 5691 -> 5210 (8.5%); retain distinct authority and lifecycle proof rather than force the 25% target.

* test(agents): remove redundant s0049 proof layers

Remove the local-web replay from tool-surface-plan; tool-surface-local-web.test.ts retains its schema, policy, provenance and prepared-presentation assertions. Keep catalog behavior at hosted compaction, tool-search.test.ts and the harness bridge. Group-scope-tree.test.ts and assembled filtering retain the raw policy tests removed here.

MCP client unit and real cleanup suites retain error cause, repeated-stop failure and absent cleanup receipt. The real bundle runtime fixture retains user-owned PLUGIN_DATA path protection. Consolidate recovery-authority setup, same-branch auth rows and shared fixture plumbing; keep distinct approval targets, secret redaction and lifecycle checks.

CI-only: plain oxlint, oxfmt and diff checks passed. No tests or coverage run. Additional bounded reduction; cumulative shard LOC remains below the requested 25 percent cut because unique auth, exec and publication paths are retained.

* test(codex): deslop s0051 tests

Remove copied projector snapshot and async-delivery suites; their matching cases remain in event-projector-snapshot.test.ts and event-projector.async-delivery.test.ts. Remove uncalled fork registration and unused fixture helpers. Share activation and workspace setup without dropping distinct policy assertions.

* test(whatsapp): deslop s0052 tests

Remove duplicate metadata-cache and reply-context suites from socket-lifecycle; their dedicated monitor-inbox.metadata-cache.test.ts and monitor-inbox.reply-context.test.ts siblings retain the same assertions, including invalidation races. Keep both siblings on the extension database-workers route.

Consolidate repeated action, approval, send and inbox fixtures without dropping distinct authorization, privacy, replay or lifecycle contracts. Keep QR rotation in the concurrent-waiter case and the linked shortcut in the successful-relink case; keep indentation proof at payload delivery.

CI-only shard: plain oxlint, oxfmt and diff check pass. No tests, coverage or typecheck run. Test LOC 5923 -> 4952 (-16.4%); below the 25% target. Static declarations 151 -> 121; expanded cases 201 -> 182. Remaining distinct contracts retained for coordinator review.

* test(agents): deslop s0050 tests

Remove duplicated completion and recovery cases covered by message-tool-terminal.loop.test.ts, message-tool-terminal.tool-authored.test.ts, and assistant-failure.failover.test.ts. Retain explicit negative reply-publication assertions and all distinct authority, privacy, recovery, and accounting cases.

Consolidate local prompt, session-history, terminal, and diagnostic fixtures. CI-only validation: plain oxlint, oxfmt, and git diff --check; no tests or coverage executed. Shard test LOC: 6144 -> 5262 (-14.4%); further reduction would discard distinct protected behavior.

* test(agents): consolidate s0050 owner-boundary proof

Remove redundant prompt projections covered by system-prompt and sanitize-for-prompt tests; retain prepared prompt model identity. Stream routing remains covered by stream-resolution tests, argument repair by attempt.tool-call-argument-repair tests, and filesystem policy by tool-fs-policy tests. Terminal restart and cron projections retain owner coverage in terminal-preparation.yield and terminal-tool-failure tests.

Consolidate same-path input tables and exact trace fixtures; trim unobserved runtime fixture fields and returned-mock inventories. Preserve authority, privacy, accounting, replay, and lifecycle assertions. Plain oxlint, formatting, and diff checks pass; no tests or coverage run under CI-only instructions. Cumulative shard LOC 6144 -> 4886 (20.5%), below the requested 25% preservation-constrained target.

* test: preserve d504 conformance and repair replay fixtures

Restore backend-specific submitted-input and multirow conformance. Drop unsafe reductions in updater schema and mock scaffolding, execution-review fixtures, session-actor decoding, and approval-reaction tuples. Keep detached and staged exact-removal setup; repair stale helper references, literal typing, mock indexing, and default type arguments. CI-only local validation: oxfmt, plain oxlint, diff check. Independent repair review found no actionable P0-P2 issue.

* test: retain auth-selection and authorizer proof in d504

Drop the two cleanup hunk sets exposed by hosted CI rather than weakening selected-profile or native-authorization assertions. Both files match pinned main 3aa5b9a. Plain oxlint, oxfmt, diff check, and independent restoration review passed; runtime validation stays in PR CI.

* test(database-engine): retain Matrix backup conformance in d504

Drop the cleanup hunk set after PostgreSQL CI exposed an original-artifact versus captured-snapshot path mismatch. Restore this file exactly to pinned main instead of adding new fixture machinery or weakening assertions. CI-only static gates and independent restoration review passed.
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: whatsapp-web Channel integration: whatsapp-web cli CLI command changes commands Command implementations extensions: codex extensions: qa-lab 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