Repository navigation
test(gateway,agents,plugins): remove low-value tests (batch d476) - #182687
Conversation
Consolidate transcript event fixtures and collectors, media request and cleanup setup, and config hash boundary proof. The subscribed-operator test retains appended-message persistence proof; the committed-turn web/TUI test retains reconnect history proof. Spawn and route fields share the same real transcript projection. Runtime revision proof also rejects the internal config digest. CI-only: plain oxlint, oxfmt, and diff-check pass. Static expanded cases 117 to 113; test lines 4758 to 4472. Keep distinct auth, lifecycle, recovery, ownership, and ordering paths; 35 percent is not safely attainable in this shard.
Keep socket-specific auth, presence, profile parity, ordered delivery and hidden-message dispatch. Remove replayed invalidation, sequence, global routing, marker and display-cap cases already covered by server-session-events.test.ts and its marker-queue support, chat-display-projection.test.ts, and server.sessions.list-changed.test.ts. Move shared spawn/goal snapshot checks into the retained transcript event case. Viewer normalization and replace/clear behavior remain in server-methods/sessions-viewers.test.ts and server.auth.presence-modes.test.ts. Profile identity/name detail remains in sessions-history-http.test.ts and chat-display-projection.test.ts; this suite retains same-clock avatar parity for WebSocket, history and message-get. Media download, promotion, visibility and cross-agent cleanup remain in managed-image-actions.e2e.test.ts, chat-reply-media.large-video.test.ts, managed-image-record-store.test.ts, managed-image-attachments.sqlite-visibility.test.ts and managed-outgoing-gc-availability.test.ts. Config copy-fallback variants remain in io.write-config.test.ts and io.write-reread.test.ts. CI-only static gates: oxfmt, plain oxlint and diff-check. No test, coverage or build runs. Total shard lines 4758 to 3579; preserve remaining distinct boundaries rather than force the 35 percent target.
Use deterministic scope-owned socket disposal, consolidate subscription and worker metadata assertions, and remove a duplicate delivery-position assertion covered by the retained collector order check. Share config write-invalidate-read seeding and combine equivalent global-media cleanup fixtures while retaining both explicit and legacy ownership cases. Keep all 91 expanded cases from the prior shard revision. CI-only: oxfmt, plain oxlint, and diff-check pass; no test, coverage, or build commands run. This pass reduces 3579 to 3463 lines; cumulative reduction is 27.2 percent, short of the requested 35 percent.
Remove creation-witness copies of clean restart refusal, malformed native receipt, and warm-turn admission tests. Identical behavior remains in openclaw-agent-execution.schema-admission.test.ts. Reuse the existing dangling Workshop index fixture in preflight and ownership tests, retaining both admission and ownership-race assertions. CI-only validation: oxfmt, diff check, and plain oxlint.
Keep migration rollback proof in openclaw-state-db-schema-version.test.ts (publishes migration-owned content markers through rollback and authorizer checks); retain sibling snapshot publication and dropped-table checks in schema-policy. Consolidate peer revocation into the raced-publication case, WAL inspection into its refusal case, and read-only ownership into maintenance fencing. Remove internal call-shape and duplicate state assertions; reuse typed fixtures and source admission builders. Preserve the remaining distinct authority and durability interleavings. CI-only validation: oxfmt, git diff --check, and plain oxlint passed. No tests or coverage executed. Original shard 5253 lines to 4885; 35 percent target remains unmet.
Consolidate schema refresh, reader adoption, and additive repair in one retained-reader flow. Consolidate shared-store warm/cold row removal with the archive/no-host-SQL proof; higher-level purge wrapper coverage remains in preserves a survivor handle first opened during cleanup. Remove preflight replays covered by sqlite-schema-contract.test.ts (accepts a compatible future additive column only when enabled; preserves index issue order when a missing index is allowlisted), memory-schema.test.ts (uses the compound chunk index after opening a database and readmitting it), and openclaw-agent-db.test.ts (repairs every missing or drifted canonical agent-state named index). Remove copied metadata/inventory assertions. CI-only checks: oxfmt, git diff --check, plain oxlint passed. No tests or coverage run. Original shard 5253 lines to 4778; 35 percent target remains unmet without discarding distinct behavior.
Consolidate queued commit-order proof into confirms identical queued messages only after their own transcript commits, and listener removal into the ordinary listener snapshot case. Keep persistence-before-publication assertions at each queued commit. Move context invalidation proof into recovers through the overflow limit with context invalidated before every retry. First-overflow success remains covered by strips stale thinking signatures before continuing after auto-compaction. Remove only the successful caller-owner duplicate; explicit caller overflow recovery remains covered. Reuse local stream fixtures, retain same-run next-turn message identity, and trim repeated frozen graph checks; FIFO remains covered by commits user and custom messages in FIFO order. Preserve distinct authority, custody, cancellation, durability and context traversal cases. CI-only campaign: plain oxlint, oxfmt and diff checks passed. No tests, coverage, builds or Testbox commands run. Honest reduction is below target because remaining cases protect distinct boundaries.
Share high-usage and summary-policy scenarios while retaining each success, failure, cancellation and terminal branch. Manual short-history compaction remains covered by caps extension summaries before persistence and manual return. Unobserved extension delivery remains covered by observes live handler registration and awaits handlers inside write settlement. Remove JSON normalization replays covered by src/config/sessions/transcript-json.test.ts: retains ordinary shared JSON and unchanged frozen containers, copies changed frozen containers without changing the source, and matches native JSON bytes. Keep async capture and serialization integration assertions. Remove duplicate FIFO and host-write checks covered by session-manager-async-entries.test.ts. Keep fresh-message and stale-keyed-replay admission checks. Drop repeated context matrix payloads covered by dedicated pairing and checkpoint cases and session-manager-model-context-limits.test.ts. Remove repeated sender/timestamp rendering assertions covered by attempt.llm-boundary.cache-stability.test.ts and attempt.llm-boundary.test.ts while retaining steering admission timestamps and persisted/runtime content ownership. Preserve compaction item correlation, aborted accounting, stale authority and durable recovery boundaries. CI-only: plain oxlint, oxfmt and diff checks pass; no tests, builds or coverage run. Combined shard reduction remains below the requested 35 percent; no further safe duplicate layer was identified.
Use one context-mutation setup for the existing nine admitted and unadmitted cases. Preserve independent expected context, exact admission typing, and append/rewrite/delete/branch/compaction/reset/cross-session behaviors. Share pending-input staging, out-of-turn rejection assertions, and abortable queued-run startup. Reuse the canonical zero-usage fixture and trim unused summary fixture text. Plain oxlint, formatting and diff checks pass. CI-only: no tests, builds or coverage were run. No cases or production files removed in this round. The shard still cannot meet the 35 percent target without removing distinct boundary proof identified in the retained cases.
Remove the middleware-ordering replay covered by openclaw-owned-tool-runtime-contract.test.ts: wraps dynamic tools with hooks and runs result middleware before the after hook. Consolidate result-only bridge fixtures and repeated diagnostic/requester context. Keep auth-bridge and side-question unchanged: remaining cases exercise distinct credential authority, policy, and lifecycle boundaries. Static lint/format/diff gates only; tests and coverage deferred to hosted CI per campaign instructions.
Keep side-question flow checks while removing repeated config and context inventories. Native-hook-relay disabled config, turn-params timezone, side-question.model-selection reasoning, config network proxy, and plugin-thread-config ask-policy tests retain their owner contracts. Fold disabled-relay flow into the ephemeral fork case. Consolidate auth fallback and workspace-rejection setup without deleting branch cases. Remove dynamic MCP delegation, disabled-catalog, async replay, and Decision cancellation replays covered by dynamic-tools.gateway-policy, run-attempt-tools, event-projector.dynamic-tools, generic per-call cancellation, and src/decisions/runtime tests. CI-only campaign: plain oxlint, oxfmt, and diff-check passed. No tests or coverage run. Original shard 5290 lines to 4895; the 35 percent target remains unmet because remaining distinct authority, lifecycle, and schema behavior has no demonstrated replacement.
Replace repeated scoped and persisted auth setup with a typed fixture. Reuse screenshot/schema fixtures and remove mocked Decision and memory-reply replays covered by openclaw-tools.decision and tool-terminal-outcome owner tests. Drop side-question copies of model selection covered by run-attempt and thread-lifecycle binding tests, domain enforcement covered by dynamic-tool-build.web-search and web-tools.fetch, and disconnect coverage held by ephemeral-turn plus retained side cleanup cases. Remove nonexistent registerSideQuestionForkTests registration; standalone side-question.fork.test.ts owns those cases. No test runs per CI-only instructions. Plain oxlint, oxfmt, and diff-check pass. Original shard 5290 lines to 4548; remaining unique credential, lifecycle, and schema cases prevent a justified 35 percent cut.
Remove duplicate guild authorization/arguments and direct-status layers covered by native-command.commands-allowfrom.test.ts and native-command.status-direct.test.ts. Keep bot-owned thread admission and schema coverage in message-handler.preflight-owned-threads.test.ts. The authoritative runtime verification table retains default-runtime dispatch assertions. Reuse local session, notice, delivery, binding, and route fixtures while preserving distinct ownership and lifecycle cases. CI-only validation: plain oxlint, oxfmt, and diff check. No tests or coverage run. Known baseline issue: native-command.plugin-dispatch.test.ts imports missing native-command.test-support.js.
Consolidate hidden model dispatch outcomes and presence retry branches. Remove self-proving plugin command-name wrapper and redundant helper-call assertions, while preserving model scope, component-document admission, and post-unbind echo proof. Remaining concurrency owner proof: extensions/discord/src/monitor.test.ts durable handler handoff and subsequent concurrent events, plus internal/client.test.ts listener-slot lifetime. Embed text fallback remains in message-text.test.ts and threading.starter.test.ts; retained mention cases cover the same preflight decision branches. CI-only: oxfmt, plain oxlint, and diff-check pass. No tests or coverage run. Original shard 4437 lines to 3806; 35 percent target remains unmet because further identified cuts lose distinct authority or lifecycle behavior.
Fold code-point label truncation into the native picker identity round-trip; remove the duplicate renderer case. Share picker invocation, attachment, binding, PluralKit, and batch fixtures. Centralize monitor cleanup and remove redundant implementation counts while preserving visible outcomes and ordering. Preserve all distinct admission, runtime identity, and lifecycle cases. CI-only static gates: oxfmt, plain oxlint, and diff-check pass; no tests or coverage run. Original shard 4437 lines to 3701 (16.6 percent); the 35 percent target remains unmet under the distinct-behavior retention constraint.
Share image, session-send and web-fetch fixtures while retaining all 173 statically expanded cases. Keep distinct authorization, sandbox, incarnation, delivery and cancellation paths; this shard is already largely branch-consolidated. CI-only validation: oxfmt, plain oxlint and diff checks. Runtime tests and coverage intentionally deferred. Baseline image support exports are missing and require coordinator follow-up.
Remove stale mock machinery, ineffective probes, copied schema inventories and sibling-covered helper replays. Keep image reasoning at image-tool.response, compression facts at model generation/static-catalog and clawrouter-native-model-facts, spawn capability schemas at openclaw-tools session-context/thread-binding, and fetch JSON/guard behavior at the existing extraction and network owner suites. Retain distinct resolver-absent delivery, visible-producer capacity, incarnation, sandbox, cancellation and cache-policy boundaries. Consolidate repeated request/error fixtures and preserve zero/default timeout registration assertions. CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage run. Cumulative line reduction remains below 35 percent because distinct boundary proof is retained.
Share auth, RPC, cancellation and no-reply fixtures while retaining distinct safety branches. Remove repeated wiring and schema inventories. Keep real image loading and scoped auth isolation. Duplicate owner proof remains in web-fetch.provider-fallback.test.ts (preserves wrappers in a char budget; unread-error fallback cleanup), sessions-resolution.test.ts (failed custom-key lookup), sessions-access.test.ts (transient tree visibility), subagent-spawn.production-boundary.test.ts (managed worktrees), acp-spawn.test.ts (resume and lineage), and provider-runtime.test.ts (owner failover). CI-only: no tests or coverage run. Plain oxlint, oxfmt and diff-check passed. Shard LOC 4888 -> 3235 (33.8%); below the 35% target because remaining cases guard distinct auth, sandbox, lifecycle and cancellation paths.
Share repeated schema, provider request, credential, registry and Doctor fixtures while preserving distinct cases and assertions. Keep module interop unchanged: its loader formats, captured generations, resolver conditions and lifecycle paths are independent contracts. CI-only shard; no test or coverage runs.
Discovery concurrency, probe caps and context precedence remain covered by provider-self-hosted-discovery.test.ts. Doctor artifact selection remains covered by doctor-contract-artifact.test.ts. Keep warning-only candidate isolation in the normalizer table and combine full/touched collector fixtures. Module generation keeps scoped assets and distinct interop paths; sibling-assets tests cover unscoped nested installs, and selected-dependency promotion plus first-demand generation tests cover captured dependency bytes. Retain exact generation provider assertions in config-refresh/workspace cases. Schema tests share source fixtures, consolidate required diagnostics, and drop repeated default applications; reverse dependency convergence remains covered by json-schema-defaults.test.ts. CI-only: plain oxlint, oxfmt and diff checks pass. No tests or coverage run. Cumulative shard reduction is 5487 to 4740 lines, below the 35 percent target; remaining unique behavior is preserved.
Keep historical authored endpoints in the deferred trusted-owner row and per-account inheritance in legacy-webhook-listener-migration tests. Remove internal loader/cache inventories and duplicate physical-manifest lookup proof already exercised by real provider/hook source rejection cases. Fold catalog field priority into the mixed catalog test. Share tuple fixtures and remove unused schema cache-key labels. Keep the unique unserializable-schema error path; content-key invalidation remains covered by schema-validator.manifest.test.ts immutable and mutable schema cases. Preserve all remaining source-default, authority, generation and lifecycle boundaries. CI-only: formatting, plain oxlint and diff checks passed; no tests or coverage run. This additional 198-line reduction brings the original 5487-line shard to 4542 lines. The 35 percent target remains unmet.
Remove lifecycle cases duplicated in lane-controller.lifecycle.test.ts and rate-limit cases retained in attempt-recovery.per-day-rate-limit.test.ts. Keep the cron output-limit route while removing redundant budget variants. Reuse the existing SQL observation helper and local transcript setup; retain authority, persistence, cancellation, and ordering cases. Terminal receipt merging remains covered by terminal-preparation.run-stats.test.ts. CI-only validation: plain oxlint, oxfmt, and diff check. Runtime tests and coverage intentionally deferred. Reduction is below the requested target because remaining cases protect distinct lifecycle and durability behavior.
Drop actor append ordering replay covered by session-manager-async-message.test.ts (lets another session write between actor appends while retaining manager order), retaining replaced-writer rejection in the persisted tool-result acknowledgement test. Drop unchanged capture replay covered by session-actor-message-rewrite.test.ts (commits prompt capture and its carrier together) and attempt-prompt-submit.projections.test.ts serialized-prefix cases. Drop terminal-error settlement replay covered by session-tool-result-guard.transcript-events.test.ts (keeps one original terminal error without splitting text, tool facts, or usage). Consolidate output-limit continuation and progress assertions, delegate cap policy to failover-retry-controller.test.ts, and remove execution wiring snapshots while retaining generation, compaction, cancellation, and settlement boundary proofs. CI-only: plain oxlint, oxfmt, and diff check passed; no tests or coverage run. Remains below the requested line target because the remaining initial-writer, permission, proposal, and image-note cases have distinct authority or durability behavior.
Separate pre-install admission refusals from real compaction races. Share image-note scope, publication, and canonical transcript assertions while retaining dirty-tail replay, nonempty replacement preservation, commit-loss handling, and cleanup on failed assertions. Consolidate repeated recovery error/timeout fixtures and remove same-branch retry combinations covered by retained parked-work, failed-batch, idle-timeout, and rate-limit cases. Reuse writer claim and seed helpers without changing authority ordering. CI-only static validation: plain oxlint, oxfmt, and diff check passed. No tests or coverage run. All distinct authority/durability cases retained; cumulative line reduction remains below 35 percent.
Keep lifecycle and evidence-custody cases while removing internal launch dumps, repeated catalog inventories, and duplicate planner and artifact assertions. Reduce profile and capture fixtures to their owning behavior. Duplicate boundary proof remains in run-config.test.ts (explicit channel conflicts), suite-summary.test.ts (skipped and zero-execution summaries), suite-planning.test.ts (symlink output rejection), suite-artifacts.test.ts (Crabline artifact rebasing), and lab-server-capture.test.ts (capture metadata mapping). CI-only: oxfmt, diff check, and plain oxlint pass; no tests or coverage run. Shard remains below the requested 35 percent reduction because distinct lifecycle, routing, and custody proof remains.
Share self-check and suite admission/drain proof across the same HTTP lifecycle, retaining both modes and concurrent suite admission. Share abort fixtures and command-path dispatch. Keep planner semantics in run-config tests and malformed summary validation in suite-summary and Telegram runtime tests. CI-only: oxfmt, diff check and plain oxlint pass; no tests or coverage run. Cumulative shard LOC is 5177 to 4244. The 35 percent target remains unmet; unique custody, atomic publication, credential and shutdown cases remain.
|
🦞👀 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 293bb45115
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| it("keeps package schema support metadata aligned", () => { | ||
| expect(packageJson.openclaw.schemaVersions).toEqual(supportedVersions); | ||
| }); | ||
|
|
||
| it("keeps restart discovery off the caller thread and observes changed retained-deletion facts", async () => { |
There was a problem hiding this comment.
Retain the package/runtime schema-version contract test
Removing this test drops the independent check that the actual package.json.openclaw.schemaVersions matches the runtime schema constants. The remaining preflight tests use supportedVersions, and the node-update tests generate their manifests from those same constants (src/node-host/auto-update.test-support.ts), so neither detects a forgotten package-metadata update after a schema bump. That mismatch matters: assertNodeRuntimeSchemaVersions rejects it in src/node-host/auto-update-compatibility.ts:35–42, deferring otherwise compatible node updates. Retain this inexpensive package contract, or move it to a dedicated package-level suite rather than deleting it.
Useful? React with 👍 / 👎.
|
Follow-up CI repair: the settlement test now expects the current exact exec-tool metadata, including |
|
Codex review: needs changes before merge. What this changesThis PR consolidates fixtures and removes repeated tests across Gateway, agents, plugins, and state storage. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain Keep open: this maintainer-directed cleanup is useful, but two deletions remove independent regression contracts. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherVitest fixtures exercise Gateway, agent, plugin, and storage owners, then compare their outputs and persisted effects against contract assertions. flowchart TD
A[Vitest fixtures] --> B[Gateway and agent owners]
A --> C[Plugin and storage owners]
B --> D[Contract assertions]
C --> D
D --> E[CI results]
Technical reviewBest possible solution: Keep the consolidations and restore the package metadata guard and a permissive-to-strict cache-policy regression. Do we have a high-confidence way to reproduce the issue? The pinned diff and retained suites establish the coverage losses directly; no target code or tests were executed during this review. Is this the best way to solve the issue? Consolidating fixtures and duplicate owner tests is appropriate, provided independent package metadata and cache-policy contracts remain covered. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9c491b3d2094. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceTests -4497, Other -3. Total -4500 across 32 files. Added test files: 0. View PR surface stats
Review metrics
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 24, 2026, 12:09 PM ET / 16:09 UTC. |
…enclaw#182687) * test(gateway): deslop r0041 tests Consolidate transcript event fixtures and collectors, media request and cleanup setup, and config hash boundary proof. The subscribed-operator test retains appended-message persistence proof; the committed-turn web/TUI test retains reconnect history proof. Spawn and route fields share the same real transcript projection. Runtime revision proof also rejects the internal config digest. CI-only: plain oxlint, oxfmt, and diff-check pass. Static expanded cases 117 to 113; test lines 4758 to 4472. Keep distinct auth, lifecycle, recovery, ownership, and ordering paths; 35 percent is not safely attainable in this shard. * test(gateway): remove redundant r0041 coverage layers Keep socket-specific auth, presence, profile parity, ordered delivery and hidden-message dispatch. Remove replayed invalidation, sequence, global routing, marker and display-cap cases already covered by server-session-events.test.ts and its marker-queue support, chat-display-projection.test.ts, and server.sessions.list-changed.test.ts. Move shared spawn/goal snapshot checks into the retained transcript event case. Viewer normalization and replace/clear behavior remain in server-methods/sessions-viewers.test.ts and server.auth.presence-modes.test.ts. Profile identity/name detail remains in sessions-history-http.test.ts and chat-display-projection.test.ts; this suite retains same-clock avatar parity for WebSocket, history and message-get. Media download, promotion, visibility and cross-agent cleanup remain in managed-image-actions.e2e.test.ts, chat-reply-media.large-video.test.ts, managed-image-record-store.test.ts, managed-image-attachments.sqlite-visibility.test.ts and managed-outgoing-gc-availability.test.ts. Config copy-fallback variants remain in io.write-config.test.ts and io.write-reread.test.ts. CI-only static gates: oxfmt, plain oxlint and diff-check. No test, coverage or build runs. Total shard lines 4758 to 3579; preserve remaining distinct boundaries rather than force the 35 percent target. * test(gateway): consolidate remaining r0041 fixtures Use deterministic scope-owned socket disposal, consolidate subscription and worker metadata assertions, and remove a duplicate delivery-position assertion covered by the retained collector order check. Share config write-invalidate-read seeding and combine equivalent global-media cleanup fixtures while retaining both explicit and legacy ownership cases. Keep all 91 expanded cases from the prior shard revision. CI-only: oxfmt, plain oxlint, and diff-check pass; no test, coverage, or build commands run. This pass reduces 3579 to 3463 lines; cumulative reduction is 27.2 percent, short of the requested 35 percent. * test(state): deslop r0043 tests Remove creation-witness copies of clean restart refusal, malformed native receipt, and warm-turn admission tests. Identical behavior remains in openclaw-agent-execution.schema-admission.test.ts. Reuse the existing dangling Workshop index fixture in preflight and ownership tests, retaining both admission and ownership-race assertions. CI-only validation: oxfmt, diff check, and plain oxlint. * test(state): consolidate r0043 boundary proof and fixtures Keep migration rollback proof in openclaw-state-db-schema-version.test.ts (publishes migration-owned content markers through rollback and authorizer checks); retain sibling snapshot publication and dropped-table checks in schema-policy. Consolidate peer revocation into the raced-publication case, WAL inspection into its refusal case, and read-only ownership into maintenance fencing. Remove internal call-shape and duplicate state assertions; reuse typed fixtures and source admission builders. Preserve the remaining distinct authority and durability interleavings. CI-only validation: oxfmt, git diff --check, and plain oxlint passed. No tests or coverage executed. Original shard 5253 lines to 4885; 35 percent target remains unmet. * test(state): remove redundant r0043 validation layers Consolidate schema refresh, reader adoption, and additive repair in one retained-reader flow. Consolidate shared-store warm/cold row removal with the archive/no-host-SQL proof; higher-level purge wrapper coverage remains in preserves a survivor handle first opened during cleanup. Remove preflight replays covered by sqlite-schema-contract.test.ts (accepts a compatible future additive column only when enabled; preserves index issue order when a missing index is allowlisted), memory-schema.test.ts (uses the compound chunk index after opening a database and readmitting it), and openclaw-agent-db.test.ts (repairs every missing or drifted canonical agent-state named index). Remove copied metadata/inventory assertions. CI-only checks: oxfmt, git diff --check, plain oxlint passed. No tests or coverage run. Original shard 5253 lines to 4778; 35 percent target remains unmet without discarding distinct behavior. * test(agents): deslop r0044 tests Consolidate queued commit-order proof into confirms identical queued messages only after their own transcript commits, and listener removal into the ordinary listener snapshot case. Keep persistence-before-publication assertions at each queued commit. Move context invalidation proof into recovers through the overflow limit with context invalidated before every retry. First-overflow success remains covered by strips stale thinking signatures before continuing after auto-compaction. Remove only the successful caller-owner duplicate; explicit caller overflow recovery remains covered. Reuse local stream fixtures, retain same-run next-turn message identity, and trim repeated frozen graph checks; FIFO remains covered by commits user and custom messages in FIFO order. Preserve distinct authority, custody, cancellation, durability and context traversal cases. CI-only campaign: plain oxlint, oxfmt and diff checks passed. No tests, coverage, builds or Testbox commands run. Honest reduction is below target because remaining cases protect distinct boundaries. * test(agents): consolidate r0044 boundary fixtures Share high-usage and summary-policy scenarios while retaining each success, failure, cancellation and terminal branch. Manual short-history compaction remains covered by caps extension summaries before persistence and manual return. Unobserved extension delivery remains covered by observes live handler registration and awaits handlers inside write settlement. Remove JSON normalization replays covered by src/config/sessions/transcript-json.test.ts: retains ordinary shared JSON and unchanged frozen containers, copies changed frozen containers without changing the source, and matches native JSON bytes. Keep async capture and serialization integration assertions. Remove duplicate FIFO and host-write checks covered by session-manager-async-entries.test.ts. Keep fresh-message and stale-keyed-replay admission checks. Drop repeated context matrix payloads covered by dedicated pairing and checkpoint cases and session-manager-model-context-limits.test.ts. Remove repeated sender/timestamp rendering assertions covered by attempt.llm-boundary.cache-stability.test.ts and attempt.llm-boundary.test.ts while retaining steering admission timestamps and persisted/runtime content ownership. Preserve compaction item correlation, aborted accounting, stale authority and durable recovery boundaries. CI-only: plain oxlint, oxfmt and diff checks pass; no tests, builds or coverage run. Combined shard reduction remains below the requested 35 percent; no further safe duplicate layer was identified. * test(agents): share r0044 lifecycle scenario fixtures Use one context-mutation setup for the existing nine admitted and unadmitted cases. Preserve independent expected context, exact admission typing, and append/rewrite/delete/branch/compaction/reset/cross-session behaviors. Share pending-input staging, out-of-turn rejection assertions, and abortable queued-run startup. Reuse the canonical zero-usage fixture and trim unused summary fixture text. Plain oxlint, formatting and diff checks pass. CI-only: no tests, builds or coverage were run. No cases or production files removed in this round. The shard still cannot meet the 35 percent target without removing distinct boundary proof identified in the retained cases. * test(codex): deslop r0046 tests Remove the middleware-ordering replay covered by openclaw-owned-tool-runtime-contract.test.ts: wraps dynamic tools with hooks and runs result middleware before the after hook. Consolidate result-only bridge fixtures and repeated diagnostic/requester context. Keep auth-bridge and side-question unchanged: remaining cases exercise distinct credential authority, policy, and lifecycle boundaries. Static lint/format/diff gates only; tests and coverage deferred to hosted CI per campaign instructions. * test(codex): consolidate r0046 owner coverage Keep side-question flow checks while removing repeated config and context inventories. Native-hook-relay disabled config, turn-params timezone, side-question.model-selection reasoning, config network proxy, and plugin-thread-config ask-policy tests retain their owner contracts. Fold disabled-relay flow into the ephemeral fork case. Consolidate auth fallback and workspace-rejection setup without deleting branch cases. Remove dynamic MCP delegation, disabled-catalog, async replay, and Decision cancellation replays covered by dynamic-tools.gateway-policy, run-attempt-tools, event-projector.dynamic-tools, generic per-call cancellation, and src/decisions/runtime tests. CI-only campaign: plain oxlint, oxfmt, and diff-check passed. No tests or coverage run. Original shard 5290 lines to 4895; the 35 percent target remains unmet because remaining distinct authority, lifecycle, and schema behavior has no demonstrated replacement. * test(codex): remove redundant r0046 layers and fixtures Replace repeated scoped and persisted auth setup with a typed fixture. Reuse screenshot/schema fixtures and remove mocked Decision and memory-reply replays covered by openclaw-tools.decision and tool-terminal-outcome owner tests. Drop side-question copies of model selection covered by run-attempt and thread-lifecycle binding tests, domain enforcement covered by dynamic-tool-build.web-search and web-tools.fetch, and disconnect coverage held by ephemeral-turn plus retained side cleanup cases. Remove nonexistent registerSideQuestionForkTests registration; standalone side-question.fork.test.ts owns those cases. No test runs per CI-only instructions. Plain oxlint, oxfmt, and diff-check pass. Original shard 5290 lines to 4548; remaining unique credential, lifecycle, and schema cases prevent a justified 35 percent cut. * test(discord): deslop r0047 tests Remove duplicate guild authorization/arguments and direct-status layers covered by native-command.commands-allowfrom.test.ts and native-command.status-direct.test.ts. Keep bot-owned thread admission and schema coverage in message-handler.preflight-owned-threads.test.ts. The authoritative runtime verification table retains default-runtime dispatch assertions. Reuse local session, notice, delivery, binding, and route fixtures while preserving distinct ownership and lifecycle cases. CI-only validation: plain oxlint, oxfmt, and diff check. No tests or coverage run. Known baseline issue: native-command.plugin-dispatch.test.ts imports missing native-command.test-support.js. * test(discord): reduce r0047 branch and fixture duplication Consolidate hidden model dispatch outcomes and presence retry branches. Remove self-proving plugin command-name wrapper and redundant helper-call assertions, while preserving model scope, component-document admission, and post-unbind echo proof. Remaining concurrency owner proof: extensions/discord/src/monitor.test.ts durable handler handoff and subsequent concurrent events, plus internal/client.test.ts listener-slot lifetime. Embed text fallback remains in message-text.test.ts and threading.starter.test.ts; retained mention cases cover the same preflight decision branches. CI-only: oxfmt, plain oxlint, and diff-check pass. No tests or coverage run. Original shard 4437 lines to 3806; 35 percent target remains unmet because further identified cuts lose distinct authority or lifecycle behavior. * test(discord): consolidate r0047 fixture and outcome proof Fold code-point label truncation into the native picker identity round-trip; remove the duplicate renderer case. Share picker invocation, attachment, binding, PluralKit, and batch fixtures. Centralize monitor cleanup and remove redundant implementation counts while preserving visible outcomes and ordering. Preserve all distinct admission, runtime identity, and lifecycle cases. CI-only static gates: oxfmt, plain oxlint, and diff-check pass; no tests or coverage run. Original shard 4437 lines to 3701 (16.6 percent); the 35 percent target remains unmet under the distinct-behavior retention constraint. * test(agents): deslop r0045 tests Share image, session-send and web-fetch fixtures while retaining all 173 statically expanded cases. Keep distinct authorization, sandbox, incarnation, delivery and cancellation paths; this shard is already largely branch-consolidated. CI-only validation: oxfmt, plain oxlint and diff checks. Runtime tests and coverage intentionally deferred. Baseline image support exports are missing and require coordinator follow-up. * test(agents): consolidate r0045 owner-boundary coverage Remove stale mock machinery, ineffective probes, copied schema inventories and sibling-covered helper replays. Keep image reasoning at image-tool.response, compression facts at model generation/static-catalog and clawrouter-native-model-facts, spawn capability schemas at openclaw-tools session-context/thread-binding, and fetch JSON/guard behavior at the existing extraction and network owner suites. Retain distinct resolver-absent delivery, visible-producer capacity, incarnation, sandbox, cancellation and cache-policy boundaries. Consolidate repeated request/error fixtures and preserve zero/default timeout registration assertions. CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage run. Cumulative line reduction remains below 35 percent because distinct boundary proof is retained. * test(agents): consolidate r0045 fixtures and boundary assertions Share auth, RPC, cancellation and no-reply fixtures while retaining distinct safety branches. Remove repeated wiring and schema inventories. Keep real image loading and scoped auth isolation. Duplicate owner proof remains in web-fetch.provider-fallback.test.ts (preserves wrappers in a char budget; unread-error fallback cleanup), sessions-resolution.test.ts (failed custom-key lookup), sessions-access.test.ts (transient tree visibility), subagent-spawn.production-boundary.test.ts (managed worktrees), acp-spawn.test.ts (resume and lineage), and provider-runtime.test.ts (owner failover). CI-only: no tests or coverage run. Plain oxlint, oxfmt and diff-check passed. Shard LOC 4888 -> 3235 (33.8%); below the 35% target because remaining cases guard distinct auth, sandbox, lifecycle and cancellation paths. * test(plugins): deslop r0048 tests Share repeated schema, provider request, credential, registry and Doctor fixtures while preserving distinct cases and assertions. Keep module interop unchanged: its loader formats, captured generations, resolver conditions and lifecycle paths are independent contracts. CI-only shard; no test or coverage runs. * test(plugins): remove redundant r0048 test layers Discovery concurrency, probe caps and context precedence remain covered by provider-self-hosted-discovery.test.ts. Doctor artifact selection remains covered by doctor-contract-artifact.test.ts. Keep warning-only candidate isolation in the normalizer table and combine full/touched collector fixtures. Module generation keeps scoped assets and distinct interop paths; sibling-assets tests cover unscoped nested installs, and selected-dependency promotion plus first-demand generation tests cover captured dependency bytes. Retain exact generation provider assertions in config-refresh/workspace cases. Schema tests share source fixtures, consolidate required diagnostics, and drop repeated default applications; reverse dependency convergence remains covered by json-schema-defaults.test.ts. CI-only: plain oxlint, oxfmt and diff checks pass. No tests or coverage run. Cumulative shard reduction is 5487 to 4740 lines, below the 35 percent target; remaining unique behavior is preserved. * test(plugins): consolidate remaining r0048 fixture duplication Keep historical authored endpoints in the deferred trusted-owner row and per-account inheritance in legacy-webhook-listener-migration tests. Remove internal loader/cache inventories and duplicate physical-manifest lookup proof already exercised by real provider/hook source rejection cases. Fold catalog field priority into the mixed catalog test. Share tuple fixtures and remove unused schema cache-key labels. Keep the unique unserializable-schema error path; content-key invalidation remains covered by schema-validator.manifest.test.ts immutable and mutable schema cases. Preserve all remaining source-default, authority, generation and lifecycle boundaries. CI-only: formatting, plain oxlint and diff checks passed; no tests or coverage run. This additional 198-line reduction brings the original 5487-line shard to 4542 lines. The 35 percent target remains unmet. * test(agents): deslop r0049 tests Remove lifecycle cases duplicated in lane-controller.lifecycle.test.ts and rate-limit cases retained in attempt-recovery.per-day-rate-limit.test.ts. Keep the cron output-limit route while removing redundant budget variants. Reuse the existing SQL observation helper and local transcript setup; retain authority, persistence, cancellation, and ordering cases. Terminal receipt merging remains covered by terminal-preparation.run-stats.test.ts. CI-only validation: plain oxlint, oxfmt, and diff check. Runtime tests and coverage intentionally deferred. Reduction is below the requested target because remaining cases protect distinct lifecycle and durability behavior. * test(agents): prune r0049 duplicate owner proof Drop actor append ordering replay covered by session-manager-async-message.test.ts (lets another session write between actor appends while retaining manager order), retaining replaced-writer rejection in the persisted tool-result acknowledgement test. Drop unchanged capture replay covered by session-actor-message-rewrite.test.ts (commits prompt capture and its carrier together) and attempt-prompt-submit.projections.test.ts serialized-prefix cases. Drop terminal-error settlement replay covered by session-tool-result-guard.transcript-events.test.ts (keeps one original terminal error without splitting text, tool facts, or usage). Consolidate output-limit continuation and progress assertions, delegate cap policy to failover-retry-controller.test.ts, and remove execution wiring snapshots while retaining generation, compaction, cancellation, and settlement boundary proofs. CI-only: plain oxlint, oxfmt, and diff check passed; no tests or coverage run. Remains below the requested line target because the remaining initial-writer, permission, proposal, and image-note cases have distinct authority or durability behavior. * test(agents): consolidate r0049 lifecycle fixtures Separate pre-install admission refusals from real compaction races. Share image-note scope, publication, and canonical transcript assertions while retaining dirty-tail replay, nonempty replacement preservation, commit-loss handling, and cleanup on failed assertions. Consolidate repeated recovery error/timeout fixtures and remove same-branch retry combinations covered by retained parked-work, failed-batch, idle-timeout, and rate-limit cases. Reuse writer claim and seed helpers without changing authority ordering. CI-only static validation: plain oxlint, oxfmt, and diff check passed. No tests or coverage run. All distinct authority/durability cases retained; cumulative line reduction remains below 35 percent. * test(qa-lab): consolidate r0050 assertion layers Keep lifecycle and evidence-custody cases while removing internal launch dumps, repeated catalog inventories, and duplicate planner and artifact assertions. Reduce profile and capture fixtures to their owning behavior. Duplicate boundary proof remains in run-config.test.ts (explicit channel conflicts), suite-summary.test.ts (skipped and zero-execution summaries), suite-planning.test.ts (symlink output rejection), suite-artifacts.test.ts (Crabline artifact rebasing), and lab-server-capture.test.ts (capture metadata mapping). CI-only: oxfmt, diff check, and plain oxlint pass; no tests or coverage run. Shard remains below the requested 35 percent reduction because distinct lifecycle, routing, and custody proof remains. * test(qa-lab): consolidate r0050 lifecycle and routing fixtures Share self-check and suite admission/drain proof across the same HTTP lifecycle, retaining both modes and concurrent suite admission. Share abort fixtures and command-path dispatch. Keep planner semantics in run-config tests and malformed summary validation in suite-summary and Telegram runtime tests. CI-only: oxfmt, diff check and plain oxlint pass; no tests or coverage run. Cumulative shard LOC is 5177 to 4244. The 35 percent target remains unmet; unique custody, atomic publication, credential and shutdown cases remain. * test: repair d476 replay fixtures and shrink stale baselines * test: retain replay safety in settlement expectation
What Problem This Solves
This batch removes duplicate assertion layers and consolidates repeated fixtures while retaining distinct authorization, persistence, replay, lifecycle, and transport contracts. It replays the compatible portions of d476 onto pinned main
2084139a66861a40cb11127eff0166d2cf3bba17.The final diff changes 30 test files and two shrink-only baseline files: +3,774 / -8,271 test lines (net -4,497), plus three obsolete baseline lines removed; production +0 / -0. No public behavior, runtime configuration, dependencies, or changelog changes.
Replay and retained boundaries
26 source commits applied (some partially); four skipped:
769d2b4940a0,c2ee2d35ac57,52f685c643a0skipped. All five provider test files have newer fixture/helper and coverage structure on main; replaying the old helper assumptions would need a fresh audit. The campaign report also notes unavailable helper exports.32c27655679askipped after retaining main's rewritten model-matrix test and richer evidence assertions; no remaining hunk.Conflict resolutions favor current main:
Per-shard accounting
Counts below are the actual changed-file totals against the pinned main, not the original campaign totals. Declarations are static
it/testdeclaration counts, not executed/expanded cases. The supplied reports explicitly say coverage was not run under CI-only mode; no covered-statement/branch totals are claimed.src/gateway/managed-image-attachments.test.ts,src/gateway/session-message-events.test.tssrc/state/agent-deletion-cleanup.test.ts,src/state/openclaw-agent-db-validation-cache.test.ts,src/state/openclaw-agent-execution.creation-witness.test.ts,src/state/openclaw-database-preflight.test.ts,src/state/openclaw-state-ownership.test.tssrc/agents/sessions/agent-session-compaction.test.ts,src/agents/sessions/agent-session-loop-correctness.test.ts,src/agents/sessions/agent-session-loop-next-turn.test.ts,src/agents/sessions/agent-session-models.admission.test.ts,src/agents/sessions/session-manager-model-context.test.tssrc/agents/tools/sessions.test.ts,src/agents/tools/web-tools.fetch.test.tsextensions/codex/src/app-server/auth-bridge.test.ts,extensions/codex/src/app-server/dynamic-tools.test.tsextensions/discord/src/monitor/listeners.test.ts,extensions/discord/src/monitor/native-command.model-picker.test.tssrc/plugins/doctor-contract-registry.test.ts,src/plugins/plugin-module-generation.interop.test.ts,src/plugins/provider-hook-runtime.provenance.test.ts,src/plugins/provider-self-hosted-setup.test.ts,src/plugins/registry.runtime-config.test.ts,src/plugins/schema-validator.required.test.tssrc/agents/embedded-agent-runner/run/attempt-execution-phase.test.ts,src/agents/embedded-agent-runner/run/attempt-execution-settle.test.ts,src/agents/embedded-agent-runner/run/attempt-recovery.test.ts,src/agents/embedded-agent-runner/run/attempt-transcript-lifecycle-prepare.test.tsextensions/qa-lab/src/cli.runtime.test.ts,extensions/qa-lab/src/suite-launch.runtime.test.tsEvidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <all 30 changed files>: exit 0.node_modules/.bin/oxlint -c .oxlintrc.json <all 30 changed files>: exit 0.git diff --check 2084139a66861a40cb11127eff0166d2cf3bba17: exit 0.openclaw/ci-gateowns test proof.CI follow-up and review
Initial run 40107335521 exposed six fixture/type issues: numeric presence-frame narrowing, a missing ExtensionFactory import, agent-context typing, renamed fixture manager, a required fixture label, and a removed assertion-helper reference. Commit
072aecdedb45fixes them while preserving assertions. It also removes the stale max-lines entry and two obsolete mock baseline entries, documenting why the mock boundaries isolate real A2A turns and participant persistence. Local formatting, plain lint, and diff-check pass; hosted CI validates the replacement head. No local tests/typechecks were run.Independent review completed in two passes. I checked all eight reported coverage concerns against current source and retained owner tests; none requires restoring the removed duplicate layer:
CI then identified real replay errors: missing import/helper, outdated fixture property/type, and stale baseline entries. The follow-up fixes those without dropping failed tests or weakening assertions. A second review caught an overly permissive numeric-counter fallback; the final repair rejects present nonnumeric values. Static gates pass; hosted CI is the runtime/type proof.
The final targeted repair review is scoped-clean through P2. The initial repair's numeric fallback finding was accepted and fixed. The follow-up cleanup only reuses an existing type alias and equivalent optional cleanup to keep the already-over-cap file from growing; no gate was bypassed.