Repository navigation
test(agents,gateway,plugins): remove low-value tests (batch d608) - #184557
Conversation
|
🦞👀 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. |
ac94951 to
bdb4714
Compare
|
Codex review: needs changes before merge. What this changesThis PR consolidates test fixtures and removes assertions and cases considered redundant across agent, Gateway, CLI, config, and plugin suites. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 3 items remain Keep this PR open: the maintainer-directed cleanup is useful, but two distinct regression contracts are lost during consolidation. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherThese suites exercise runtime owners through fixtures, workers, HTTP servers, and RPC handlers, turning observed behavior into regression checks. flowchart LR
A[Test scenarios] --> B[Shared fixtures]
B --> C[Agent and Gateway owners]
B --> D[Plugin owners]
C --> E[Observed results]
D --> E
E --> F[Contract assertions]
Technical reviewBest possible solution: Keep the fixture consolidation while preserving the opaque-source widget regression and lifecycle SQL work-count assertions in their existing owner suites. Do we have a high-confidence way to reproduce the issue? Both coverage losses are established by the introduced hunks, original test blobs, production owners, and originating fixes; no target code was executed during this read-only review. Is this the best way to solve the issue? Shared fixtures and equivalent-case tables are appropriate, but consolidation must retain the independent failure conditions established by the original fixes. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2988b14f22e6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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 26, 2026, 8:35 AM ET / 12:35 UTC. |
ace555f to
b6264bc
Compare
Keep Git deadline choices at the shared Doctor callback; package-to-Git activation is covered by update-command-package.test.ts's retained Doctor receipt test. Fresh-doctor physical outcome tests retain exit/timeout facts, leaving the direct readiness test focused on preserving an existing plugin error. Keep unchanged current-core deferred retirement here. Candidate completion, warning reporting, and selected Node dispatch remain in the foreground finalization and convergence-authority suites. Replace the pre-existing nonexistent createConvergenceParams import with the maintained finishParams fixture.
Keep all decision branches while sharing CA failure setup, usage fixtures, and sandbox boot proof. Remove internal call-shape and diagnostic wording restatements. Unrelated-row decoding is covered by session-create-collision.test.ts: rejects collisions in storage without decoding unrelated durable entries; exact snapshot selection remains covered by session-entry-read.worker.test.ts: hydrates only requested snapshots while retaining exact-read lifecycle and authorization facts. Drop the obsolete runtime function-source override: sandbox-host embeds generated matcher source. Keep executable widget script parsing in the no-referrer sandbox boot test. CI-only validation: oxfmt, plain oxlint, and diff checks; no test runs.
Remove repeated EIO propagation and EPERM/ELOOP/EIO uncertainty variants. The retained EACCES cases in path-existence.test.ts still exercise the same propagation and conservative-presence branches; retain the distinct not-found and ENOTDIR policies. Use the existing state lifecycle fixture, inline the single-use receipt fixture, and simplify script cleanup without dropping migration, durability, runtime or ordering assertions. CI-only validation: plain oxlint, oxfmt and diff check; runtime proof deferred to hosted CI. Reduction: 960 to 924 test lines (3.75%); further cuts would remove distinct boundary proof.
Reuse the existing model fixture and remove the generated-script driver's extra subprocess. The copied bootstrap still loads outside the checkout and all generated programs execute in real child processes with private-directory and cleanup assertions. Remove copied directory inventories and same-branch stat variants. Question delivery keeps the real queue/generation race; delivery tracker assertions remain owned by dispatch-dispatcher.test.ts (observes the SDK enqueue and sends a source-owned alternative only after proven non-delivery). Keep all custody, migration and runtime-failure cases. CI-only validation: plain oxlint, oxfmt and git diff --check. Cumulative shard lines: 960 to 882 (8.125%); the remaining independent boundaries prevent an honest 20% cut in this scope.
Reuse the existing completion config and admission helper, remove mutable legacy migration registry setup, and use the canonical isolated state fixture for handoff custody. Preserve the private child database guard and join live handoff owners before cleanup. Share executable script invocation with nonzero exits still failing through execFileSync. Keep all recovery budget, migration source retention, custody and generated-program assertions. CI-only: plain oxlint, oxfmt and diff check pass; no tests or coverage run. Cumulative shard LOC 960 to 831 (13.4375%); no whole-file duplicate justified removal.
Keep every case and boundary assertion; simplify model and header fixtures, reuse the MCP temporary-home harness, and remove one-use wrappers. CI-only shard: formatting, standalone oxlint, and diff checks pass; runtime proof is deferred to hosted CI. Reduction is 49 of 1522 lines (3.2%); further cuts would drop distinct behavior.
Remove six duplicated snapshot cases and their harness from cli-output-partial-messages; cli-output-snapshots retains deduplication, commentary/tool routing, disabled commentary, nested-result redaction, tagged reasoning, and subagent exclusion. Keep all stream budget branches in a smaller table. Reuse model-auth config fixtures, consolidate thinking fixture setup, and keep metadata projection assertions in one flow. Tool profile capability behavior remains in tool-catalog tests; retain unknown-profile handling here. CI-only: standalone oxlint, formatting, and diff check passed; no runtime tests. Shard totals 1522 to 1333 lines (12.4%); 20% target remains unmet without removing distinct boundary proof.
Share context resolution and remediation setup while retaining every configured-limit, default, invalid-input and local/public endpoint outcome. Reuse typed thinking resolution, OAuth isolation and SQL setup; remove one-use fixture wrappers and redundant workspace setup. No cases or boundary assertions removed in this pass. CI-only: standalone oxlint, formatting and diff check passed; no tests run. Additional 48-line reduction, total 1522 to 1285 lines (15.6%); target remains unmet rather than dropping distinct behavior.
Remove five promotion cases duplicated by attempt-tool-call-text-promotion-adjacent.test.ts: adjacent blocks, case-insensitive and alias prefixes, and both XML variants. Retain cloned-result IDs, thinking order, split XML, and scrubbing boundaries. Share skill-bypass assertions without removing startup cases. Shard lines: 1295 -> 1138 (12.1%); declarations 21 -> 17; expanded cases 39 -> 34. Remaining suites protect distinct admission, persistence, lineage, policy and lifecycle boundaries; stop below the 20% target rather than discard them. CI-only: oxfmt, plain oxlint and diff checks pass; tests and coverage deferred to hosted CI.
Reuse canonical session method types and the existing subagent tool stub. Remove duplicate internal execution/lifecycle counters while retaining committed evidence, replay invalidation, terminal ordering and exactly-once execution checks. Combine cloned-message ID and multi-block thinking proof in one stream-consistency scenario. Split XML remains covered by provider-stream-shared.test.ts (promotes split zero-argument XML function calls without leaking partials) and tool-call-repair/stream-normalizer.test.ts (keeps every opening-marker split private). Root eligibility remains covered by plugins/memory-audience.test.ts (denies missing chat type); the retained attempt unverified-lineage row covers info logging and session attribution. Shard LOC: 1295 -> 1034 (-20.15%); this follow-up removes 104 lines from 1138. All distinct recovery and policy cases retained. CI-only: oxfmt, plain oxlint and diff checks pass; no test or coverage runs.
Share archive-holder setup and participant repair fixtures and expected projections. Preserve all admission, rollback, publication, membership and restart assertions. No test cases removed; CI-only static validation.
Consolidate lifecycle preparation and PostgreSQL reader cases; use the standard state fixture for reconciliation and assert captured-environment behavior against durable rebuild state. Keep stale-upsert and admission rollback proof in session-lifecycle-projection.worker.test.ts: retains conflict identity and the concurrent row when a prepared upsert is stale; rolls back snapshots at the transaction/commit grant. Remove the unused legacy oracle omission parameter and obsolete JSONL freshness variant. CI-only: formatting, diff check and plain oxlint passed; no tests run.
Remove the unused supplied-intent registration and orphaned config fixture helpers. Config runner ordering, reference restoration, canonical IDs and replacement safety remain covered by config-cli-runner.supplied-intent.test.ts. Reuse the isolated CLI process fixture without changing cleanup assertions. Exercise mixed skill search results in one native result batch, preserving all expected lines. CI-only validation: oxfmt, oxlint and diff check; no test or coverage runs.
Consolidate validation and bootstrap fixtures while retaining every distinct case, including sandbox identity scopes, prototype-key rejection, and sibling session path handling. Keep publication/provenance, cron ownership, docs isolation, and schema composition contracts intact; these small suites do not support a safe 20% structural cut.
Remove the generic mixed-union schema inventory and its walkers. Browser coverage remains in config-form-composition-integrity.browser.test.ts (finite boolean and string-or-literal unions) and config-form-scalar-integrity.browser.test.ts (unsupported literal sentinels). Retain the generated-schema native-command regression from ee7fae8. Consolidate model-policy validation, publication lifecycles, and docs isolation fixtures. Keep every ownership refusal and sandbox identity assertion. Drop duplicate provider/tier replays and internal merge assertions; runtime-only merge behavior remains covered by web-search.test.ts: keeps mirrored Brave plugin config runtime-only when newly injected. Shard baseline: 1332 lines; final: 1064 lines (-20.1%). CI-only: formatting, diff check, and plain oxlint passed; no test or coverage runs.
Consolidate auth source reappearance cases into the canonical alias suite without removing cases. Share source/archive fixtures, retain exact credential and archive-byte checks, and let existing state fixtures own database teardown.
Replace mocked onboarding creation and revision checks with existing real-owner coverage in onboard-non-interactive/local.default-agent.test.ts (guards first-agent ownership and config revision) and onboard-agent.persistence.test.ts (authored config preservation). Retain device normalization and malformed-row proof in infra/device-auth-store.test.ts. Keep CLI thinking outcomes while Agent openai-thinking-contract.test.ts owns wire-shape assertions. Share auth archive, exec authorization, and prompt fixtures; reuse retainedHistoryMove instead of copying its artifact shape.
Compact preview policy cases and reuse upload route setup. Retain all SSRF, request-authority, Chromium and lifecycle cases. Tab listing response tests retain policy and public output proof without internal probe argument/count assertions.
Keep cross-tab rejection at server.agent-contract-core.test.ts (rejects action target overrides), keyboard chord aliases at its common-act contract, and insertion-byte proof in agent.content.chromium.test.ts. Preserve nested alias, invalid-action, depth-bound, authority, and SSRF checks. Reuse preview and hook fixtures; remove duplicate internal call-shape assertions.
b6264bc to
d481e4c
Compare
…enclaw#184557) * test(update): consolidate o0310 deadline and completion proof Keep Git deadline choices at the shared Doctor callback; package-to-Git activation is covered by update-command-package.test.ts's retained Doctor receipt test. Fresh-doctor physical outcome tests retain exit/timeout facts, leaving the direct readiness test focused on preserving an existing plugin error. Keep unchanged current-core deferred retirement here. Candidate completion, warning reporting, and selected Node dispatch remain in the foreground finalization and convergence-authority suites. Replace the pre-existing nonexistent createConvergenceParams import with the maintained finishParams fixture. * test(plugins): deslop o0311 tests * test(plugins): remove redundant o0311 proof layers Delete the global-registry staging replay: stage-bundled-plugin-runtime.test.ts covers sidecars and canonical command state without a global masking duplicate modules. public-surface-loader.test.ts (loads import-only dependencies under tsx) and public-surface-generation.test.ts (shares installed registration state with captured APIs) retain TypeScript facade/dependency proof. Keep effective-id callback ordering and reserved legacy selection. Delegate declared-owner trust/deny/disable matrices to config-state.test.ts context engine ownership and channel-plugin-ids.context-engine.test.ts; persisted-auth startup exclusion remains in channel-plugin-ids.test.ts. Consolidate schema-owner presentation and dependency-status assertions. Remove same-branch path/type variants and internal call-shape or copied-metadata assertions while retaining path custody, recovery, ordering, and public command outcomes. CI-only: formatting, diff-check and plain oxlint pass; no test or coverage runs. Original shard 1314 lines to 1051 (-20.02%). * test(gateway): deslop o0308 tests * test(gateway): consolidate o0308 boundary fixtures Retain distinct authority and lifecycle cases while consolidating hook selection and link-policy setup. Reuse RPC, push-storage, and hook fixtures. Remove refresh assertions duplicated by progress-card-refresh.integration.test.ts: starts a hidden status-only turn when idle or steering is unavailable, and deduplicates concurrent refresh bursts with distinct intents through completion. Missing-card rejection remains covered by board.incognito.test.ts: returns explicit absence without opening Board, progress, or deletion sources. Keep the separate assistant-transcript privacy callback assertion. * test(gateway): finish o0308 structural consolidation Consolidate fixed-store delivery and bounded snapshots in the retained chat lifecycle table, keeping keyed and global delivery, final settlement, and late-event rejection assertions. Share refresh rejection setup across distinct validation and terminal-error rows. Reuse existing controller, native request, and asynchronous gate fixtures. Retain all native consent and requester revocation variants. Internal refresh dispatch argument assertions remain covered at the public route by progress-card-refresh.integration.test.ts (starts a hidden status-only turn when idle or steering is unavailable); retain caller identity, assistant privacy, and retry-scope assertions here. Missing-scope envelope metadata is covered by server-methods.dispatch-authorization.test.ts; retain the hooks-specific forbidden/missing-scope boundary. * test(telegram): deslop o0309 tests Share redaction, presentation, location, and lane fixtures while retaining distinct security, delivery, and durability assertions. Consolidate cache statistics into an empty-to-populated lifecycle check. The unsupported callback test retains empty and malformed selection inputs covering the same final-null branch as the removed arbitrary strings. Preserve invalid page, opaque provider ownership, and ambiguous resolution checks. CI-only shard: local oxlint, formatting, and diff checks pass. Test execution and coverage remain for hosted CI. Reduction is below the requested target because remaining cases protect distinct boundaries. * test(telegram): consolidate o0309 boundary proof Drop the synthetic stalled-error capture replay: api-fetch.live.test.ts, closes a stalled non-success getChat response body, retains real-socket and cloned-capture proof. Keep local response-size, body deadline, and owned-transport cleanup checks. Consolidate equivalent callback identifiers and middleware failure variants. Exercise FIFO at its middleware owner without grammY dispatch scaffolding, keep malformed offsets in checkpoint recovery, and replace the presentation resolver stub with real table rendering. Nested transport redaction remains checked through createTelegramRequestWithDiag. Keep webhook polling-offset isolation, token rotation, and cross-bot identity proof; monitor.test.ts retains fresh-state startup coverage. CI-only: local oxlint and formatting/diff checks passed; tests and coverage were not run. Cumulative shard reduction remains below 20 percent because distinct admission, persistence, lifecycle, and channel contracts are retained. * test(telegram): consolidate o0309 fixtures and presentation proof Use the existing registered-channel ingress fixture instead of duplicating admission owners, audit setup, keyed stores, and queue construction. The forum-scope and webhook identity assertions now cross the registered runtime boundary. Keep all eight presentation branches in one real streamed-finalization table with exact output assertions, including degraded controls, dropped-label deduplication, authored overlap, and title-only rendering. Share cache fixtures, remove file-redundant describe scopes, and retain independent lane state and strict projection assertions. Webhook durable-ack and spool-failure proof remains in webhook.test.ts; this identity test retains HTTP success and exact delivered update assertions. CI-only validation: formatting, plain oxlint, and diff checks passed. No tests or coverage run. Shard lines are 1457 to 1164, a 20.1 percent reduction. * test(matrix): deslop o0312 tests Consolidate reaction fixtures, config assertions and formatting tables while preserving distinct paths. Keep readiness, persistence and authority settlement checks. Reaction selection remains covered by actions/reactions.test.ts: removes only matching current-user reactions, including later pages. Blank relation IDs remain covered there by rejects blank message ids before querying Matrix relations. The both-blank content row duplicates the retained blank-message branch. CI-only shard: oxlint, oxfmt and diff-check pass; no test or coverage execution. Test/support LOC 1356 to 1264 (6.8%); stop below 20% rather than remove distinct persistence, recovery, protocol or authority coverage. * test(matrix): finish o0312 structural reduction Consolidate formatting and config branch tables, minimal poll fixtures, shared store cleanup and resolver fixture types. Remove stale bootstrap runtime mocking and duplicate settlement bookkeeping while retaining authority and persistence assertions. Keep one Doctor replay-refusal boundary; sdk/idb-persistence.test.ts preserves retained account keys after invalid record key / unique index conflict during replay. Its duplicate database-name test retains the validator case. Onboarding tests retain invite allowlist updates and clears through the real config updater. CI-only: no tests, builds or coverage run. Plain oxlint, oxfmt and diff-check pass. Original shard LOC 1356 -> 1084 (-20.1%); this additional commit cuts 180 lines without rewriting the earlier commit. * test(gateway): deslop o0315 tests * test(gateway): consolidate o0315 boundary fixtures Keep all decision branches while sharing CA failure setup, usage fixtures, and sandbox boot proof. Remove internal call-shape and diagnostic wording restatements. Unrelated-row decoding is covered by session-create-collision.test.ts: rejects collisions in storage without decoding unrelated durable entries; exact snapshot selection remains covered by session-entry-read.worker.test.ts: hydrates only requested snapshots while retaining exact-read lifecycle and authorization facts. Drop the obsolete runtime function-source override: sandbox-host embeds generated matcher source. Keep executable widget script parsing in the no-referrer sandbox boot test. CI-only validation: oxfmt, plain oxlint, and diff checks; no test runs. * test(infra): deslop o0313 tests Remove repeated EIO propagation and EPERM/ELOOP/EIO uncertainty variants. The retained EACCES cases in path-existence.test.ts still exercise the same propagation and conservative-presence branches; retain the distinct not-found and ENOTDIR policies. Use the existing state lifecycle fixture, inline the single-use receipt fixture, and simplify script cleanup without dropping migration, durability, runtime or ordering assertions. CI-only validation: plain oxlint, oxfmt and diff check; runtime proof deferred to hosted CI. Reduction: 960 to 924 test lines (3.75%); further cuts would remove distinct boundary proof. * test(infra): reduce o0313 fixture and harness layers Reuse the existing model fixture and remove the generated-script driver's extra subprocess. The copied bootstrap still loads outside the checkout and all generated programs execute in real child processes with private-directory and cleanup assertions. Remove copied directory inventories and same-branch stat variants. Question delivery keeps the real queue/generation race; delivery tracker assertions remain owned by dispatch-dispatcher.test.ts (observes the SDK enqueue and sends a source-owned alternative only after proven non-delivery). Keep all custody, migration and runtime-failure cases. CI-only validation: plain oxlint, oxfmt and git diff --check. Cumulative shard lines: 960 to 882 (8.125%); the remaining independent boundaries prevent an honest 20% cut in this scope. * test(infra): reuse o0313 lifecycle fixtures Reuse the existing completion config and admission helper, remove mutable legacy migration registry setup, and use the canonical isolated state fixture for handoff custody. Preserve the private child database guard and join live handoff owners before cleanup. Share executable script invocation with nonzero exits still failing through execFileSync. Keep all recovery budget, migration source retention, custody and generated-program assertions. CI-only: plain oxlint, oxfmt and diff check pass; no tests or coverage run. Cumulative shard LOC 960 to 831 (13.4375%); no whole-file duplicate justified removal. * test(agents): deslop o0314 tests Keep every case and boundary assertion; simplify model and header fixtures, reuse the MCP temporary-home harness, and remove one-use wrappers. CI-only shard: formatting, standalone oxlint, and diff checks pass; runtime proof is deferred to hosted CI. Reduction is 49 of 1522 lines (3.2%); further cuts would drop distinct behavior. * test(agents): remove duplicate o0314 snapshot coverage Remove six duplicated snapshot cases and their harness from cli-output-partial-messages; cli-output-snapshots retains deduplication, commentary/tool routing, disabled commentary, nested-result redaction, tagged reasoning, and subagent exclusion. Keep all stream budget branches in a smaller table. Reuse model-auth config fixtures, consolidate thinking fixture setup, and keep metadata projection assertions in one flow. Tool profile capability behavior remains in tool-catalog tests; retain unknown-profile handling here. CI-only: standalone oxlint, formatting, and diff check passed; no runtime tests. Shard totals 1522 to 1333 lines (12.4%); 20% target remains unmet without removing distinct boundary proof. * test(agents): consolidate o0314 branch fixtures Share context resolution and remediation setup while retaining every configured-limit, default, invalid-input and local/public endpoint outcome. Reuse typed thinking resolution, OAuth isolation and SQL setup; remove one-use fixture wrappers and redundant workspace setup. No cases or boundary assertions removed in this pass. CI-only: standalone oxlint, formatting and diff check passed; no tests run. Additional 48-line reduction, total 1522 to 1285 lines (15.6%); target remains unmet rather than dropping distinct behavior. * test(agents): deslop o0316 tests Remove five promotion cases duplicated by attempt-tool-call-text-promotion-adjacent.test.ts: adjacent blocks, case-insensitive and alias prefixes, and both XML variants. Retain cloned-result IDs, thinking order, split XML, and scrubbing boundaries. Share skill-bypass assertions without removing startup cases. Shard lines: 1295 -> 1138 (12.1%); declarations 21 -> 17; expanded cases 39 -> 34. Remaining suites protect distinct admission, persistence, lineage, policy and lifecycle boundaries; stop below the 20% target rather than discard them. CI-only: oxfmt, plain oxlint and diff checks pass; tests and coverage deferred to hosted CI. * test(agents): finish o0316 structural reduction Reuse canonical session method types and the existing subagent tool stub. Remove duplicate internal execution/lifecycle counters while retaining committed evidence, replay invalidation, terminal ordering and exactly-once execution checks. Combine cloned-message ID and multi-block thinking proof in one stream-consistency scenario. Split XML remains covered by provider-stream-shared.test.ts (promotes split zero-argument XML function calls without leaking partials) and tool-call-repair/stream-normalizer.test.ts (keeps every opening-marker split private). Root eligibility remains covered by plugins/memory-audience.test.ts (denies missing chat type); the retained attempt unverified-lineage row covers info logging and session attribution. Shard LOC: 1295 -> 1034 (-20.15%); this follow-up removes 104 lines from 1138. All distinct recovery and policy cases retained. CI-only: oxfmt, plain oxlint and diff checks pass; no test or coverage runs. * test(sessions): deslop o0317 tests Share archive-holder setup and participant repair fixtures and expected projections. Preserve all admission, rollback, publication, membership and restart assertions. No test cases removed; CI-only static validation. * test(sessions): consolidate o0317 lifecycle proof Consolidate lifecycle preparation and PostgreSQL reader cases; use the standard state fixture for reconciliation and assert captured-environment behavior against durable rebuild state. Keep stale-upsert and admission rollback proof in session-lifecycle-projection.worker.test.ts: retains conflict identity and the concurrent row when a prepared upsert is stale; rolls back snapshots at the transaction/commit grant. Remove the unused legacy oracle omission parameter and obsolete JSONL freshness variant. CI-only: formatting, diff check and plain oxlint passed; no tests run. * test(cli): deslop o0321 tests Remove the unused supplied-intent registration and orphaned config fixture helpers. Config runner ordering, reference restoration, canonical IDs and replacement safety remain covered by config-cli-runner.supplied-intent.test.ts. Reuse the isolated CLI process fixture without changing cleanup assertions. Exercise mixed skill search results in one native result batch, preserving all expected lines. CI-only validation: oxfmt, oxlint and diff check; no test or coverage runs. * test(config): deslop o0319 tests Consolidate validation and bootstrap fixtures while retaining every distinct case, including sandbox identity scopes, prototype-key rejection, and sibling session path handling. Keep publication/provenance, cron ownership, docs isolation, and schema composition contracts intact; these small suites do not support a safe 20% structural cut. * test(config): consolidate o0319 boundary coverage Remove the generic mixed-union schema inventory and its walkers. Browser coverage remains in config-form-composition-integrity.browser.test.ts (finite boolean and string-or-literal unions) and config-form-scalar-integrity.browser.test.ts (unsupported literal sentinels). Retain the generated-schema native-command regression from cc2fa17. Consolidate model-policy validation, publication lifecycles, and docs isolation fixtures. Keep every ownership refusal and sandbox identity assertion. Drop duplicate provider/tier replays and internal merge assertions; runtime-only merge behavior remains covered by web-search.test.ts: keeps mirrored Brave plugin config runtime-only when newly injected. Shard baseline: 1332 lines; final: 1064 lines (-20.1%). CI-only: formatting, diff check, and plain oxlint passed; no test or coverage runs. * test(commands): deslop o0320 tests Consolidate auth source reappearance cases into the canonical alias suite without removing cases. Share source/archive fixtures, retain exact credential and archive-byte checks, and let existing state fixtures own database teardown. * test(commands): consolidate o0320 boundary proof Replace mocked onboarding creation and revision checks with existing real-owner coverage in onboard-non-interactive/local.default-agent.test.ts (guards first-agent ownership and config revision) and onboard-agent.persistence.test.ts (authored config preservation). Retain device normalization and malformed-row proof in infra/device-auth-store.test.ts. Keep CLI thinking outcomes while Agent openai-thinking-contract.test.ts owns wire-shape assertions. Share auth archive, exec authorization, and prompt fixtures; reuse retainedHistoryMove instead of copying its artifact shape. * test(browser): deslop o0318 tests Compact preview policy cases and reuse upload route setup. Retain all SSRF, request-authority, Chromium and lifecycle cases. Tab listing response tests retain policy and public output proof without internal probe argument/count assertions. * test(browser): consolidate o0318 route proof Keep cross-tab rejection at server.agent-contract-core.test.ts (rejects action target overrides), keyboard chord aliases at its common-act contract, and insertion-byte proof in agent.content.chromium.test.ts. Preserve nested alias, invalid-action, depth-bound, authority, and SSRF checks. Reuse preview and hook fixtures; remove duplicate internal call-shape assertions. * test: preserve d608 boundary proof and repair CI fixtures * test: retain d608 readiness and presentation contracts * test: bind d608 fixture callbacks and shrink mock baseline * test: retain synchronous PostgreSQL admission proof
What Problem This Solves
Consolidates redundant tests and repeated fixtures in campaign batch d608 while retaining distinct boundary contracts.
User Impact
No production behavior change. Production LOC: +0/-0. Test and test-support LOC: +2503/-4244 (net -1741), across 92 files. Also removes one stale mock-baseline line. No dependency, schema, or runtime configuration changes.
Why This Change Was Made
Replayed all 30 requested commits onto pinned main f25b04c. No whole commits skipped. Duplicate proof remains at its owning boundary; shared fixtures replace repeated setup.
Conflict resolutions preserve current main: dropped both update convergence/deadline-file hunks (including main's resumed-update case); kept Matrix readiness/lease/retirement cases and dropped its later client-bootstrap rewrite; kept current Web Push RPC and provider-affinity fixtures; kept main's already-split tool-text promotion suites; kept expanded web-search blocked-key coverage and split agent-schema tests; kept current onboarding migration/revision coverage; kept browser alias/ambiguous-prefix normalization coverage. Rebase after main advanced: preserved main's new restart-delivery model fixture and dropped both overlapping cleanup hunks; range-diff confirms every other commit is patch-identical. Session reconciliation adopted the shared test-state lifecycle and removed redundant bespoke cleanup.
Evidence
Shard inventory
Counts below are the actual rebased diff for each shard, not the original campaign totals. Declarations are static it/test call counts, including each declarations once; they are not expanded runtime case counts. The supplied shard reports explicitly state tests and coverage were not run under CI-only mode, so no coverage totals or <=1% claim is made.
o0310: test/support +17/-23 (net -6); declarations 4 → 4
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/cli/update-cli/update-command-post-plugin-readiness.test.tso0311: test/support +189/-336 (net -147); declarations 32 → 27
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/plugins/effective-plugin-ids.test.tssrc/plugins/installed-plugin-index.symlink.test.tssrc/plugins/manifest-model-params.test.tssrc/plugins/official-external-plugin-repair-hints.test.tssrc/plugins/package-entry-resolution.runtime.test.tssrc/plugins/plugin-package-metadata-capture.test.tssrc/plugins/plugin-source-file.copy.test.tssrc/plugins/provider-availability-policy.test.tso0308: test/support +299/-510 (net -211); declarations 27 → 22
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/gateway/server-methods/artifacts.test-support.tssrc/gateway/server-methods/chat-broadcast.test.tssrc/gateway/server-methods/chat-send-interrupt.test.tssrc/gateway/server-methods/hooks-status.test.tssrc/gateway/server-methods/plugins.lifecycle-contention.test.tssrc/gateway/server-methods/progress-card-refresh.test.tssrc/gateway/server-methods/push-preferences.worker.test.tssrc/gateway/server-methods/sessions-create.native-consent.test.tssrc/gateway/server-methods/skills-files.test.tssrc/gateway/server-methods/users-background.test.tssrc/gateway/server-methods/web-search.authority.test.tso0309: test/support +532/-726 (net -194); declarations 26 → 21
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
extensions/telegram/src/api-fetch.test.tsextensions/telegram/src/api-logging.test.tsextensions/telegram/src/bot-handlers.inbound-authorization.test.tsextensions/telegram/src/lane-delivery.test-support.tsextensions/telegram/src/location-message-hook.test.tsextensions/telegram/src/message-cache.conversation-context.test.tsextensions/telegram/src/sequentialize.test.tsextensions/telegram/src/sticker-cache.test.tsextensions/telegram/src/update-offset-persistence.test.tso0312: test/support +97/-271 (net -174); declarations 31 → 25
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
extensions/matrix/src/matrix/account-state.postgres.test.tsextensions/matrix/src/matrix/client-resolver.test-helpers.tsextensions/matrix/src/matrix/config-update.test.tsextensions/matrix/src/matrix/deps.test.tsextensions/matrix/src/matrix/poll-types.test.tsextensions/matrix/src/matrix/reaction-common.test.tso0315: test/support +220/-395 (net -175); declarations 18 → 14
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/gateway/mcp-app-sandbox-http.test.tssrc/gateway/server-cron.session-target.test.tssrc/gateway/session-create-target.test.tssrc/gateway/session-send-recovery.authority.test.tssrc/gateway/session-send-recovery.notice-order.test-support.tssrc/gateway/session-transcript-derived-readers.usage.test.tssrc/gateway/system-ca-warmup.test.tso0313: test/support +142/-235 (net -93); declarations 15 → 15
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/infra/path-existence.test.tssrc/infra/question-channel-runtime.generation.test.tssrc/infra/runtime-process-script-file.test.tssrc/infra/sqlite-readonly-runtime.test.tssrc/infra/state-migrations.legacy-json.test.tssrc/infra/state-migrations.receipts.test.tssrc/infra/update-managed-service-handoff-busy.test.tso0314: test/support +198/-313 (net -115); declarations 54 → 45
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/agents/agent-tools.workspace-outside.test.tssrc/agents/ai-transport-runtime-host.test.tssrc/agents/cli-output-partial-messages.test.tssrc/agents/context-window-guard.test.tssrc/agents/live-test-helpers.tssrc/agents/mcp-oauth-requesters.test.tssrc/agents/model-compat.test.tssrc/agents/model-thinking-default.test.tssrc/agents/openclaw-tools.subagents.sessions-spawn.plan.test.tssrc/agents/tool-policy.test.tso0316: test/support +34/-116 (net -82); declarations 8 → 6
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/agents/embedded-agent-runner/run/attempt-memory-audience.test.tssrc/agents/embedded-agent-runner/run/attempt-prompt-admission.test-support.tssrc/agents/embedded-agent-runner/run/attempt-startup.test.tssrc/agents/embedded-agent-runner/run/attempt-tool-search-executor.commit.test.tssrc/agents/embedded-agent-runner/run/attempt.subagent-runtime-facts.test.tso0317: test/support +145/-290 (net -145); declarations 16 → 13
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/config/sessions/lifecycle.test.tssrc/config/sessions/session-accessor.sqlite-archive-admission.test.tssrc/config/sessions/session-actor-participant-repair.test.tssrc/config/sessions/session-lifecycle-projection.reads.test.tssrc/config/sessions/session-model-context-legacy.test-support.tssrc/config/sessions/session-transcript-reconcile.admission.test.tso0321: test/support +41/-70 (net -29); declarations 4 → 4
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/cli/message-plugin-cleanup.process.test.tssrc/cli/skills-search-cli.test.tso0319: test/support +169/-277 (net -108); declarations 36 → 29
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/config/channel-configured.test.tssrc/config/config.model-ref-validation.test.tssrc/config/docs-config-examples.test.tssrc/config/io.cron-owner-refusal.test.tssrc/config/runtime-source-projection.test.tssrc/config/schema.tiers.test.tssrc/config/sessions.test.tso0320: test/support +319/-502 (net -183); declarations 29 → 26
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
src/commands/agent-exec.thinking-http.test.tssrc/commands/agent-via-gateway.session-id.test.tssrc/commands/doctor-auth-canonical-api-key-alias.test.tssrc/commands/doctor-auth-reappeared-source.test.tssrc/commands/doctor-config-flow.canvas-migration.test.tssrc/commands/doctor-device-pairing.worker.test.tssrc/commands/doctor-gateway-auth-token.test.tssrc/commands/doctor-prompter.test.tssrc/commands/doctor-session-sqlite.scale.test.tssrc/commands/onboard-agent.test.tso0318: test/support +101/-180 (net -79); declarations 14 → 14
Coverage totals: unavailable; source report says no test/coverage execution (CI-only).
extensions/browser/src/browser/routes/agent.act.hooks.current-url-guard.test.tsextensions/browser/src/browser/routes/agent.local-preview.test.tsextensions/browser/src/browser/routes/tabs.attach-only.test.ts