Repository navigation
test(agents,gateway,chat): remove low-value tests (batch d481) - #182737
Conversation
Reuse local bootstrap and session fixtures and compact prepared runtime setup while preserving authority, credential, lifecycle and path boundaries. Keep the hook insertion proof in the root-memory alias case and both compaction marker transitions in one lifecycle scenario.
Keep scoped refresh behavior in the real worker keeps-unaffected-workers-live test, account retention in catalog-owner and configured-catalog, and inspection lifetime in registry-borrow tests. Keep notification denial in sessions-send-tool.admission and mailbox behavior in the registered sessions-send mailbox table. Utility owner inheritance remains in utility-completion; quota deadlines remain in isolated-completion.deadline. Preserve distinct security, credential and lifecycle assertions.
Reuse baseline-existing sessions resume and timeout registrars instead of their copied test bodies. Preserve their original assertions and suite setup. Consolidate local and remote bootstrap alias cases and diagnostics rows without dropping policy branches. Keep runtime admission gates event-driven and retain security assertions. No tests run under the campaign CI-only policy.
Consolidate stopped-service fixtures and repeated no-inference assertions. Compact finalization tables without deleting cases or weakening assertions. Keep admission, lease, Doctor, migration, rollback, and activation boundary cases intact; no cross-file duplicate safely removes their distinct failure paths. Static-only campaign proof: oxfmt, oxlint, and diff-check; hosted CI owns execution.
Remove rollback replays covered by update-command-rollback.test.ts (blocked recovery and active identity after restart-unhealthy), real pnpm generation rollback in update-command-service.integration.test.ts, and terminal recovery in update-command-post-update-recovery.test.ts. Retain the unique no-package skipped-ledger case. Keep deferred-inspection routing and restart ordering here; parsing, findings and retry guidance remain in update-command-post-activation-inspections.test.ts. Current-core service receipt and boundary finalization tests retain requester revocation. Protected-definition metadata remains covered in update-command-service-maintenance-identity.test.ts. Consolidate invalid-config lease assertions into the downgrade table, reduce branch-equivalent authority/deadline and retired-file rows, and remove the retired inference-repair mock. Preserve process, Windows recovery, migration and WAL branches. Static-only verification: oxfmt, plain oxlint, git diff --check. The 35 percent target remains unmet because further safe overlap was not established.
Preserve real admission, lease, migration, and recovery branches while removing redundant config permutations, output/call-shape assertions, copied metadata, and unreachable fixture setup. Older-schema read preservation stays in update-command-managed-context.test.ts; keep the fresh Doctor observe:false boundary assertion and database cleanup. Source writer feature detection stays in test/scripts/source-update-artifact-preflight.test.ts; retain the legacy convergence caller and missing-dependency/ownership cases. Native activation/verification stays in update-command-service.integration.test.ts and update-command-service.test.ts; rollback-skip ledger proof remains in this shard. Consolidate shared/configured database inspection in one post-Doctor WAL-growth case. Retain same-branch admission reference selection and the older-plugin retired-config regression. Plain oxlint, oxfmt, and diff-check pass; no tests run under CI-only mode. Total reduction remains below 35 percent because additional safe duplication was not established.
Consolidate repeated fixtures and assertions while retaining distinct lifecycle, authority, and durability cases. Drop envelope validation variants already covered by session-snapshot-write.test.ts and the append-miss replay covered by session-prefetch.test.ts. The reconnect request shape remains covered by chat-pane-history-issuance.test.ts. CI-only campaign: formatting, plain oxlint, and diff checks passed; no tests or coverage executed. Safe reduction is below the requested 35% target.
Remove retained-page route scenarios duplicated in chat-page-close-route, Goal recovery replays covered by chat-goal-recovery E2E and gateway-store.auth, and owner-level realtime and connection inventories. Consolidate startup cache ordering, dictation lifecycle variants, and snapshot metadata fixtures while retaining distinct authority, QR rendering, and v1 migration paths. CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative shard LOC: 5016 to 4305, below the requested 35 percent target.
Share cold-start, metadata, recovery, corruption, eviction and migration fixtures without dropping distinct scenario branches. Keep automatic reconnect Stop and real microphone-button quick-tap integration. Remove redundant rendering and final-transcript proof covered by chat-message image/media, speech-playback and browser-dictation-status suites. Preserve QR authority transitions and v1/v7 database upgrade paths. CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage run. Cumulative test LOC 5016 to 3899; the requested 35 percent reduction remains unmet.
|
🦞👀 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. |
Consolidate timeout, detach-failure and confirmation cases; remove repeated internal request dumps and fixture data while retaining no-write, target and recovery assertions. Duplicate proof remains in native-thread-tool-selection.test.ts (keeps the client available when fork authority changes before dispatch), session-catalog-archive.test.ts (rejects archive when a paginated archived descendant has an OpenClaw owner), and session-catalog-continue-result.test.ts (returns the upstream seed to every joined catalog Continue request). The retained mapped-read rejection also checks canonical thread selection. Remove the obsolete 100-entry collector saturation replay: the keyed turn router now rejects overflow at 256 entries. turn-router.test.ts retains pre-bind ordering and terminal-fact tests; conversation-turn-collector.test.ts retains final-answer selection. CI-only: formatting, diff-check and plain oxlint; no tests run.
Consolidate repeated revocation gates, strict RPC responses, and inbound claim setup. Remove unused adoption-fixture options while preserving all remaining cases and safety assertions. CI-only: plain oxlint, oxfmt, and diff checks; no tests run. Further reductions would remove distinct ownership, rollback, recovery, or supervision proof.
Share pairing approval and APNs fixtures without changing authority inputs. Keep omitted-scope approval calls direct. Remove the Linux CLI renderer replay covered by device-pairing-prune.test.ts: invalidates the card renderer cache after pruning the last renderer. Remove the historical backup fixture replay covered by update-retained-runtime.backups.test.ts: updates the npm package without traversing a historical package backup, including retained assets and recovery evidence. CI-only campaign: oxfmt, plain oxlint and diff checks passed; no runtime tests or coverage run. Retain distinct snapshot, process authority and migration recovery cases; line reduction is below the requested target.
Reuse SQLite descriptor and cleanup fixtures while preserving the acquisition census, short-read injections, WAL races and staging capacity guard. Keep Windows null-ancestry protection as an explicit table row. Remove repeated worker-settlement checks from package-layout rows; the deferred runtime deletion test owns accepted writes and unrelated borrower survival. Explicit target selection remains covered by the retained inspection test and runtime-worker-url.test.ts. Recovery name variants share the prefix branch; retain file, directory and explicit-link boundaries. Consolidate migration claim/link recovery and recreated-marker assertions while preserving absent-source claims, independent attestation mtime, verified and superseded receipts. Native cwd classification plus gateway-process-argv.test.ts and gateway-processes.test.ts own the retired cross-layer process checks. CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative reduction remains below the requested 35 percent; unique authority and durability cases retained.
Consolidate restart owner and authority checkpoints, protected-pid outcomes, Windows inconclusive probes and process-group races into branch tables. Preserve every distinct checkpoint and negative signal assertion. Merge metadata repair into its refresh lifecycle; retain scope and issuer behavior at token verification instead of repeating returned object fields. Combine configured and orphan workspace migration batches while retaining empty/full setup, receipts, timestamps and content identity. Reuse the admitted SQLite baseline for the one-copy write budget and readable payload; keep large-copy paths in WAL and pathname replacement cases. Exercise wal-index creation with the same native reader in process instead of a child wrapper. CI-only: formatting, plain oxlint and diff checks passed. No tests, coverage or builds run. Cumulative line reduction remains below the requested target; distinct security and durability scenarios retained.
Remove five requester groups duplicated in github-publication-requester-aliases.test.ts: resumed grants, queued alias bindings, immediate retries, pending profile recovery, and concurrent bindings. Keep the alias suite as their owner. Reuse scoped-read and ACP fixtures and remove redundant project/dispatch call-shape assertions. Project creation remains covered by server.sessions.create.projects.test.ts. Preserve distinct authority, storage, and ordering cases. CI-only campaign: no tests or coverage run. Plain oxlint, oxfmt, and diff-check passed. 4976 -> 4573 test lines; 35% target not reached without removing distinct behavior.
Keep project validation in server.sessions.create.projects.test.ts, external cwd rejection in server.sessions.create.workspace-policy.test.ts, and structured denial translation in sessions-spawn-tool.test.ts. Keep provisioning assertions in server.sessions.create.worktrees.test.ts. Keep session/owner PR lifetime fences in control-ui-session-pr-subscriptions.lifetimes.test.ts and real visibility fences in control-ui-session-pr-access.test.ts. Consolidate selected and service committed-preview assertions and reuse existing rejection/disposal helpers. CI-only: no test or coverage runs. Plain oxlint, oxfmt and diff-check pass. Additional 100 lines removed; cumulative 4976 to 4473 (10.1%). Remaining distinct authority, storage, and lifecycle cases prevent a safe 35% cut.
Share typed session/model fixtures and scoped RPC setup while retaining per-method authority and lifecycle assertions. Remove duplicated internal dispatch, registry and steady-state checks. Keep sandbox rejection coverage in server.sessions.create.projects.test.ts and positive inherited-sandbox tool cases here. Restore the queueGuest import used by the retained policy-readiness case. Keep negative-policy setup controls, durable failure errors, and checkout path ownership assertions. CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run. Additional 180 lines removed, cumulative 4976 to 4293 (13.7%). The 35% target remains unmet because no further behavior-equivalent layer was identified.
bd1e5f6 to
6aabf01
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c17e25f2f4
ℹ️ 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("validates and persists context windows from the selected runtime", async () => { | ||
| const model = "openai/gpt-5.6-sol"; | ||
| const selected = { model, agentRuntime: "codex", contextWindow: "64k" }; |
There was a problem hiding this comment.
Retain the selected-runtime fork-budget regression
The removed fork case protects a different production path from the retained patch assertions: a 70,000-token parent must be rejected when the selected Codex route advertises a 64,000-token context window, without leaving a child session behind. The replacement only calls patchSession, so it cannot detect incorrect runtime-window selection in resolveSessionForkMaxTokens or failure to apply that limit during session creation. The remaining fork-budget tests do not exercise this runtime-specific catalog wiring. Retain that boundary regression alongside the consolidated fixture.
Useful? React with 👍 / 👎.
Remove duplicate lifecycle-admission cases retained in session-accessor.sqlite-lifecycle-admission.test.ts, including cold FIFO, read-only cleanup, repair refusal, authority retirement, selected state ownership, and historical preparation. Retain cold-command coverage in session-actor.test.ts (installs a cold command and stale preimage without a separate read request), bookkeeping in session-actor-completion.test.ts (commits final custody, recap, usage, and claim cleanup together across rollback and restart), and usage-cache isolation in session-actor-entry-residency.test.ts (retains resident session facts across usage cache writes and reloads actual session changes). Keep replica eviction as the behavioral byte-budget contract. Consolidate standalone and reply-tail watermarks; memory anchor coverage remains in session-transcript-memory-read.test.ts. Lagging and unclassified projection cases remain in session-accessor.sqlite-handle-lifecycle.test.ts. Shared and qualified lineage selection remains in session-utils-store-lookup.test.ts and combined-store-gateway.worker.test.ts; global parent transitions remain in session-row-projection.archived.test.ts. Remove internal SQL/receipt inventories and repetitive fixtures, preserving durable outcomes, scoped authority, and actual race controls. CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage run. Original shard 5247 to 4480 lines (14.6 percent), below the 35 percent target.
Share memory search owner requests, exact response assertions, and invalid-agent cases. The unavailable-manager case retains the legacy-backend acquisition assertions previously repeated by a separate test. Reuse rewind scopes and media expectations and sharing permission fixtures without removing distinct authority, lifecycle, or persistence cases. CI-only campaign: static lint, formatting, and diff checks only.
Remove duplicate catalog, discovery, model-policy, projection, validation, and ticket scenarios. Keep distinct worker publication, runtime preparation, physical ownership, and authority interleavings. Retained proof: memory-host-sdk host/types keeps pending-index and sync-failure diagnostics; question.own-run keeps privileged-record concealment and accepted-answer lifetime. sessions-read-catalog-scope, optional-model-catalog, session-utils single-row-cache/subagent, targets-read-availability and targets-discovery keep catalog isolation, selected-row parsing, fixed-store and template discovery. sessions-create-category keeps first-use group invalidation; session-model-selection-policy keeps non-admin session-only selection; server.sessions.create.forks keeps native fork capacity; session-utils and model-catalog-view keep context-window projection. session-accessor.sqlite-message-cut-native keeps native cut validation; retained rewind lifecycle tests keep archived rejection and queue settlement. Retained creator-lifecycle tests keep archived, duplicate and sentinel identities; board-http keeps live issuing-Gateway ticket enforcement. CI-only: plain oxlint, formatting, and diff checks pass. No tests or coverage run. Original shard LOC 4797 to 4020; 35 percent target remains unmet rather than dropping unique security or lifecycle proof.
c17e25f to
bf2e762
Compare
|
Codex review: needs changes before merge. What this changesThis PR consolidates test fixtures and removes overlapping tests across agents, Gateway sessions, Codex, infrastructure, and chat. Example: No user-visible behavior changes.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain Keep open: this maintainer-authored cleanup is useful, but it removes two distinct regression contracts without equivalent remaining coverage. Priority: P2 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherThese Vitest suites feed synthetic inputs into existing runtime owners and check session, bootstrap, persistence, transport, and chat behavior. flowchart LR
A[Test fixtures] --> B[Agent bootstrap]
A --> C[Gateway sessions]
A --> D[Codex binding]
A --> E[Chat state]
C --> F[Storage and workers]
B --> G[Behavior assertions]
D --> G
E --> G
F --> G
Technical reviewBest possible solution: Keep the fixture consolidation while restoring the native-runtime fork regression and the distinct residency accounting cases. Do we have a high-confidence way to reproduce the issue? The pinned diff directly demonstrates both coverage deletions and inspection of the remaining suites confirms their different scenarios; no target tests were executed under the read-only instructions. Is this the best way to solve the issue? Fixture consolidation is appropriate, but the smallest complete cleanup retains tests for distinct creation and residency-accounting contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c8ffafec8a4a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests -2242. Total -2242 across 22 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, 2:10 PM ET / 18:10 UTC. |
…law#182737) * test(agents): deslop r0092 tests Reuse local bootstrap and session fixtures and compact prepared runtime setup while preserving authority, credential, lifecycle and path boundaries. Keep the hook insertion proof in the root-memory alias case and both compaction marker transitions in one lifecycle scenario. * test(agents): remove redundant r0092 test layers Keep scoped refresh behavior in the real worker keeps-unaffected-workers-live test, account retention in catalog-owner and configured-catalog, and inspection lifetime in registry-borrow tests. Keep notification denial in sessions-send-tool.admission and mailbox behavior in the registered sessions-send mailbox table. Utility owner inheritance remains in utility-completion; quota deadlines remain in isolated-completion.deadline. Preserve distinct security, credential and lifecycle assertions. * test(agents): consolidate r0092 retained fixtures Reuse baseline-existing sessions resume and timeout registrars instead of their copied test bodies. Preserve their original assertions and suite setup. Consolidate local and remote bootstrap alias cases and diagnostics rows without dropping policy branches. Keep runtime admission gates event-driven and retain security assertions. No tests run under the campaign CI-only policy. * test(update): deslop r0094 tests Consolidate stopped-service fixtures and repeated no-inference assertions. Compact finalization tables without deleting cases or weakening assertions. Keep admission, lease, Doctor, migration, rollback, and activation boundary cases intact; no cross-file duplicate safely removes their distinct failure paths. Static-only campaign proof: oxfmt, oxlint, and diff-check; hosted CI owns execution. * test(update): consolidate r0094 branch coverage Remove rollback replays covered by update-command-rollback.test.ts (blocked recovery and active identity after restart-unhealthy), real pnpm generation rollback in update-command-service.integration.test.ts, and terminal recovery in update-command-post-update-recovery.test.ts. Retain the unique no-package skipped-ledger case. Keep deferred-inspection routing and restart ordering here; parsing, findings and retry guidance remain in update-command-post-activation-inspections.test.ts. Current-core service receipt and boundary finalization tests retain requester revocation. Protected-definition metadata remains covered in update-command-service-maintenance-identity.test.ts. Consolidate invalid-config lease assertions into the downgrade table, reduce branch-equivalent authority/deadline and retired-file rows, and remove the retired inference-repair mock. Preserve process, Windows recovery, migration and WAL branches. Static-only verification: oxfmt, plain oxlint, git diff --check. The 35 percent target remains unmet because further safe overlap was not established. * test(update): prune duplicate r0094 fixture and assertion layers Preserve real admission, lease, migration, and recovery branches while removing redundant config permutations, output/call-shape assertions, copied metadata, and unreachable fixture setup. Older-schema read preservation stays in update-command-managed-context.test.ts; keep the fresh Doctor observe:false boundary assertion and database cleanup. Source writer feature detection stays in test/scripts/source-update-artifact-preflight.test.ts; retain the legacy convergence caller and missing-dependency/ownership cases. Native activation/verification stays in update-command-service.integration.test.ts and update-command-service.test.ts; rollback-skip ledger proof remains in this shard. Consolidate shared/configured database inspection in one post-Doctor WAL-growth case. Retain same-branch admission reference selection and the older-plugin retired-config regression. Plain oxlint, oxfmt, and diff-check pass; no tests run under CI-only mode. Total reduction remains below 35 percent because additional safe duplication was not established. * test(chat): deslop r0095 tests Consolidate repeated fixtures and assertions while retaining distinct lifecycle, authority, and durability cases. Drop envelope validation variants already covered by session-snapshot-write.test.ts and the append-miss replay covered by session-prefetch.test.ts. The reconnect request shape remains covered by chat-pane-history-issuance.test.ts. CI-only campaign: formatting, plain oxlint, and diff checks passed; no tests or coverage executed. Safe reduction is below the requested 35% target. * test(chat): remove redundant r0095 test layers Remove retained-page route scenarios duplicated in chat-page-close-route, Goal recovery replays covered by chat-goal-recovery E2E and gateway-store.auth, and owner-level realtime and connection inventories. Consolidate startup cache ordering, dictation lifecycle variants, and snapshot metadata fixtures while retaining distinct authority, QR rendering, and v1 migration paths. CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative shard LOC: 5016 to 4305, below the requested 35 percent target. * test(chat): consolidate r0095 lifecycle fixtures Share cold-start, metadata, recovery, corruption, eviction and migration fixtures without dropping distinct scenario branches. Keep automatic reconnect Stop and real microphone-button quick-tap integration. Remove redundant rendering and final-transcript proof covered by chat-message image/media, speech-playback and browser-dictation-status suites. Preserve QR authority transitions and v1/v7 database upgrade paths. CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage run. Cumulative test LOC 5016 to 3899; the requested 35 percent reduction remains unmet. * test(codex): deslop r0096 tests * test(codex): consolidate r0096 owner-boundary proof Consolidate timeout, detach-failure and confirmation cases; remove repeated internal request dumps and fixture data while retaining no-write, target and recovery assertions. Duplicate proof remains in native-thread-tool-selection.test.ts (keeps the client available when fork authority changes before dispatch), session-catalog-archive.test.ts (rejects archive when a paginated archived descendant has an OpenClaw owner), and session-catalog-continue-result.test.ts (returns the upstream seed to every joined catalog Continue request). The retained mapped-read rejection also checks canonical thread selection. Remove the obsolete 100-entry collector saturation replay: the keyed turn router now rejects overflow at 256 entries. turn-router.test.ts retains pre-bind ordering and terminal-fact tests; conversation-turn-collector.test.ts retains final-answer selection. CI-only: formatting, diff-check and plain oxlint; no tests run. * test(codex): share r0096 authority and RPC fixtures Consolidate repeated revocation gates, strict RPC responses, and inbound claim setup. Remove unused adoption-fixture options while preserving all remaining cases and safety assertions. CI-only: plain oxlint, oxfmt, and diff checks; no tests run. Further reductions would remove distinct ownership, rollback, recovery, or supervision proof. * test(infra): deslop r0098 tests Share pairing approval and APNs fixtures without changing authority inputs. Keep omitted-scope approval calls direct. Remove the Linux CLI renderer replay covered by device-pairing-prune.test.ts: invalidates the card renderer cache after pruning the last renderer. Remove the historical backup fixture replay covered by update-retained-runtime.backups.test.ts: updates the npm package without traversing a historical package backup, including retained assets and recovery evidence. CI-only campaign: oxfmt, plain oxlint and diff checks passed; no runtime tests or coverage run. Retain distinct snapshot, process authority and migration recovery cases; line reduction is below the requested target. * test(infra): consolidate r0098 boundary fixtures Reuse SQLite descriptor and cleanup fixtures while preserving the acquisition census, short-read injections, WAL races and staging capacity guard. Keep Windows null-ancestry protection as an explicit table row. Remove repeated worker-settlement checks from package-layout rows; the deferred runtime deletion test owns accepted writes and unrelated borrower survival. Explicit target selection remains covered by the retained inspection test and runtime-worker-url.test.ts. Recovery name variants share the prefix branch; retain file, directory and explicit-link boundaries. Consolidate migration claim/link recovery and recreated-marker assertions while preserving absent-source claims, independent attestation mtime, verified and superseded receipts. Native cwd classification plus gateway-process-argv.test.ts and gateway-processes.test.ts own the retired cross-layer process checks. CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative reduction remains below the requested 35 percent; unique authority and durability cases retained. * test(infra): share r0098 lifecycle scenario harnesses Consolidate restart owner and authority checkpoints, protected-pid outcomes, Windows inconclusive probes and process-group races into branch tables. Preserve every distinct checkpoint and negative signal assertion. Merge metadata repair into its refresh lifecycle; retain scope and issuer behavior at token verification instead of repeating returned object fields. Combine configured and orphan workspace migration batches while retaining empty/full setup, receipts, timestamps and content identity. Reuse the admitted SQLite baseline for the one-copy write budget and readable payload; keep large-copy paths in WAL and pathname replacement cases. Exercise wal-index creation with the same native reader in process instead of a child wrapper. CI-only: formatting, plain oxlint and diff checks passed. No tests, coverage or builds run. Cumulative line reduction remains below the requested target; distinct security and durability scenarios retained. * test(gateway): deslop r0099 tests Remove five requester groups duplicated in github-publication-requester-aliases.test.ts: resumed grants, queued alias bindings, immediate retries, pending profile recovery, and concurrent bindings. Keep the alias suite as their owner. Reuse scoped-read and ACP fixtures and remove redundant project/dispatch call-shape assertions. Project creation remains covered by server.sessions.create.projects.test.ts. Preserve distinct authority, storage, and ordering cases. CI-only campaign: no tests or coverage run. Plain oxlint, oxfmt, and diff-check passed. 4976 -> 4573 test lines; 35% target not reached without removing distinct behavior. * test(gateway): remove duplicate r0099 boundary replays Keep project validation in server.sessions.create.projects.test.ts, external cwd rejection in server.sessions.create.workspace-policy.test.ts, and structured denial translation in sessions-spawn-tool.test.ts. Keep provisioning assertions in server.sessions.create.worktrees.test.ts. Keep session/owner PR lifetime fences in control-ui-session-pr-subscriptions.lifetimes.test.ts and real visibility fences in control-ui-session-pr-access.test.ts. Consolidate selected and service committed-preview assertions and reuse existing rejection/disposal helpers. CI-only: no test or coverage runs. Plain oxlint, oxfmt and diff-check pass. Additional 100 lines removed; cumulative 4976 to 4473 (10.1%). Remaining distinct authority, storage, and lifecycle cases prevent a safe 35% cut. * test(gateway): consolidate r0099 fixtures and assertions Share typed session/model fixtures and scoped RPC setup while retaining per-method authority and lifecycle assertions. Remove duplicated internal dispatch, registry and steady-state checks. Keep sandbox rejection coverage in server.sessions.create.projects.test.ts and positive inherited-sandbox tool cases here. Restore the queueGuest import used by the retained policy-readiness case. Keep negative-policy setup controls, durable failure errors, and checkout path ownership assertions. CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run. Additional 180 lines removed, cumulative 4976 to 4293 (13.7%). The 35% target remains unmet because no further behavior-equivalent layer was identified. * test(sessions): consolidate r0101 owner-boundary coverage Remove duplicate lifecycle-admission cases retained in session-accessor.sqlite-lifecycle-admission.test.ts, including cold FIFO, read-only cleanup, repair refusal, authority retirement, selected state ownership, and historical preparation. Retain cold-command coverage in session-actor.test.ts (installs a cold command and stale preimage without a separate read request), bookkeeping in session-actor-completion.test.ts (commits final custody, recap, usage, and claim cleanup together across rollback and restart), and usage-cache isolation in session-actor-entry-residency.test.ts (retains resident session facts across usage cache writes and reloads actual session changes). Keep replica eviction as the behavioral byte-budget contract. Consolidate standalone and reply-tail watermarks; memory anchor coverage remains in session-transcript-memory-read.test.ts. Lagging and unclassified projection cases remain in session-accessor.sqlite-handle-lifecycle.test.ts. Shared and qualified lineage selection remains in session-utils-store-lookup.test.ts and combined-store-gateway.worker.test.ts; global parent transitions remain in session-row-projection.archived.test.ts. Remove internal SQL/receipt inventories and repetitive fixtures, preserving durable outcomes, scoped authority, and actual race controls. CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage run. Original shard 5247 to 4480 lines (14.6 percent), below the 35 percent target. * test(gateway): deslop r0102 tests Share memory search owner requests, exact response assertions, and invalid-agent cases. The unavailable-manager case retains the legacy-backend acquisition assertions previously repeated by a separate test. Reuse rewind scopes and media expectations and sharing permission fixtures without removing distinct authority, lifecycle, or persistence cases. CI-only campaign: static lint, formatting, and diff checks only. * test(gateway): remove r0102 owner-layer replays Remove duplicate catalog, discovery, model-policy, projection, validation, and ticket scenarios. Keep distinct worker publication, runtime preparation, physical ownership, and authority interleavings. Retained proof: memory-host-sdk host/types keeps pending-index and sync-failure diagnostics; question.own-run keeps privileged-record concealment and accepted-answer lifetime. sessions-read-catalog-scope, optional-model-catalog, session-utils single-row-cache/subagent, targets-read-availability and targets-discovery keep catalog isolation, selected-row parsing, fixed-store and template discovery. sessions-create-category keeps first-use group invalidation; session-model-selection-policy keeps non-admin session-only selection; server.sessions.create.forks keeps native fork capacity; session-utils and model-catalog-view keep context-window projection. session-accessor.sqlite-message-cut-native keeps native cut validation; retained rewind lifecycle tests keep archived rejection and queue settlement. Retained creator-lifecycle tests keep archived, duplicate and sentinel identities; board-http keeps live issuing-Gateway ticket enforcement. CI-only: plain oxlint, formatting, and diff checks pass. No tests or coverage run. Original shard LOC 4797 to 4020; 35 percent target remains unmet rather than dropping unique security or lifecycle proof. * style(test): normalize replayed fixture formatting * test: preserve boundary proof and repair replayed fixtures * test: repair retained lifecycle fixture setup * test: drop incompatible campaign fixture reductions * test: retain inline update repair assertions
What Problem This Solves
This test-only campaign batch removes redundant owner-layer replays and consolidates retained fixtures across agents, chat, Codex, infrastructure, and Gateway/session tests. Distinct authority, recovery, persistence, and lifecycle checks remain at their owning boundaries. There are no runtime, public API, schema, dependency, or visual changes.
The batch was replayed onto pinned main 6290fb2. Main's newer tests and fixture ownership win over conflicting campaign refactors; omissions are listed below.
Evidence
Production/support LOC: +0/-0. Test LOC: +1946/-4188, net -2242, across 22 files. No files deleted. CODEOWNERS: no changed path matches a listed ownership rule.
Per-shard replay deltas
Counts below are computed against the pinned main, not copied from the pre-replay campaign totals. Declaration counts are static it/test call-site counts, not expanded parameterized cases. Every shard's source coverage status is: not run (CI-only).
r0092
Coverage: not run (CI-only); no measured coverage totals available.
r0093
No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).
r0094
No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).
r0095
Coverage: not run (CI-only); no measured coverage totals available.
r0096
Coverage: not run (CI-only); no measured coverage totals available.
r0097
No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).
r0098
Coverage: not run (CI-only); no measured coverage totals available.
r0099
Coverage: not run (CI-only); no measured coverage totals available.
r0100
No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).
r0101
Coverage: not run (CI-only); no measured coverage totals available.
r0102
Coverage: not run (CI-only); no measured coverage totals available.
Replay omissions
Three commits skipped during initial replay: 75aecbcd8eec (missing predecessor refactors), 6107ee994c2a (Doctor registrars already present on main; introduced in 47be911), and 568ff71e225a (lifecycle cases already relocated). The other 27 supplied commits were initially applied fully or partially. Later stack cleanup dropped three directive-tag commits (bc34f1044249, b30c56c598f0, 467aa6cc967b) and three command-shard commits (8c8fc89ed9a6, aab7a8cccc6b, 169af8b84d5a). 21 supplied commits remain plus formatting/corrective commits; some have no remaining net change after file-level restorations.
Source-report warnings about missing helpers were reconciled by retaining main where incompatible; current retained-runtime logging imports are present. Hosted CI remains authoritative for the replayed head.
Review and first CI corrections
Independent review: 11 findings considered, 4 accepted and 7 declined with source evidence. Restored the complete isolated-completion, inbound-registry, and directive-tag files to pinned main to retain utility-to-CLI integration, distinct runtime isolation, and persisted sensitive-media proof. Restored the optional-result guard in session-catalog-adoption.
Declined coverage findings: requester revocation is exercised by the registered current-core service-receipt and boundary finalization suites; rollback refusal, restoration, and terminal settlement remain in update-command-rollback and update-command-post-update-recovery. Cron admission negatives remain in agent-run-local-operator-authority and retained resolver expiry remains in agent-tools.create-openclaw-coding-tools. Board HTTP tests explicitly reject a ticket through a different or inactive issuing Gateway. Device pairing retains old-token/new-generation rejection plus upgraded-token issuer equality. Project validation remains in server.sessions.create.projects and real cwd/admin/sandbox rejection in server.sessions.create.workspace-policy. The retained-runtime opening test still starts acceptedWrite before callback exit and asserts completion before maintenance removal, including unrelated-worker survival.
First CI run: https://github.com/openclaw/openclaw/actions/runs/40114722801. SQLite copy failed journal-transition, aggregate-error, and descriptor-cleanup expectations; restored that entire file to main. Worktree spawn failed absent-property expectations introduced by assertion consolidation; restored that entire file to main. Check-plan rejected a new type-level import of the bundled memory plugin; restored the existing host-contract type so the plugin implementation stays outside the core type graph. No retries, assertion weakening, or local test runs. PR context check required this authored problem heading, now corrected.
These five restored files have no remaining batch diff: src/agents/isolated-completion.test.ts, src/agents/prepared-model-runtime.inbound-registry.test.ts, src/gateway/server-methods/chat.directive-tags.test.ts, src/infra/sqlite-readonly-location.copy.test.ts, and src/gateway/server.sessions.create-worktree-spawn.test.ts. The table above reflects the final reduced scope. Completed corrective-delta reviews are scoped-clean; fresh-head CI remains the execution gate.
Later CI corrections and final scope
Run https://github.com/openclaw/openclaw/actions/runs/40115455211 exposed a platform callback returning a Chai chain and missing actor statement-counter/fixed-clock fixtures. The actor counter and clock were restored without changing assertions. The incompatible transcript-anchor consolidation was dropped by restoring its complete test file to pinned main.
Run https://github.com/openclaw/openclaw/actions/runs/40116148345 exposed older campaign type/fixture assumptions in fresh Doctor, post-update finalization, scoped runtime refresh, memory search, and flat-profile migration, plus missing mock-isolation notes in the restart fixture. Those complete reductions were dropped: fresh-doctor, post-update, scoped-refresh, memory-search, restart-stale-pids, doctor-auth-flat-profiles, agent.test, and agent-via-gateway now exactly match pinned main. The command-shard commits were removed by rebase so the line-cap ratchet remains intact.
Run https://github.com/openclaw/openclaw/actions/runs/40117072800 had one remaining failed test shard: post-update-repair extracted Chai assertion methods without their receiver. That file is now restored exactly to pinned main too. There are no remaining update-test changes. The table above reflects the final 22-file reduction. No guard bypasses, retries, widened types, assertion weakening, local tests/typechecks/check-changed, or Testbox runs were used.