Repository navigation
test: remove low-value tests (batch d528) - #183538
Conversation
Type triage inputs as failure artifacts instead of full updater results, removing unused plugin metadata. Consolidate handoff payload and recovery assertions while retaining error outcomes, private permissions, descendant cleanup, and recovery ordering. Use the credential operation producer for fixture rows, reuse exception capture, minimize the symlink-refusal database, and scope snapshot spy disposal. Keep snapshot callback coverage in the late-registration test and exact restoration diagnostics in handoff result tests. Preserve all test cases and native-execution guards. CI-only static validation: oxfmt, plain oxlint and git diff --check passed. No tests or builds run. Cumulative line target remains unmet; retained legacy rollback and Unicode custody cases have distinct regression boundaries.
Consolidate avatar retry setup, OAuth transport fixtures, setup settlement observation, narration projections, and scoped sharing spy cleanup. Preserve all cases and distinct auth, recovery, privacy, and ordering assertions. CI-only shard: plain oxlint, oxfmt, and diff-check pass. No test or coverage execution. Dense retained boundaries prevent the 25 percent line target; total 4444 to 4393 lines.
Delete the matching lifecycle block copied verbatim into cron-stream-output.interleavings.test.ts. cron-stream-matching.test.ts retains long-line delivery, matcher timeout, disable accounting, cancellation joining, and dropped-prefix cases. Keep hardlink rejection in control-ui.http.test.ts, malformed route variants in control-ui-contract.test.ts, and identity precedence in assistant-identity.test.ts. Consolidate Tailscale exit assertions into its recovery case and retain separate Serve/Funnel branch rows. Replace repeated abort fixture teardown with owner disposal and remove repeated sharing guard assertions. CI-only: plain oxlint, oxfmt, and diff-check pass; no test or build execution. Additional reduction 4393 to 4195 lines; original shard 4444 to 4195. Remaining distinct boundary and interleaving proof prevents the 25 percent target.
Table avatar projection outcomes without dropping branches. Keep one animated WebP pass-through case while the APNG data case retains decoder-to-animation coverage. Replace custom socket capture with the standard stream consumer; retain deadline, rejection, graceful EOF, and exact wire assertions. Fold the standalone alias worker-grant case into the stronger alias grant-revocation lifecycle row. Preserve release custody and all distinct authority assertions. CI-only static gates: plain oxlint, oxfmt, and diff-check pass. No test or build runs. Additional 4195 to 4124 lines; cumulative 4444 to 4124 (7.2 percent), short of the 25 percent target because further whole-case cuts lack equivalent boundary proof.
Consolidate repeated approval fixtures, trace steps, action options and account configuration while preserving all expanded cases. Exact FIFO request order retains the removed count assertions; exact inspect event order retains duplicate lifecycle call assertions. CI-only validation: formatting, plain oxlint and diff-check; runtime proof deferred to hosted CI. Reduction is 263 of 4235 lines (6.2%); distinct authority, lifecycle, routing and persistence coverage prevents an honest 25% cut.
Remove duplicate v22 cursor/resume and repair cases from the v21 suite; openclaw-state-db-schema-v22-columns.test.ts retains the same local schema, identity, backup, runtime/Doctor and repair assertions. openclaw-state-db-task-index-migration.test.ts retains the duplicated v22/v23 task-index migration, cron upsert and publication rollback cases. Keep failed-preparation custody proof in openclaw-state-db-readonly.retained.test.ts, which exercises the real reader transport through a mocked worker pool. Consolidate historical JSON extraction fixtures without changing their SQL tokens. No production changes; no test cases folded. CI-only validation: targeted oxfmt, plain oxlint and git diff --check passed; static historical SQL comparison matched. Tests and coverage were not run per campaign instruction. The remaining authority, corruption, migration and lifecycle cases have distinct boundaries, so the shard stops below the 25 percent LOC target.
Retain seal mismatch proof in openclaw-agent-db.integrity-cache.test.ts (reports the next admission clean-close outcome), and lazy snapshot identity/lifecycle proof in openclaw-state-db-readonly.snapshot-admission.test.ts (lets a sync reader join the same lazy preparation started by an async reader). Remove the plural lease adapter wiring replay; group grant, custody and settlement tests remain. Consolidate background preference presentation and selection rows. Keep warm-feature transaction checks in the durable-installation test; remove per-feature replays of schema-ensure warm paths. Real secret creation remains in secret-store.test.ts, and promoted-column behavior remains in transcripts/store.test.ts and delivery-queue owner tests. Replace cleanup-ID SQL logging with direct worker result assertions, retaining malformed-path and no-host-SQL proof. Drop repeated historical INSERT column inventories only after statically verifying identical table-column order. No production changes or test runs; targeted oxfmt, plain oxlint and diff check passed. This second cut removes 295 more lines; cumulative 5012 to 4106 remains below the requested 25 percent because further identified cuts would remove distinct authority, migration or lifecycle proof.
Consolidate auth retry lifecycle fixtures, transcript publication observers, and model configuration setup while retaining distinct authority and lifecycle cases. Keep ZIP as the representative Full Access host download: TXT and PDF use the same sessions-file-download path. Text HTTP bytes remain covered by artifact-downloads.test.ts; PDF GET, HEAD, and range bytes remain covered by server.agent-artifact-apis.test.ts. The retained host test still checks exact bytes and permission revocation. CI-only campaign: plain oxlint, oxfmt, and diff checks pass; tests and coverage were intentionally not run. Static cases 99 to 97; shard lines 3890 to 3823. Below the 25% target because further cuts would remove distinct authority, lifecycle, or externally used helper contracts.
Remove catalog policy replay covered by sessions-describe-worker current-agent cases, session-utils-model.thinking-default owner cases, and session-utils.metadata-perf catalog publication. Roster status and run IDs remain covered by sessions-read-active pagination/activity cases. Remove ordinary model-policy replays covered by utility-model-setting, model-selection-alias-scope, model-ref-profile, and doctor-config-analysis fallback suppression. Keep the selected-agent alias/utility and disabled-utility gateway regressions. Consolidate auth retry tables, dirty-topology discovery proof, and Claw selection/review/publication fixtures. Keep exact publication bytes, credentials, revision conflicts and authority revocation. Remove the lower-size draft duplicate; the maximum-size case exercises the same save and conflict branches. CI-only: no test, coverage or build runs. Plain oxlint, oxfmt and diff checks pass. Original shard 3890 lines to 3620; reduction remains below 25% because remaining cases and shared support retain distinct boundaries.
Assert Claw selection directly through the RPC review response instead of replaying prepareClawDraft, retain exact selected files and exclusion metadata, and use a minimal native YAML manifest fixture. Retain reviewed archive bytes and publication authority checks. Reuse the existing request gate for discovery interleavings, trim unused model probe summary/config metadata, and leave generic alias parsing to model-selection and model-selection-alias-scope owner tests while retaining selected-agent model and utility composition cases. Remove createAccountCronJob after repository-wide search found no callers. Other approval and cron support exports remain consumed. CI-only: no tests or builds run; plain oxlint, oxfmt and diff checks pass. Shard now 3561 lines versus original 3890; below 25% because apparent remaining siblings exercise distinct request paths or authority checkpoints.
Reuse the existing Telegram HTTP fixture for model callback proof. Keep per-callback authorization assertions and remove internal catalog-call inventories. The retained credited-blockquote split test covers the removed uncredited split input. The serial commit case covers the success path exercised by the removed disk-error test, whose optional error callback was never invoked. Keep missing-cache coverage as the direct-message recovery negative control.
Share parser and scoped authorization assertion tables, preserve menu publication ordering without duplicate counts, and use one deferred lifecycle fixture for first-turn and serial-lane holds. Combine legacy promotion and embedded-ancestry reopen proof while retaining explicit thread correction and storage assertions. Remove repeated model callback HTTP inventories while keeping real outcomes, authorization and media cleanup ordering.
Port s0308 commits 4fc04a9fb8a2e7bac4cd1eb4b585707ee71c1b03, 30721c9ab2187d21c3f34096905896dab5b585d9, and 444611248bdc3d6b53f4976c9e7e1c54ddd5c4d6 onto the campaign lane. The first commit was already represented. Preserve the lane mock setup and unrelated suppression cleanup while applying the remaining test consolidations and fixture removal. CI-only proof: oxlint and oxfmt --check passed on all 11 changed files; git diff --check and staged diff check passed. Source-only autoreview found no actionable P0-P2 findings. Tests intentionally not run; affected tests are deferred to landing PR CI.
Share repeated schema, filesystem, environment, and provider fixtures without dropping distinct boundary cases. The Windows shell smoke is covered by the seven getShellConfig on Windows selection cases, now asserting complete invocation configs. Other shard files retain distinct lifecycle, authority, and error-classification contracts.
Consolidate terminal precedence decisions and query instruction cases, reuse the existing context model builder, and remove redundant successful-execution mock counts. Memory extra-path normalization remains covered by config-utils.test.ts: preserves distinct patterns and canonicalizes unpatterned objects; this shard retains default/agent composition proof. Distinct authority, lifecycle, and error paths remain.
Keep stored-byte preservation and isolated manager mutations in the stored-settings cases. Frozen settings until explicit reset remain covered by keeps policy settings frozen until reset without persisting attempts. Retain undefined, zero, and positive retry counts without repeating the same positive-count branch.
Keep distinct approval, privacy, recovery, and lifecycle assertions. Consolidate formatter cases and prompt fixture calls without changing their assertions. Drop equivalent cleared-wait cancellation rows in favor of absent-wait rows, and shorter startup replays in favor of the retained 240-second send/new cases. Nested-cause redaction remains covered through the real send failure path in tui-command-handlers.test.ts (send failure: secret-bearing cause). CI-only campaign: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Reduced shard from 4459 to 4423 lines, below the requested 25 percent target because remaining cases protect distinct boundaries and interleavings.
Remove duplicate model-catalog tests and owner fixture from stream support; registerEmbeddedModelCatalogTests in embedded-model-catalog.test-support.ts retains the same three catalog contracts. Align the stream harness with its existing caller instead of the stale nonexistent context export. Consolidate confirmation, collapse/reopen, bang-routing, history-gap, startup retry and image-render scenarios while retaining their branch assertions. Keep approval ownership, secret masking, cancellation races, recovery and persistence proof. Remove duplicate HTML formatting and RTL padding checks covered by assistant-error-format.test.ts and tui-formatters.rtl.test.ts. Command-marked finals remain covered by tui-event-handlers.test.ts; disconnected admission remains covered by tui-command-handlers.test.ts and the subscription recovery PTY case. CI-only: plain oxlint, oxfmt and diff-check pass; no tests run. This round removes 336 lines: 4423 to 4087. Original shard baseline is 4459 lines, so the total reduction is 8.3 percent and does not meet the requested 25 percent target.
Keep stale-reload suppression in the complete-drain reset case and remove separate coordinator probes covered by the event-handler queued-rebuild and final-before-failed-history cases. Keep pre-new captured-submit epoch protection; reset-time captured input is covered by tui-reset-transition-pty.e2e.test.ts. Remove the plugin coalescer call-count replay and the image abort/late-final replay covered by tui-event-handlers.test.ts, retaining attachment-error suppression locally. No tests run under CI-only instructions. Plain oxlint, oxfmt and diff-check pass. Shard is 4021 lines from original4459 (9.8 percent reduction), still below the requested25 percent; remaining distinct authority, privacy, recovery and persistence proof was retained.
Share maintenance admission fixtures and relay reads without changing lifecycle interleavings. Consolidate sandbox probe setup and retain the unavailable-engine diagnostic and remediation assertions. Drop the copied database family inventory from runtime JSON composition. Remaining boundary proof: status-database-engines.test.ts projects the same physical store facts in text and JSON; status-json.test.ts retains the experimental=false assertion. CI-only shard: no tests or coverage run. Formatting, diff check, and plain oxlint pass. Retain all distinct auth, sandbox, migration and recovery cases; the 25 percent line target is not reached.
Use the existing historical SQLite fixture and retain shared-path fencing, refusal, schema and data sentinels. Participant, creator and Goal-schema preservation remain covered by openclaw-agent-participants-migration, creator-namespace-migration and openclaw-agent-goal-operations-schema tests. Keep status runtime/backup scope proof while dropping JSON projections covered by status-json, status.usage-routing and status.update-ledger tests. Consolidate identical header-comparison variants and shared config, health and plugin fixtures; retain distinct safety paths. CI-only: plain oxlint, oxfmt and diff-check pass; no test, coverage or build runs. Combined shard reduction is 3988 to 3466 lines (13.1 percent), below the 25 percent target.
Share maintenance import and refusal setup, credential and sandbox status tables, exact archive helpers and scoped database cleanup. Keep every distinct admission, schema recovery, file preservation and lifecycle assertion. Remove duplicate HTTP auth execution from wizard tests: gateway/auth.test.ts, gateway/ingress-attribution.test.ts, gateway/net.test.ts and packages/net-policy/src/ip.test.ts retain matching and authority proof. Wizard tests assert exact emitted config and consent. Plain and escaped memory references remain covered by automatic-config-repair.test.ts and config-flow-steps.references.test.ts; retain canonical precedence with live env rotation here. Capture real status JSON writes. CI-only: formatting, plain oxlint and diff check pass; no tests or builds run. Combined shard is 3988 to 3277 lines, 17.8 percent down; the 25 percent target remains unmet.
Consolidate package, profile, and portable automation fixtures while retaining distinct authority, rollback, filesystem, and lifecycle assertions. Remove the duplicate golden digest case covered by the restrictive-umask golden artifact test. Remove mocked sibling-workspace drift covered by the initial reviewed-plan rejection and gateway planner occupancy-integrity tests. CI-only campaign: formatting, plain oxlint, and diff-check pass; runtime tests and coverage intentionally deferred to hosted CI. Safe reduction is 3959 to 3644 lines (8.0%), below the 25% target because remaining scenarios protect distinct boundaries.
Merge package cases into the runtime suite and portable automation into stateless Add without changing their Vitest project. Exercise MCP cleanup through pre-publish compensation instead of a mocked rollback plus separate helper replay. Retain package source and receipt assertions in the database-backed install flow, ownership rollback in stage compensation, and artifact/license/profile assertions in one deterministic build flow. Shared YAML feature branches remain covered by schema.test.ts; profile diagnostic routing stays covered here. CI-only validation: plain oxlint, oxfmt, and diff checks pass. No test or coverage runs. Cumulative shard LOC is 3959 to 3287, below the requested 25 percent reduction; distinct authority, filesystem, and lifecycle guards remain.
Reuse exactButton and twoFrames from chat-presentation support and configSnapshot from config-composer support. Use Node's JSON stream consumer for the synthetic token endpoint. Keep all existing scenario assertions and auth, lifecycle, persistence, protocol and rendering probes.
Share credential, imported-publication, transcript, tool lookup, and prewarm fixtures while retaining all test cases and security/lifecycle assertions. Redundant prewarm counts remain covered by ordered events, the elapsed-deadline test, and the failure-continuation warning. Further structural cuts would drop distinct behavior in this already-consolidated shard.
Collector cases remain in tool-resolution.swarm-collector.test.ts and terminal controls in tool-resolution.terminal.test.ts. Prewarm shutdown ordering remains in the handler row of server-idle-task.lifecycle.test.ts: joins started work before the Gateway sidecar owner closes. Keep credential precedence at its synchronous owner and secret materialization in the async cases. Cover imported binding precedence with an unprepared target and an older publication. Remove internal transcript reader instrumentation while retaining exact rendered output, privacy variants, and bounded-reader tests. Reuse the canonical environment restoration helper.
Replace the sandbox policy cross-product with representative owner paths, retaining native/prepared/loopback rename and admission proof. Generic policy variants remain in sandbox/tool-policy.test.ts and tools/sessions-create-tool.test.ts. Reuse the existing hanging MCP server and WebSocket close helpers. Consolidate authored credential provenance setup. Common guest merge/close denials remain in github-publication-actions.test.ts; generic cleanup-error continuation remains in test/helpers/qa-gateway-cleanup.test.ts while nested ACP join ordering stays here.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR consolidates test fixtures and overlapping assertions, moves two Claw suites into retained suites, and updates test-routing inventories. Example: A Claw plugin is claimed by another owner before failed Add compensation.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open for useful, maintainer-directed test consolidation; one small cleanup omission remains. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherVitest suites feed synthetic inputs through OpenClaw owners and assert results; CI inventories select which suites run. flowchart LR
A[Test fixtures] --> B[Retained suites]
C[CI inventories] --> B
B --> D[Production owners]
D --> E[Observed outcomes]
E --> F[Contract assertions]
Technical reviewBest possible solution: Remove the unused private rollback test adapter while preserving the consolidated owner-boundary assertions. Do we have a high-confidence way to reproduce the issue? No product bug is claimed; repository-wide reference inspection establishes the unused test adapter without executing target code. Is this the best way to solve the issue? Consolidating coverage into existing owner suites is appropriate, with the obsolete adapter removed to complete the cutover. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 768fc3b6530f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests -2726, Other -1. Total -2727 across 75 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 25, 2026, 7:34 AM ET / 11:34 UTC. |
* test(infra): minimize s0305 fixtures and assertions Type triage inputs as failure artifacts instead of full updater results, removing unused plugin metadata. Consolidate handoff payload and recovery assertions while retaining error outcomes, private permissions, descendant cleanup, and recovery ordering. Use the credential operation producer for fixture rows, reuse exception capture, minimize the symlink-refusal database, and scope snapshot spy disposal. Keep snapshot callback coverage in the late-registration test and exact restoration diagnostics in handoff result tests. Preserve all test cases and native-execution guards. CI-only static validation: oxfmt, plain oxlint and git diff --check passed. No tests or builds run. Cumulative line target remains unmet; retained legacy rollback and Unicode custody cases have distinct regression boundaries. * test(gateway): deslop s0307 tests Consolidate avatar retry setup, OAuth transport fixtures, setup settlement observation, narration projections, and scoped sharing spy cleanup. Preserve all cases and distinct auth, recovery, privacy, and ordering assertions. CI-only shard: plain oxlint, oxfmt, and diff-check pass. No test or coverage execution. Dense retained boundaries prevent the 25 percent line target; total 4444 to 4393 lines. * test(gateway): remove duplicate s0307 proof layers Delete the matching lifecycle block copied verbatim into cron-stream-output.interleavings.test.ts. cron-stream-matching.test.ts retains long-line delivery, matcher timeout, disable accounting, cancellation joining, and dropped-prefix cases. Keep hardlink rejection in control-ui.http.test.ts, malformed route variants in control-ui-contract.test.ts, and identity precedence in assistant-identity.test.ts. Consolidate Tailscale exit assertions into its recovery case and retain separate Serve/Funnel branch rows. Replace repeated abort fixture teardown with owner disposal and remove repeated sharing guard assertions. CI-only: plain oxlint, oxfmt, and diff-check pass; no test or build execution. Additional reduction 4393 to 4195 lines; original shard 4444 to 4195. Remaining distinct boundary and interleaving proof prevents the 25 percent target. * test(gateway): consolidate s0307 fixture layers Table avatar projection outcomes without dropping branches. Keep one animated WebP pass-through case while the APNG data case retains decoder-to-animation coverage. Replace custom socket capture with the standard stream consumer; retain deadline, rejection, graceful EOF, and exact wire assertions. Fold the standalone alias worker-grant case into the stronger alias grant-revocation lifecycle row. Preserve release custody and all distinct authority assertions. CI-only static gates: plain oxlint, oxfmt, and diff-check pass. No test or build runs. Additional 4195 to 4124 lines; cumulative 4444 to 4124 (7.2 percent), short of the 25 percent target because further whole-case cuts lack equivalent boundary proof. * test(matrix): deslop s0308 tests Consolidate repeated approval fixtures, trace steps, action options and account configuration while preserving all expanded cases. Exact FIFO request order retains the removed count assertions; exact inspect event order retains duplicate lifecycle call assertions. CI-only validation: formatting, plain oxlint and diff-check; runtime proof deferred to hosted CI. Reduction is 263 of 4235 lines (6.2%); distinct authority, lifecycle, routing and persistence coverage prevents an honest 25% cut. * test(state): deslop s0309 tests Remove duplicate v22 cursor/resume and repair cases from the v21 suite; openclaw-state-db-schema-v22-columns.test.ts retains the same local schema, identity, backup, runtime/Doctor and repair assertions. openclaw-state-db-task-index-migration.test.ts retains the duplicated v22/v23 task-index migration, cron upsert and publication rollback cases. Keep failed-preparation custody proof in openclaw-state-db-readonly.retained.test.ts, which exercises the real reader transport through a mocked worker pool. Consolidate historical JSON extraction fixtures without changing their SQL tokens. No production changes; no test cases folded. CI-only validation: targeted oxfmt, plain oxlint and git diff --check passed; static historical SQL comparison matched. Tests and coverage were not run per campaign instruction. The remaining authority, corruption, migration and lifecycle cases have distinct boundaries, so the shard stops below the 25 percent LOC target. * test(state): trim redundant s0309 coverage Retain seal mismatch proof in openclaw-agent-db.integrity-cache.test.ts (reports the next admission clean-close outcome), and lazy snapshot identity/lifecycle proof in openclaw-state-db-readonly.snapshot-admission.test.ts (lets a sync reader join the same lazy preparation started by an async reader). Remove the plural lease adapter wiring replay; group grant, custody and settlement tests remain. Consolidate background preference presentation and selection rows. Keep warm-feature transaction checks in the durable-installation test; remove per-feature replays of schema-ensure warm paths. Real secret creation remains in secret-store.test.ts, and promoted-column behavior remains in transcripts/store.test.ts and delivery-queue owner tests. Replace cleanup-ID SQL logging with direct worker result assertions, retaining malformed-path and no-host-SQL proof. Drop repeated historical INSERT column inventories only after statically verifying identical table-column order. No production changes or test runs; targeted oxfmt, plain oxlint and diff check passed. This second cut removes 295 more lines; cumulative 5012 to 4106 remains below the requested 25 percent because further identified cuts would remove distinct authority, migration or lifecycle proof. * test(gateway): deslop s0310 tests Consolidate auth retry lifecycle fixtures, transcript publication observers, and model configuration setup while retaining distinct authority and lifecycle cases. Keep ZIP as the representative Full Access host download: TXT and PDF use the same sessions-file-download path. Text HTTP bytes remain covered by artifact-downloads.test.ts; PDF GET, HEAD, and range bytes remain covered by server.agent-artifact-apis.test.ts. The retained host test still checks exact bytes and permission revocation. CI-only campaign: plain oxlint, oxfmt, and diff checks pass; tests and coverage were intentionally not run. Static cases 99 to 97; shard lines 3890 to 3823. Below the 25% target because further cuts would remove distinct authority, lifecycle, or externally used helper contracts. * test(gateway): consolidate s0310 duplicate proof layers Remove catalog policy replay covered by sessions-describe-worker current-agent cases, session-utils-model.thinking-default owner cases, and session-utils.metadata-perf catalog publication. Roster status and run IDs remain covered by sessions-read-active pagination/activity cases. Remove ordinary model-policy replays covered by utility-model-setting, model-selection-alias-scope, model-ref-profile, and doctor-config-analysis fallback suppression. Keep the selected-agent alias/utility and disabled-utility gateway regressions. Consolidate auth retry tables, dirty-topology discovery proof, and Claw selection/review/publication fixtures. Keep exact publication bytes, credentials, revision conflicts and authority revocation. Remove the lower-size draft duplicate; the maximum-size case exercises the same save and conflict branches. CI-only: no test, coverage or build runs. Plain oxlint, oxfmt and diff checks pass. Original shard 3890 lines to 3620; reduction remains below 25% because remaining cases and shared support retain distinct boundaries. * test(gateway): remove remaining s0310 fixture duplication Assert Claw selection directly through the RPC review response instead of replaying prepareClawDraft, retain exact selected files and exclusion metadata, and use a minimal native YAML manifest fixture. Retain reviewed archive bytes and publication authority checks. Reuse the existing request gate for discovery interleavings, trim unused model probe summary/config metadata, and leave generic alias parsing to model-selection and model-selection-alias-scope owner tests while retaining selected-agent model and utility composition cases. Remove createAccountCronJob after repository-wide search found no callers. Other approval and cron support exports remain consumed. CI-only: no tests or builds run; plain oxlint, oxfmt and diff checks pass. Shard now 3561 lines versus original 3890; below 25% because apparent remaining siblings exercise distinct request paths or authority checkpoints. * test(telegram): deslop s0311 tests * test(telegram): consolidate s0311 fixtures and redundant proof Reuse the existing Telegram HTTP fixture for model callback proof. Keep per-callback authorization assertions and remove internal catalog-call inventories. The retained credited-blockquote split test covers the removed uncredited split input. The serial commit case covers the success path exercised by the removed disk-error test, whose optional error callback was never invoked. Keep missing-cache coverage as the direct-message recovery negative control. * test(telegram): consolidate s0311 branch tables and lifecycle fixtures Share parser and scoped authorization assertion tables, preserve menu publication ordering without duplicate counts, and use one deferred lifecycle fixture for first-turn and serial-lane holds. Combine legacy promotion and embedded-ancestry reopen proof while retaining explicit thread correction and storage assertions. Remove repeated model callback HTTP inventories while keeping real outcomes, authorization and media cleanup ordering. * test(matrix): remove s0308 fixture-only layers Port s0308 commits 4fc04a9fb8a2e7bac4cd1eb4b585707ee71c1b03, 30721c9ab2187d21c3f34096905896dab5b585d9, and 444611248bdc3d6b53f4976c9e7e1c54ddd5c4d6 onto the campaign lane. The first commit was already represented. Preserve the lane mock setup and unrelated suppression cleanup while applying the remaining test consolidations and fixture removal. CI-only proof: oxlint and oxfmt --check passed on all 11 changed files; git diff --check and staged diff check passed. Source-only autoreview found no actionable P0-P2 findings. Tests intentionally not run; affected tests are deferred to landing PR CI. * test(agents): deslop s0314 tests Share repeated schema, filesystem, environment, and provider fixtures without dropping distinct boundary cases. The Windows shell smoke is covered by the seven getShellConfig on Windows selection cases, now asserting complete invocation configs. Other shard files retain distinct lifecycle, authority, and error-classification contracts. * test(agents): consolidate s0314 boundary fixtures Consolidate terminal precedence decisions and query instruction cases, reuse the existing context model builder, and remove redundant successful-execution mock counts. Memory extra-path normalization remains covered by config-utils.test.ts: preserves distinct patterns and canonicalizes unpatterned objects; this shard retains default/agent composition proof. Distinct authority, lifecycle, and error paths remain. * test(agents): trim duplicate settings snapshot checks Keep stored-byte preservation and isolated manager mutations in the stored-settings cases. Frozen settings until explicit reset remain covered by keeps policy settings frozen until reset without persisting attempts. Retain undefined, zero, and positive retry counts without repeating the same positive-count branch. * test(tui): deslop s0312 tests Keep distinct approval, privacy, recovery, and lifecycle assertions. Consolidate formatter cases and prompt fixture calls without changing their assertions. Drop equivalent cleared-wait cancellation rows in favor of absent-wait rows, and shorter startup replays in favor of the retained 240-second send/new cases. Nested-cause redaction remains covered through the real send failure path in tui-command-handlers.test.ts (send failure: secret-bearing cause). CI-only campaign: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Reduced shard from 4459 to 4423 lines, below the requested 25 percent target because remaining cases protect distinct boundaries and interleavings. * test(tui): consolidate s0312 test layers Remove duplicate model-catalog tests and owner fixture from stream support; registerEmbeddedModelCatalogTests in embedded-model-catalog.test-support.ts retains the same three catalog contracts. Align the stream harness with its existing caller instead of the stale nonexistent context export. Consolidate confirmation, collapse/reopen, bang-routing, history-gap, startup retry and image-render scenarios while retaining their branch assertions. Keep approval ownership, secret masking, cancellation races, recovery and persistence proof. Remove duplicate HTML formatting and RTL padding checks covered by assistant-error-format.test.ts and tui-formatters.rtl.test.ts. Command-marked finals remain covered by tui-event-handlers.test.ts; disconnected admission remains covered by tui-command-handlers.test.ts and the subscription recovery PTY case. CI-only: plain oxlint, oxfmt and diff-check pass; no tests run. This round removes 336 lines: 4423 to 4087. Original shard baseline is 4459 lines, so the total reduction is 8.3 percent and does not meet the requested 25 percent target. * test(tui): remove s0312 duplicate lifecycle probes Keep stale-reload suppression in the complete-drain reset case and remove separate coordinator probes covered by the event-handler queued-rebuild and final-before-failed-history cases. Keep pre-new captured-submit epoch protection; reset-time captured input is covered by tui-reset-transition-pty.e2e.test.ts. Remove the plugin coalescer call-count replay and the image abort/late-final replay covered by tui-event-handlers.test.ts, retaining attachment-error suppression locally. No tests run under CI-only instructions. Plain oxlint, oxfmt and diff-check pass. Shard is 4021 lines from original4459 (9.8 percent reduction), still below the requested25 percent; remaining distinct authority, privacy, recovery and persistence proof was retained. * test(commands): deslop s0313 tests Share maintenance admission fixtures and relay reads without changing lifecycle interleavings. Consolidate sandbox probe setup and retain the unavailable-engine diagnostic and remediation assertions. Drop the copied database family inventory from runtime JSON composition. Remaining boundary proof: status-database-engines.test.ts projects the same physical store facts in text and JSON; status-json.test.ts retains the experimental=false assertion. CI-only shard: no tests or coverage run. Formatting, diff check, and plain oxlint pass. Retain all distinct auth, sandbox, migration and recovery cases; the 25 percent line target is not reached. * test(commands): consolidate s0313 duplicate proof layers Use the existing historical SQLite fixture and retain shared-path fencing, refusal, schema and data sentinels. Participant, creator and Goal-schema preservation remain covered by openclaw-agent-participants-migration, creator-namespace-migration and openclaw-agent-goal-operations-schema tests. Keep status runtime/backup scope proof while dropping JSON projections covered by status-json, status.usage-routing and status.update-ledger tests. Consolidate identical header-comparison variants and shared config, health and plugin fixtures; retain distinct safety paths. CI-only: plain oxlint, oxfmt and diff-check pass; no test, coverage or build runs. Combined shard reduction is 3988 to 3466 lines (13.1 percent), below the 25 percent target. * test(commands): reduce s0313 fixture and projection duplication Share maintenance import and refusal setup, credential and sandbox status tables, exact archive helpers and scoped database cleanup. Keep every distinct admission, schema recovery, file preservation and lifecycle assertion. Remove duplicate HTTP auth execution from wizard tests: gateway/auth.test.ts, gateway/ingress-attribution.test.ts, gateway/net.test.ts and packages/net-policy/src/ip.test.ts retain matching and authority proof. Wizard tests assert exact emitted config and consent. Plain and escaped memory references remain covered by automatic-config-repair.test.ts and config-flow-steps.references.test.ts; retain canonical precedence with live env rotation here. Capture real status JSON writes. CI-only: formatting, plain oxlint and diff check pass; no tests or builds run. Combined shard is 3988 to 3277 lines, 17.8 percent down; the 25 percent target remains unmet. * test(claws): deslop s0315 tests Consolidate package, profile, and portable automation fixtures while retaining distinct authority, rollback, filesystem, and lifecycle assertions. Remove the duplicate golden digest case covered by the restrictive-umask golden artifact test. Remove mocked sibling-workspace drift covered by the initial reviewed-plan rejection and gateway planner occupancy-integrity tests. CI-only campaign: formatting, plain oxlint, and diff-check pass; runtime tests and coverage intentionally deferred to hosted CI. Safe reduction is 3959 to 3644 lines (8.0%), below the 25% target because remaining scenarios protect distinct boundaries. * test(claws): consolidate s0315 owner-boundary suites Merge package cases into the runtime suite and portable automation into stateless Add without changing their Vitest project. Exercise MCP cleanup through pre-publish compensation instead of a mocked rollback plus separate helper replay. Retain package source and receipt assertions in the database-backed install flow, ownership rollback in stage compensation, and artifact/license/profile assertions in one deterministic build flow. Shared YAML feature branches remain covered by schema.test.ts; profile diagnostic routing stays covered here. CI-only validation: plain oxlint, oxfmt, and diff checks pass. No test or coverage runs. Cumulative shard LOC is 3959 to 3287, below the requested 25 percent reduction; distinct authority, filesystem, and lifecycle guards remain. * test(ui): share remaining s0317 fixture utilities Reuse exactButton and twoFrames from chat-presentation support and configSnapshot from config-composer support. Use Node's JSON stream consumer for the synthetic token endpoint. Keep all existing scenario assertions and auth, lifecycle, persistence, protocol and rendering probes. * test(gateway): deslop s0318 tests Share credential, imported-publication, transcript, tool lookup, and prewarm fixtures while retaining all test cases and security/lifecycle assertions. Redundant prewarm counts remain covered by ordered events, the elapsed-deadline test, and the failure-continuation warning. Further structural cuts would drop distinct behavior in this already-consolidated shard. * test(gateway): remove duplicate s0318 test layers Collector cases remain in tool-resolution.swarm-collector.test.ts and terminal controls in tool-resolution.terminal.test.ts. Prewarm shutdown ordering remains in the handler row of server-idle-task.lifecycle.test.ts: joins started work before the Gateway sidecar owner closes. Keep credential precedence at its synchronous owner and secret materialization in the async cases. Cover imported binding precedence with an unprepared target and an older publication. Remove internal transcript reader instrumentation while retaining exact rendered output, privacy variants, and bounded-reader tests. Reuse the canonical environment restoration helper. * test(gateway): consolidate s0318 policy and lifecycle fixtures Replace the sandbox policy cross-product with representative owner paths, retaining native/prepared/loopback rename and admission proof. Generic policy variants remain in sandbox/tool-policy.test.ts and tools/sessions-create-tool.test.ts. Reuse the existing hanging MCP server and WebSocket close helpers. Consolidate authored credential provenance setup. Common guest merge/close denials remain in github-publication-actions.test.ts; generic cleanup-error continuation remains in test/helpers/qa-gateway-cleanup.test.ts while nested ACP join ordering stays here. * test(telegram): avoid shadowing command fixture * test: preserve d528 boundary coverage and current fixtures * test: preserve current d528 fixture and rollback contracts * test(gateway): retain lint-safe lifecycle fixtures
What Problem This Solves
Replay batch d528's test reductions onto pinned main 60c3a7c. Consolidate fixture setup and overlapping assertions, while preserving current-main regressions and ownership boundaries. No production behavior changes. Two Claw test suites move into the retained runtime/stateless suites; their CI inventory entries are removed.
User Impact
No user-visible behavior change. This reduces duplicated test and fixture maintenance without changing production code, dependencies, or operator configuration.
Why This Change Was Made
Keep each distinct contract at its strongest retained test boundary and consolidate repeated setup. Current main wins wherever older cleanup layouts conflict with newer assertions.
Evidence
CI-only validation as requested: frozen-lockfile install, oxfmt on changed existing files, plain oxlint on changed JS/TS files (exit 0), and git diff --check passed. No Vitest, typecheck, check-changed, coverage, builds, or Testbox runs were performed locally. Hosted openclaw/ci-gate is the execution proof. A replay-introduced shadowed command variable was renamed after lint caught it. Independent full-diff autoreview identified two concrete test defects and seven coverage concerns; those are resolved. All correction-delta reviews completed with no actionable P0-P2 findings. The initial undefined-Matrix-variable finding was rejected because the binding already exists immediately above the assertions.
The source shard reports explicitly say coverage was not run under CI-only mode; no numerical coverage preservation claim is made. Source reports are historical campaign evidence, not execution proof for this head.
Rebased shard inventory
Counts below compare the actual replay against pinned main, not the original campaign tree. Declaration counts are static it/test call counts (tables count once), not executed case counts.
Production LOC: +0/-0. Tests/support (including suppression expectation): +3246/-5970 (net -2724). CI test routing: +0/-3.
Files and source coverage statements by shard
s0305
src/infra/client-credential-store.test.tssrc/infra/update-triage-resolution.test.tsSource report coverage statement: Plain oxlint, oxfmt, and
git diff --checkpassed. Tests, coverage, Testbox, and check-changed were not run, per CI-only mode; no coverage result is claimed. No bug fixes were made.s0307
src/gateway/github-oauth-lifecycle-helpers.test.tssrc/gateway/github-repository-publication.test-support.tssrc/gateway/server-broadcast.narration.test.tssrc/gateway/server-http.rejection-transport.test.tssrc/gateway/server-tailscale.test.tssrc/gateway/session-sharing-committed-read.test.tssrc/gateway/setup-inference.first-signin.integration.test.tsSource report coverage statement: Plain oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and check-changed were not run, as required by CI-only mode.s0308
extensions/matrix/src/approval-handler.runtime.test.tsextensions/matrix/src/channel.directory.test.tsextensions/matrix/src/direct-encryption.test.tsextensions/matrix/src/exec-approvals.test.tsextensions/matrix/src/onboarding.test-harness.tsextensions/matrix/src/onboarding.test.tsextensions/matrix/src/session-route.test.tsextensions/matrix/src/tool-actions.test.tsSource report coverage statement: Formatting, plain oxlint (exit 0), and diff-check passed. Tests, coverage, and typechecks were not run under CI-only instructions; hosted CI remains pending.
s0309
src/state/agent-deletion-journal.snapshot.test.tssrc/state/openclaw-agent-db-open-authority.test.tssrc/state/openclaw-state-db-readonly.worker-lifecycle.test.tssrc/state/openclaw-state-db-schema-additive.test.tssrc/state/openclaw-state-db-schema-v21-columns.test.tssrc/state/openclaw-state-schema-v13-widerow.test-support.tssrc/state/user-background.test.tsSource report coverage statement: | File | Lines before → after | Distinct coverage retained | Plain oxlint exited 0; formatting and
git diff --checkpassed. No production changes or bug fixes. Tests, coverage, and check-changed were not run, per CI-only instructions.s0310
src/gateway/server-methods/chat-send-admission-authority.test.tssrc/gateway/server-methods/claws-drafts.test.tssrc/gateway/server-methods/control-ui.session-preview.test.tssrc/gateway/server-methods/models-probe.test.tssrc/gateway/server-methods/session-discovery.authority.test.tssrc/gateway/server-methods/sessions-describe-catalog.test.tssrc/gateway/server-methods/sessions-files.host-read.test.tssrc/gateway/server-methods/system-agent-setup-auth-retry.test.tsSource report coverage statement: Plain oxlint exited 0; formatting and diff-check passed. Tests, coverage, and check-changed were intentionally not run under CI-only mode. Coordinator decision: accept the shortfall or assign broader consolidation scope.
s0311
extensions/telegram/src/bot-handlers.message-context.runtime.test.tsextensions/telegram/src/bot-native-command-menu-sync.test.tsextensions/telegram/src/message-cache.retained.test.tsextensions/telegram/src/rich-blocks.test.tsextensions/telegram/src/telegram-ingress-coalescing-fixture.test-support.tsextensions/telegram/src/telegram-ingress-supersede.test.tsSource report coverage statement: Plain oxlint, formatting, and diff checks passed. Tests, coverage, and check-changed were intentionally not run under CI-only mode.
s0314
src/agents/agent-project-settings.test.tssrc/agents/agent-run-terminal-outcome.test.tssrc/agents/agent-tools.workspace-paths.test.tssrc/agents/bash-tools.exec.resolve-env-hook.test.tssrc/agents/context.lookup.test.tssrc/agents/tool-search-runtime.output-variants.test.tsSource report coverage statement: Plain oxlint exited 0; oxfmt and
git diff --checkpassed. Tests and coverage were not run, per CI-only instructions. No production/support changes, deleted files, or bug fixes. Worktree is clean; nothing pushed.s0312
src/tui/gateway-chat.startup.test.tssrc/tui/tui-images.test.tssrc/tui/tui-last-session.test.tssrc/tui/tui-plugin-approvals.test.tssrc/tui/tui-questions.test.tssrc/tui/tui-session-abort.test.tssrc/tui/tui-session-history-selection.test.tssrc/tui/tui-task-suggestions.test.tssrc/tui/tui.submit-handler.test.tsSource report coverage statement: Plain oxlint exited 0; formatting and diff-check passed. Tests, coverage, and check-changed were not run under CI-only mode. Coordinator decision: accept this below-target reduction or revisit the retained contracts.
s0313
src/commands/doctor-lint.plugin-path-inspection.test.tssrc/commands/doctor-maintenance.worker.test.tssrc/commands/doctor-sandbox.warns-sandbox-enabled-without-docker.test.tssrc/commands/doctor-session-sqlite.shared-store.test.tssrc/commands/doctor-tools-md-migration.test.tssrc/commands/doctor-update-rehearsal-inventory.test.tssrc/commands/health-format.test.tsSource report coverage statement: Formatting, diff-check, and plain oxlint passed. No tests, coverage, builds, or Testbox commands ran, per CI-only mode. No production/support files changed or files deleted.
s0315
src/claws/add-portable-automation.test.tssrc/claws/add-stateless.test.tssrc/claws/openclaw-profile.test.tssrc/claws/packages.runtime.test.tssrc/claws/packages.test.tsSource report coverage statement: Formatting, plain oxlint and
git diff --checkpassed. Tests, coverage and check-changed were not run, per CI-only mode. No production/support changes, file deletions, or bug fixes.s0317
ui/src/e2e/chat-flow.test-support.tsui/src/e2e/sidebar-attention-scope.e2e.test-support.tsSource report coverage statement: Plain oxlint, formatting, and
git diff --checkpassed. Tests and coverage were not run, per CI-only mode. Coordinator review and hosted CI remain pending.s0318
src/gateway/credentials.test.tssrc/gateway/github-publication-imported-actions.test.tssrc/gateway/server-worker-environment-startup.prepared.test-support.tssrc/gateway/server.sessions.store-paths.test.tssrc/gateway/session-transcript-title-reader.test.tsSource report coverage statement: s0318: 4,382 → 4,313 lines, −69 (1.6%). The 25% target was not met. All 68 test declarations remain; execution counts and coverage were not measured under CI-only mode. Plain oxlint exited 0; formatting and diff-check passed. No tests, coverage, builds, Testbox, or autoreview ran.
Replay decisions
29 of 30 supplied commits applied, preserving subjects. Skipped 13612d1b2951519c0d071c557037f2f80300e3d7: its unused UI helper removals are already represented in current main; no remaining applicable change.
Conflicting cleanup hunks were dropped, retaining the pre-pick/main versions, in: infra handoff triage and Unicode custody; Gateway narration and abort authorization; Matrix outbound (both commits); state schema-v21 fixture cleanup; cron validation helper (already absent on main); Telegram command-menu, rich HTML and supersede table consolidation; exec egress lifecycle; embedded TUI stream fixtures and task-suggestion consolidation; Claw plugin-batch, plan and project consolidation; Gateway tool-resolution (both commits) and MCP shutdown fixtures. Earlier cleanly applied changes in these files remain. Current main's prompt, stop, typed-message, migration, security and lifecycle assertions were not replaced by older campaign layouts.
Resolved three small conflicts by intent: Telegram supersede uses the candidate record helper with current typed channel-DM fields; health formatting uses the shared assertion with main's fixed auth-stabilizing text; Claw stateless Add preserves main's explicit guards while moving portable-automation cases and adapting the manifest fixture.
CODEOWNERS visibility: none of the changed paths match the pinned repository's CODEOWNERS entries. No releases, dependency changes, live-state writes, or Testbox leases.
CI and review correction
Initial CI run https://github.com/openclaw/openclaw/actions/runs/40186626909 exposed current-type incompatibilities and a Doctor recovery fixture failure. Restored pinned-main versions of memory-search, shell-utils, Matrix delivery-trace and outbound-currentness, Telegram history, status JSON, TUI run coordination, session rename, Doctor SQLite recovery, and the plugin-settings/provider-login UI support files. Fixed the Claw assert import, normalized the background read comparison, and made the discovery gate callback await without returning a value.
Conservatively restored the full pinned-main files containing trusted-proxy authorization, hard-link avatar, dedupe disk-error, reviewed workspace race, invalid database seal, expression-index backup, and nested TUI error-redaction coverage. These restorations supersede the corresponding initial reductions. No local tests or typechecks were run. The fresh-head hosted gate remains the required execution proof. The initial PR-body heading failure was corrected to the required template headings.
Second CI run https://github.com/openclaw/openclaw/actions/runs/40187281080 cleared the original type-check failures but found Matrix approval reason, Doctor deferred-input, Claw retained-resource warning, Telegram return-style, and stale removed-mock-baseline failures. Restored pinned-main Matrix approval-config, Doctor legacy-composition, Telegram model-loopback, and state lease-worker-group tests. The Claw compensation assertion now checks the exact current retained-shared-requirements warning for the changed-MCP branch, retaining exact plain failure text after successful rollback. No baseline allowance was changed or assertion weakened. Independent review of this correction was clean through P2.
The same run's late type-aware core lint result also flagged an unbound method in the reload-handler fixture and synchronous results passed to a promise aggregator in prewarm tests. Both files were restored to pinned main; independent review of that restoration was clean through P2 before push.