Repository navigation
test(core,plugins): remove low-value tests (batch d504) - #183075
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. |
0286319 to
22c38da
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR consolidates test fixtures and removes duplicate assertions and scenarios across core and bundled plugins. Example: A terminal lifecycle write loses authority before commit.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed test cleanup has maintenance value, and inspection found no definite introduced defect; exact-head CI remains unresolved. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe changed suites exercise agent, Gateway, CLI, database, and plugin owners using synthetic inputs and verify their outputs, persisted state, and lifecycle effects. flowchart LR
A[Synthetic inputs] --> B[Shared test fixtures]
B --> C[Core runtime owners]
B --> D[Bundled plugin owners]
C --> E[Boundary assertions]
D --> E
E --> F[Hosted CI gate]
Technical reviewBest possible solution: Keep distinct boundary regressions in their existing owner suites while consolidating repeated setup and assertions. Do we have a high-confidence way to reproduce the issue? No runtime bug is claimed; this read-only review inspected the introduced test changes and retained coverage without executing target code. Is this the best way to solve the issue? Consolidating fixtures and retaining stronger owner-boundary tests fits the stated cleanup, with no definite correctness defect established by source inspection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 149416139cf8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -3428. Total -3428 across 56 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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, 9:33 PM ET / October 25, 2026, 01:33 UTC. |
22c38da to
53da38a
Compare
Consolidate credential JSON and temp-home fixtures, attachment envelopes, catalog replies, MCP view cleanup, and HTTP rejection assertions. Preserve all existing cases and distinct authority, protocol, delivery, and lifecycle assertions. CI-only validation: formatting, plain oxlint, and diff checks; runtime proof deferred to hosted CI.
Remove copied cancellation attribution, admitted output-schema, and HTTP suites from native-mcp-runtime.test.ts. Their exact cases remain in native-mcp-runtime.cancellation.test.ts, native-mcp-runtime.output.test.ts, and native-mcp-runtime.http.test.ts under the same agents-core routing. Consolidate credential clock/cache fixtures and remove redundant provider call-shape checks. Catalog publication event flags remain covered by prepared-model-runtime.publication-events.test.ts; ordinary framing overflow remains covered by cli-output-partial-messages.test.ts and the local blank-frame limit case. CI-only: formatting, plain oxlint, and diff checks; no tests run.
Remove the catalog status replay covered by session-row-projection.backfill.test.ts, session-row-projection-catalog.test.ts, and prepared-model-runtime.publication-events.test.ts. Keep the real auth-rotation publication integration and native activation cases. Drop the held-XML resolver replay covered by embedded-agent-subscribe.handlers.messages.tool-markup.test.ts and the runtime allowlist replay covered by extra-params.provider-runtime.test.ts. Preserve source replacement and persistent policy assertions. Consolidate active-login fixtures and rely on fixture-owned MCP disposal for final cleanup. No test runs; formatting, plain oxlint, and diff checks pass.
Remove duplicate round-trip and recovery-matrix cases covered by port-command.recovery.integration.test.ts and family-scoped cases covered by port-command.mixed.integration.test.ts. Both keepers run in the infra project with the same port-command worker setup. Consolidate port recovery setup, archive seed writes, and transcript projection observations without removing distinct custody, WAL, revocation, or durability assertions. Drop inherited-auth phase logging only. CI-only validation: plain oxlint, oxfmt, and git diff --check passed. Shard LOC 5739 -> 5330 (7.1%); declarations 60 -> 55. The 25% line target is not met: remaining tests exercise distinct engine, restore, auth, migration, and lifecycle behavior. No tests or coverage run locally.
Remove mocked multi-root publication recovery in favor of the real Matrix roots recovery test, carrying over original-capture, target identity, shared-root and manifest-cleanup assertions. First-use migration remains owned by port-command.test.ts and credential continuity by port-command.credentials.integration.test.ts. Remove internal auth, codec and actor receipt checks duplicated by real provider requests and persisted/reopened data. Share owner, mutation, index-state and repair fixtures. Retain PostgreSQL baseline-capture routing and unconditional SQLite repair coverage. CI-only validation: oxfmt, plain oxlint and diff checks pass; no tests or coverage run. Additional cut 5330 -> 5042 lines; cumulative 5739 -> 5042 (12.1%). The 25% target remains unmet; retained cases protect distinct backend, durability, security and ordering paths.
Reduce shard test LOC from 5739 to 4301 cumulatively, preserving PostgreSQL SQL regressions, credential rebinding, restore publication ordering, and source-preservation boundaries. Keepers: Matrix account-root backup rows remain in matrix-roots.postgres.test.ts; Logbook and Team Reports exact backup round-trips remain in logbook-port.postgres.test.ts. Gateway startup is owned by gateway-session-startup.conformance.test.ts and gateway-agent-inspection.conformance.test.ts. Opaque archive preservation and missing capsules are owned by backup-restore.test.ts and backup-verify-completeness.test.ts. Updater family admission remains in update-database-engine-admission.test.ts. Final restored JSON/blob/socket assertions replace intermediate snapshot dumps. Local credential variants remain in update-database-restore.test.ts. Matrix diagnostics remain in doctor-database-diagnostics.postgres.test.ts, and unconditional SQLite key repair remains in doctor-session-incognito-key-repair.test.ts. Cron restart, preference mutation, submitted-input lookup and metadata initialization remain in service.read-ops-nonblocking.test.ts, user-preferences.test.ts, session-accessor.pending-inputs.test.ts and session-actor-initialization.test.ts. Share transcript navigation fixtures and remove redundant projection layouts without changing query-budget assertions. CI-only: oxfmt, plain oxlint and git diff --check passed. No tests, coverage or typecheck run.
Reuse the existing version parser in updater mocks and remove forwarding-only mock wrappers. Preserve all CLI schema, config publication, plugin recovery, dispatch, and process lifecycle cases.
Consolidate adoption into provenance, rollback into interrupted recovery, native replacement into receipt refresh, reader ownership into lazy iteration, dynamic authorizer into invalidation, and fractional costs into selected-cache proof. Retain each lifecycle interleaving and explicit fractional range/no-replay assertion. Presence publication remains covered by device-pairing-publication.test.ts; ordinary pointer rollback remains covered by update-immutable-activation.test.ts. Remove same-branch native-route and finalizer rows, preserving distinct policy and lifecycle assertions. CI-only: plain oxlint, oxfmt, and diff checks pass; no test runs.
Share lifecycle event, terminal and cron fixtures; consolidate the node policy pre/post-dispatch cases and hook payload setup. Preserve all 171 expanded cases and security/lifecycle assertions. CI-only validation: plain oxlint, oxfmt and git diff --check passed. Tests and coverage deferred to hosted CI. Shard LOC: 5645 -> 5503 (-142, 2.5%); no production or shared-support changes.
Remove duplicate lifecycle layers covered by session-lifecycle-state.worker.test.ts (queued resumed goal), session-lifecycle-run-failure.test.ts (bounded errors and before/after commit authority), and session-lifecycle-state.persistence.test.ts (failure timing and next-run clears). Share scripted retirement transport while preserving all stop/follow-up and sibling/delete cases. Reuse dispatchAuthorizationRequest and consolidate identical synthetic Git failure responses. CI-only: plain oxlint, formatting and diff-check passed; no tests run. Cumulative shard LOC 5645 -> 5341 (-5.4%), below the requested 25%.
Keep mixed-grant scope proof at method-scopes.own-session.test.ts stronger-scope case. Drop same-branch pending-chat and reentrant successor variants, retain queued identity mutations. Keep pre-reset regression through stale-goal persistence and one representative inactive-goal branch. Keep query-token rejection at server.plugin-http-auth.test.ts and mapped global wake targeting at server/hooks.agent-trust.test.ts. Reuse existing approval database and execution-hold fixtures; remove selection argument checks duplicated by model-identifying results. CI-only: plain oxlint, formatting and diff-check passed, no tests run. Additional 168 lines removed; cumulative 5645 -> 5173 (-8.4%), still below the requested 25%. No files deleted or production changes.
Consolidate local provider, job, and session-render fixtures while retaining every test case and security/lifecycle assertion. Remove internal call-shape duplication already proved by the mixed account inventory, account removal outcomes, and installation-addressability cases. CI-only shard: oxfmt, plain oxlint, and diff check pass; no tests or coverage run. Reduce 4212 test lines to 4132 (1.9%). The 25% target is not safely attainable here: remaining picker, provider-auth, admission, and session cases cover distinct branches and authority/durability contracts.
Keep provider-menu threshold, filtering, alias and cancellation proof in model-picker.provider-menu.test.ts: preserves counts and choices for $count models and propagates provider-menu cancellation before choosing a model. Remove their five duplicated cases from model-picker.test.ts. Use one renamed, paginated managed-backup lookup scenario; consolidate tail filtering into the progress-rendering case. Replace the test-owned auth storage simulation with persistence-boundary payload assertions and use one unrelated session to guard projection privacy. CI-only: oxfmt, plain oxlint and git diff --check pass. No tests/builds/coverage run. Original shard 4212 lines, now 4005 (-4.9%); remaining distinct auth, admission, targeting, lifecycle and persistence boundaries prevent an honest 25% cut.
Remove the redundant benign deprecated-catalog replay; auth-choice.apply.api-providers.test.ts retains the install-catalog path in resolves workspace-only deprecated auth choices from the %s. Keep ANSI/newline escaping here. Consolidate removal rejection cases without losing their distinct assertions. Share account inventory fixtures and cleanup, drop unused CLI/provider fixture data, and reuse admission file/hash helpers with scoped database disposal. All remaining auth, policy, migration and lifecycle behavior stays covered. CI-only static gates pass; no tests or builds run. Original shard 4212 lines to 3902 (-7.4%); the 25% target remains unmet.
Port s0044 commits 33332aa946b370bd22c4c3dd2de05e10418d99d5 and 353307531f57beb99cf64e2cf267c7da14cff886 onto the campaign lane. Preserve the lane's sandboxStreamJob and settledOperation exports and its createDeferred-based ownership read behavior in the consolidated fixture. CI-only validation: oxlint on all nine touched files, oxfmt --check, git diff --check, and independent review passed. Runtime tests and coverage were not run; affected-test execution is deferred to landing PR CI.
Keep provider message identity and thread routing in the existing crabline-transport-message-id, provider-identity and thread-routing sibling suites. Keep gallery read sharing, containment and retry attribution in evidence-gallery.presentation.test.ts. Remove copied runtime dependency identity assertions and duplicate mocked web registration proof; suite-runtime-flow.web.test.ts retains real opener, abort, retry and cleanup ownership checks. Preserve distinct timeout, authority, redaction, lifecycle and artifact contracts. CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Shard LOC 5879 to 5358 (8.9 percent), below the 25 percent target to retain unique behavior.
Remove seventeen unexecuted Telegram observation variants: the only helper caller filters to message and wrong-edit-marker. Preserve both executed flows and their redaction, receipt and correlation assertions. Share bus cleanup, gateway configuration access and summary outcome fixtures. Remove Docker receipt success replay covered by suite-launch.runtime.test.ts: carries the actual prepared Docker receipt through aggregate native delegation. CI-only static gates: plain oxlint, oxfmt and diff-check passed. No tests or coverage run. Shard total 5879 to 5121 lines; remaining distinct boundary proof prevents an honest 25 percent cut.
Use one timed harness for four distinct preparation/action deadline cases without dropping their lifecycle assertions. Consolidate gallery array projections while retaining cardinality, exact redaction, runner and proof-gap fields. Remove the Matrix ID regex already asserted by crabline-transport-message-id.test.ts and the finite oversized-search replay already covered by the same-route overflow clamp case. CI-only: oxfmt, plain oxlint and diff-check pass; no tests or coverage run. Shard total 5879 to 5048 lines, below the requested 25 percent reduction because remaining distinct behavior is retained.
Remove duplicated Code Mode cancellation and grant tests retained in code-mode-headless.cancellation.test.ts and code-mode-headless.budget.test.ts. Remove repeated MCP client protocol, timeout, write-failure and framing cases retained in mcp-stdio-client.test.ts; callback write rejection remains in the transport probe table. Reuse auth and package fixtures without removing distinct security behavior. Keep unique repeated-stop cleanup assertions. CI-only campaign: plain oxlint, oxfmt and diff checks passed; tests and coverage deferred to hosted CI. Shard LOC 5691 -> 5210 (8.5%); retain distinct authority and lifecycle proof rather than force the 25% target.
Remove the local-web replay from tool-surface-plan; tool-surface-local-web.test.ts retains its schema, policy, provenance and prepared-presentation assertions. Keep catalog behavior at hosted compaction, tool-search.test.ts and the harness bridge. Group-scope-tree.test.ts and assembled filtering retain the raw policy tests removed here. MCP client unit and real cleanup suites retain error cause, repeated-stop failure and absent cleanup receipt. The real bundle runtime fixture retains user-owned PLUGIN_DATA path protection. Consolidate recovery-authority setup, same-branch auth rows and shared fixture plumbing; keep distinct approval targets, secret redaction and lifecycle checks. CI-only: plain oxlint, oxfmt and diff checks passed. No tests or coverage run. Additional bounded reduction; cumulative shard LOC remains below the requested 25 percent cut because unique auth, exec and publication paths are retained.
Remove copied projector snapshot and async-delivery suites; their matching cases remain in event-projector-snapshot.test.ts and event-projector.async-delivery.test.ts. Remove uncalled fork registration and unused fixture helpers. Share activation and workspace setup without dropping distinct policy assertions.
Remove duplicate metadata-cache and reply-context suites from socket-lifecycle; their dedicated monitor-inbox.metadata-cache.test.ts and monitor-inbox.reply-context.test.ts siblings retain the same assertions, including invalidation races. Keep both siblings on the extension database-workers route. Consolidate repeated action, approval, send and inbox fixtures without dropping distinct authorization, privacy, replay or lifecycle contracts. Keep QR rotation in the concurrent-waiter case and the linked shortcut in the successful-relink case; keep indentation proof at payload delivery. CI-only shard: plain oxlint, oxfmt and diff check pass. No tests, coverage or typecheck run. Test LOC 5923 -> 4952 (-16.4%); below the 25% target. Static declarations 151 -> 121; expanded cases 201 -> 182. Remaining distinct contracts retained for coordinator review.
Remove duplicated completion and recovery cases covered by message-tool-terminal.loop.test.ts, message-tool-terminal.tool-authored.test.ts, and assistant-failure.failover.test.ts. Retain explicit negative reply-publication assertions and all distinct authority, privacy, recovery, and accounting cases. Consolidate local prompt, session-history, terminal, and diagnostic fixtures. CI-only validation: plain oxlint, oxfmt, and git diff --check; no tests or coverage executed. Shard test LOC: 6144 -> 5262 (-14.4%); further reduction would discard distinct protected behavior.
Remove redundant prompt projections covered by system-prompt and sanitize-for-prompt tests; retain prepared prompt model identity. Stream routing remains covered by stream-resolution tests, argument repair by attempt.tool-call-argument-repair tests, and filesystem policy by tool-fs-policy tests. Terminal restart and cron projections retain owner coverage in terminal-preparation.yield and terminal-tool-failure tests. Consolidate same-path input tables and exact trace fixtures; trim unobserved runtime fixture fields and returned-mock inventories. Preserve authority, privacy, accounting, replay, and lifecycle assertions. Plain oxlint, formatting, and diff checks pass; no tests or coverage run under CI-only instructions. Cumulative shard LOC 6144 -> 4886 (20.5%), below the requested 25% preservation-constrained target.
Restore backend-specific submitted-input and multirow conformance. Drop unsafe reductions in updater schema and mock scaffolding, execution-review fixtures, session-actor decoding, and approval-reaction tuples. Keep detached and staged exact-removal setup; repair stale helper references, literal typing, mock indexing, and default type arguments. CI-only local validation: oxfmt, plain oxlint, diff check. Independent repair review found no actionable P0-P2 issue.
Drop the two cleanup hunk sets exposed by hosted CI rather than weakening selected-profile or native-authorization assertions. Both files match pinned main ad2172d. Plain oxlint, oxfmt, diff check, and independent restoration review passed; runtime validation stays in PR CI.
Drop the cleanup hunk set after PostgreSQL CI exposed an original-artifact versus captured-snapshot path mismatch. Restore this file exactly to pinned main instead of adding new fixture machinery or weakening assertions. CI-only static gates and independent restoration review passed.
53da38a to
63f1cee
Compare
) * test(agents): deslop s0042 tests Consolidate credential JSON and temp-home fixtures, attachment envelopes, catalog replies, MCP view cleanup, and HTTP rejection assertions. Preserve all existing cases and distinct authority, protocol, delivery, and lifecycle assertions. CI-only validation: formatting, plain oxlint, and diff checks; runtime proof deferred to hosted CI. * test(agents): remove duplicated s0042 test layers Remove copied cancellation attribution, admitted output-schema, and HTTP suites from native-mcp-runtime.test.ts. Their exact cases remain in native-mcp-runtime.cancellation.test.ts, native-mcp-runtime.output.test.ts, and native-mcp-runtime.http.test.ts under the same agents-core routing. Consolidate credential clock/cache fixtures and remove redundant provider call-shape checks. Catalog publication event flags remain covered by prepared-model-runtime.publication-events.test.ts; ordinary framing overflow remains covered by cli-output-partial-messages.test.ts and the local blank-frame limit case. CI-only: formatting, plain oxlint, and diff checks; no tests run. * test(agents): consolidate s0042 owner-boundary proof Remove the catalog status replay covered by session-row-projection.backfill.test.ts, session-row-projection-catalog.test.ts, and prepared-model-runtime.publication-events.test.ts. Keep the real auth-rotation publication integration and native activation cases. Drop the held-XML resolver replay covered by embedded-agent-subscribe.handlers.messages.tool-markup.test.ts and the runtime allowlist replay covered by extra-params.provider-runtime.test.ts. Preserve source replacement and persistent policy assertions. Consolidate active-login fixtures and rely on fixture-owned MCP disposal for final cleanup. No test runs; formatting, plain oxlint, and diff checks pass. * test(database-engine): deslop s0041 tests Remove duplicate round-trip and recovery-matrix cases covered by port-command.recovery.integration.test.ts and family-scoped cases covered by port-command.mixed.integration.test.ts. Both keepers run in the infra project with the same port-command worker setup. Consolidate port recovery setup, archive seed writes, and transcript projection observations without removing distinct custody, WAL, revocation, or durability assertions. Drop inherited-auth phase logging only. CI-only validation: plain oxlint, oxfmt, and git diff --check passed. Shard LOC 5739 -> 5330 (7.1%); declarations 60 -> 55. The 25% line target is not met: remaining tests exercise distinct engine, restore, auth, migration, and lifecycle behavior. No tests or coverage run locally. * test(database-engine): consolidate s0041 retained coverage Remove mocked multi-root publication recovery in favor of the real Matrix roots recovery test, carrying over original-capture, target identity, shared-root and manifest-cleanup assertions. First-use migration remains owned by port-command.test.ts and credential continuity by port-command.credentials.integration.test.ts. Remove internal auth, codec and actor receipt checks duplicated by real provider requests and persisted/reopened data. Share owner, mutation, index-state and repair fixtures. Retain PostgreSQL baseline-capture routing and unconditional SQLite repair coverage. CI-only validation: oxfmt, plain oxlint and diff checks pass; no tests or coverage run. Additional cut 5330 -> 5042 lines; cumulative 5739 -> 5042 (12.1%). The 25% target remains unmet; retained cases protect distinct backend, durability, security and ordering paths. * test(database-engine): cut redundant s0041 proof layers Reduce shard test LOC from 5739 to 4301 cumulatively, preserving PostgreSQL SQL regressions, credential rebinding, restore publication ordering, and source-preservation boundaries. Keepers: Matrix account-root backup rows remain in matrix-roots.postgres.test.ts; Logbook and Team Reports exact backup round-trips remain in logbook-port.postgres.test.ts. Gateway startup is owned by gateway-session-startup.conformance.test.ts and gateway-agent-inspection.conformance.test.ts. Opaque archive preservation and missing capsules are owned by backup-restore.test.ts and backup-verify-completeness.test.ts. Updater family admission remains in update-database-engine-admission.test.ts. Final restored JSON/blob/socket assertions replace intermediate snapshot dumps. Local credential variants remain in update-database-restore.test.ts. Matrix diagnostics remain in doctor-database-diagnostics.postgres.test.ts, and unconditional SQLite key repair remains in doctor-session-incognito-key-repair.test.ts. Cron restart, preference mutation, submitted-input lookup and metadata initialization remain in service.read-ops-nonblocking.test.ts, user-preferences.test.ts, session-accessor.pending-inputs.test.ts and session-actor-initialization.test.ts. Share transcript navigation fixtures and remove redundant projection layouts without changing query-budget assertions. CI-only: oxfmt, plain oxlint and git diff --check passed. No tests, coverage or typecheck run. * test(cli): deslop s0043 tests Reuse the existing version parser in updater mocks and remove forwarding-only mock wrappers. Preserve all CLI schema, config publication, plugin recovery, dispatch, and process lifecycle cases. * test(cli): remove duplicate s0043 test layers Keep exit and signal contracts in run-main.exit.test.ts, validation error matrices in plugins-authoring-validation.test.ts, real root and lazy-group help in help-exit.process.test.ts, and exhaustive multi-store discovery in update-cli/schema-preflight.test.ts. Retain CLI admission, recovery, redaction, and ownership assertions while consolidating repeated fixtures. Align retained dispatch tests with the current mock exports. * test(cli): consolidate s0043 owner-boundary proof Retain schema discovery in update-cli/schema-preflight.test.ts, metadata admission in update-command-metadata-diagnostics.test.ts, manager refusal in update-command-fresh-terminal.test.ts, and nonfatal plugin health in update-command-service.test.ts plus update-cli.plugin-convergence.test.ts. Keep package-entry installation in plugins/install-package-entries.test.ts and exact Git snapshot/reuse behavior in worktrees/service.exact-state.test.ts and worktrees/service.test.ts. Share registered config command fixtures and conflict setup while retaining each publication, authority, privacy, and lifecycle boundary. * test(infra): deslop s0045 tests Consolidate pairing worker fixture reads, operator inputs, node generation lookup, and corrupt-sibling cleanup. Preserve all test cases and authority, persistence, and lifecycle assertions. * test(infra): remove duplicated s0045 test layers Keep synchronous-writer grant coverage in sqlite-worker-shared-state-admission.test.ts and plugin fallback policy coverage in exec-approval-forwarder.plugin.test.ts. Consolidate approval RPC and snapshot startup-floor proof, trim unused pairing fixture metadata, and remove implementation-derived assertions while retaining authority, recovery, accounting, and lifecycle checks. * test(infra): retain populated pairing browser-origin fixture * test(infra): consolidate s0045 behavioral scenarios Consolidate adoption into provenance, rollback into interrupted recovery, native replacement into receipt refresh, reader ownership into lazy iteration, dynamic authorizer into invalidation, and fractional costs into selected-cache proof. Retain each lifecycle interleaving and explicit fractional range/no-replay assertion. Presence publication remains covered by device-pairing-publication.test.ts; ordinary pointer rollback remains covered by update-immutable-activation.test.ts. Remove same-branch native-route and finalizer rows, preserving distinct policy and lifecycle assertions. CI-only: plain oxlint, oxfmt, and diff checks pass; no test runs. * test(gateway): deslop s0046 tests Share lifecycle event, terminal and cron fixtures; consolidate the node policy pre/post-dispatch cases and hook payload setup. Preserve all 171 expanded cases and security/lifecycle assertions. CI-only validation: plain oxlint, oxfmt and git diff --check passed. Tests and coverage deferred to hosted CI. Shard LOC: 5645 -> 5503 (-142, 2.5%); no production or shared-support changes. * test(gateway): consolidate s0046 lifecycle proof and fixtures Remove duplicate lifecycle layers covered by session-lifecycle-state.worker.test.ts (queued resumed goal), session-lifecycle-run-failure.test.ts (bounded errors and before/after commit authority), and session-lifecycle-state.persistence.test.ts (failure timing and next-run clears). Share scripted retirement transport while preserving all stop/follow-up and sibling/delete cases. Reuse dispatchAuthorizationRequest and consolidate identical synthetic Git failure responses. CI-only: plain oxlint, formatting and diff-check passed; no tests run. Cumulative shard LOC 5645 -> 5341 (-5.4%), below the requested 25%. * test(gateway): remove s0046 duplicate proof layers Keep mixed-grant scope proof at method-scopes.own-session.test.ts stronger-scope case. Drop same-branch pending-chat and reentrant successor variants, retain queued identity mutations. Keep pre-reset regression through stale-goal persistence and one representative inactive-goal branch. Keep query-token rejection at server.plugin-http-auth.test.ts and mapped global wake targeting at server/hooks.agent-trust.test.ts. Reuse existing approval database and execution-hold fixtures; remove selection argument checks duplicated by model-identifying results. CI-only: plain oxlint, formatting and diff-check passed, no tests run. Additional 168 lines removed; cumulative 5645 -> 5173 (-8.4%), still below the requested 25%. No files deleted or production changes. * test(commands): deslop s0047 tests Consolidate local provider, job, and session-render fixtures while retaining every test case and security/lifecycle assertion. Remove internal call-shape duplication already proved by the mixed account inventory, account removal outcomes, and installation-addressability cases. CI-only shard: oxfmt, plain oxlint, and diff check pass; no tests or coverage run. Reduce 4212 test lines to 4132 (1.9%). The 25% target is not safely attainable here: remaining picker, provider-auth, admission, and session cases cover distinct branches and authority/durability contracts. * test(commands): remove duplicate s0047 test layers Keep provider-menu threshold, filtering, alias and cancellation proof in model-picker.provider-menu.test.ts: preserves counts and choices for $count models and propagates provider-menu cancellation before choosing a model. Remove their five duplicated cases from model-picker.test.ts. Use one renamed, paginated managed-backup lookup scenario; consolidate tail filtering into the progress-rendering case. Replace the test-owned auth storage simulation with persistence-boundary payload assertions and use one unrelated session to guard projection privacy. CI-only: oxfmt, plain oxlint and git diff --check pass. No tests/builds/coverage run. Original shard 4212 lines, now 4005 (-4.9%); remaining distinct auth, admission, targeting, lifecycle and persistence boundaries prevent an honest 25% cut. * test(commands): compact s0047 fixture layers Remove the redundant benign deprecated-catalog replay; auth-choice.apply.api-providers.test.ts retains the install-catalog path in resolves workspace-only deprecated auth choices from the %s. Keep ANSI/newline escaping here. Consolidate removal rejection cases without losing their distinct assertions. Share account inventory fixtures and cleanup, drop unused CLI/provider fixture data, and reuse admission file/hash helpers with scoped database disposal. All remaining auth, policy, migration and lifecycle behavior stays covered. CI-only static gates pass; no tests or builds run. Original shard 4212 lines to 3902 (-7.4%); the 25% target remains unmet. * test(gateway): consolidate s0044 boundary fixtures Port s0044 commits 33332aa946b370bd22c4c3dd2de05e10418d99d5 and 353307531f57beb99cf64e2cf267c7da14cff886 onto the campaign lane. Preserve the lane's sandboxStreamJob and settledOperation exports and its createDeferred-based ownership read behavior in the consolidated fixture. CI-only validation: oxlint on all nine touched files, oxfmt --check, git diff --check, and independent review passed. Runtime tests and coverage were not run; affected-test execution is deferred to landing PR CI. * test(qa-lab): deslop s0048 tests Keep provider message identity and thread routing in the existing crabline-transport-message-id, provider-identity and thread-routing sibling suites. Keep gallery read sharing, containment and retry attribution in evidence-gallery.presentation.test.ts. Remove copied runtime dependency identity assertions and duplicate mocked web registration proof; suite-runtime-flow.web.test.ts retains real opener, abort, retry and cleanup ownership checks. Preserve distinct timeout, authority, redaction, lifecycle and artifact contracts. CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Shard LOC 5879 to 5358 (8.9 percent), below the 25 percent target to retain unique behavior. * test(qa-lab): trim unreachable s0048 fixtures Remove seventeen unexecuted Telegram observation variants: the only helper caller filters to message and wrong-edit-marker. Preserve both executed flows and their redaction, receipt and correlation assertions. Share bus cleanup, gateway configuration access and summary outcome fixtures. Remove Docker receipt success replay covered by suite-launch.runtime.test.ts: carries the actual prepared Docker receipt through aggregate native delegation. CI-only static gates: plain oxlint, oxfmt and diff-check passed. No tests or coverage run. Shard total 5879 to 5121 lines; remaining distinct boundary proof prevents an honest 25 percent cut. * test(qa-lab): consolidate s0048 deadline and projection proof Use one timed harness for four distinct preparation/action deadline cases without dropping their lifecycle assertions. Consolidate gallery array projections while retaining cardinality, exact redaction, runner and proof-gap fields. Remove the Matrix ID regex already asserted by crabline-transport-message-id.test.ts and the finite oversized-search replay already covered by the same-route overflow clamp case. CI-only: oxfmt, plain oxlint and diff-check pass; no tests or coverage run. Shard total 5879 to 5048 lines, below the requested 25 percent reduction because remaining distinct behavior is retained. * test(agents): deslop s0049 tests Remove duplicated Code Mode cancellation and grant tests retained in code-mode-headless.cancellation.test.ts and code-mode-headless.budget.test.ts. Remove repeated MCP client protocol, timeout, write-failure and framing cases retained in mcp-stdio-client.test.ts; callback write rejection remains in the transport probe table. Reuse auth and package fixtures without removing distinct security behavior. Keep unique repeated-stop cleanup assertions. CI-only campaign: plain oxlint, oxfmt and diff checks passed; tests and coverage deferred to hosted CI. Shard LOC 5691 -> 5210 (8.5%); retain distinct authority and lifecycle proof rather than force the 25% target. * test(agents): remove redundant s0049 proof layers Remove the local-web replay from tool-surface-plan; tool-surface-local-web.test.ts retains its schema, policy, provenance and prepared-presentation assertions. Keep catalog behavior at hosted compaction, tool-search.test.ts and the harness bridge. Group-scope-tree.test.ts and assembled filtering retain the raw policy tests removed here. MCP client unit and real cleanup suites retain error cause, repeated-stop failure and absent cleanup receipt. The real bundle runtime fixture retains user-owned PLUGIN_DATA path protection. Consolidate recovery-authority setup, same-branch auth rows and shared fixture plumbing; keep distinct approval targets, secret redaction and lifecycle checks. CI-only: plain oxlint, oxfmt and diff checks passed. No tests or coverage run. Additional bounded reduction; cumulative shard LOC remains below the requested 25 percent cut because unique auth, exec and publication paths are retained. * test(codex): deslop s0051 tests Remove copied projector snapshot and async-delivery suites; their matching cases remain in event-projector-snapshot.test.ts and event-projector.async-delivery.test.ts. Remove uncalled fork registration and unused fixture helpers. Share activation and workspace setup without dropping distinct policy assertions. * test(whatsapp): deslop s0052 tests Remove duplicate metadata-cache and reply-context suites from socket-lifecycle; their dedicated monitor-inbox.metadata-cache.test.ts and monitor-inbox.reply-context.test.ts siblings retain the same assertions, including invalidation races. Keep both siblings on the extension database-workers route. Consolidate repeated action, approval, send and inbox fixtures without dropping distinct authorization, privacy, replay or lifecycle contracts. Keep QR rotation in the concurrent-waiter case and the linked shortcut in the successful-relink case; keep indentation proof at payload delivery. CI-only shard: plain oxlint, oxfmt and diff check pass. No tests, coverage or typecheck run. Test LOC 5923 -> 4952 (-16.4%); below the 25% target. Static declarations 151 -> 121; expanded cases 201 -> 182. Remaining distinct contracts retained for coordinator review. * test(agents): deslop s0050 tests Remove duplicated completion and recovery cases covered by message-tool-terminal.loop.test.ts, message-tool-terminal.tool-authored.test.ts, and assistant-failure.failover.test.ts. Retain explicit negative reply-publication assertions and all distinct authority, privacy, recovery, and accounting cases. Consolidate local prompt, session-history, terminal, and diagnostic fixtures. CI-only validation: plain oxlint, oxfmt, and git diff --check; no tests or coverage executed. Shard test LOC: 6144 -> 5262 (-14.4%); further reduction would discard distinct protected behavior. * test(agents): consolidate s0050 owner-boundary proof Remove redundant prompt projections covered by system-prompt and sanitize-for-prompt tests; retain prepared prompt model identity. Stream routing remains covered by stream-resolution tests, argument repair by attempt.tool-call-argument-repair tests, and filesystem policy by tool-fs-policy tests. Terminal restart and cron projections retain owner coverage in terminal-preparation.yield and terminal-tool-failure tests. Consolidate same-path input tables and exact trace fixtures; trim unobserved runtime fixture fields and returned-mock inventories. Preserve authority, privacy, accounting, replay, and lifecycle assertions. Plain oxlint, formatting, and diff checks pass; no tests or coverage run under CI-only instructions. Cumulative shard LOC 6144 -> 4886 (20.5%), below the requested 25% preservation-constrained target. * test: preserve d504 conformance and repair replay fixtures Restore backend-specific submitted-input and multirow conformance. Drop unsafe reductions in updater schema and mock scaffolding, execution-review fixtures, session-actor decoding, and approval-reaction tuples. Keep detached and staged exact-removal setup; repair stale helper references, literal typing, mock indexing, and default type arguments. CI-only local validation: oxfmt, plain oxlint, diff check. Independent repair review found no actionable P0-P2 issue. * test: retain auth-selection and authorizer proof in d504 Drop the two cleanup hunk sets exposed by hosted CI rather than weakening selected-profile or native-authorization assertions. Both files match pinned main 3aa5b9a. Plain oxlint, oxfmt, diff check, and independent restoration review passed; runtime validation stays in PR CI. * test(database-engine): retain Matrix backup conformance in d504 Drop the cleanup hunk set after PostgreSQL CI exposed an original-artifact versus captured-snapshot path mismatch. Restore this file exactly to pinned main instead of adding new fixture machinery or weakening assertions. CI-only static gates and independent restoration review passed.
What Problem This Solves
Test fixtures and duplicated proof layers add maintenance cost without distinct behavioral coverage. This lands the safe current-main subset of campaign batch d504.
User Impact
No user-visible behavior or production code changes. Retained tests continue to own authority, privacy, persistence, protocol, recovery, and lifecycle contracts; this change consolidates setup and removes duplicate assertions/cases. No runtime speedup or newly measured coverage claim is made.
Evidence
fdad53b1bc1d66d98a11da12fb633a75f8285ecb; 29 source commits replayed fully or partially in the supplied order.pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <55 changed files>: passed.node_modules/.bin/oxlint -c .oxlintrc.json <55 changed files>: exited 0.git diff --check fdad53b1bc1d66d98a11da12fb633a75f8285ecb: passed.openclaw/ci-gateis the execution proof. Independent autoreview runs alongside CI.Actual replay size
Production: +0/-0 LOC. Tests and test support: +3417/-6837 LOC (net -3420), 55 files. Static declaration counts below count
it/testregistration syntax, not executed/expanded cases. Counts cover the files retained in this PR, not the original whole-shard inventory.Retained files by shard
s0041
src/infra/database-engine/inherited-auth.conformance.test.tssrc/infra/database-engine/reserved-incognito.conformance.test.tssrc/infra/database-engine/transcript-projection-flush.conformance.test.tss0042
src/agents/clawrouter-service-tier.integration.test.tssrc/agents/cli-credentials.test.tssrc/agents/embedded-agent-subscribe.directive-delivery.test.tssrc/agents/native-mcp-runtime.test.tssrc/agents/openclaw-tools.browser-plugin.integration.test.tssrc/agents/prepared-model-runtime.catalog-publication.test.tssrc/agents/requester-tool-policy.test.tss0043
src/cli/config-cli.integration.test.tssrc/cli/local-state-owner.process.test.tss0044
src/gateway/server-methods/chat-history-handler.test.tssrc/gateway/server-methods/chat.abort-authorization.test.tssrc/gateway/server-methods/requester-model-catalog.test.tssrc/gateway/server-methods/usage.sessions-usage-owner-attribution.integration.test.tss0045
src/infra/device-pairing-worker.test.tssrc/infra/package-update-activation-immutable.test.tssrc/infra/session-cost-usage-worker-io.test.tssrc/infra/update-candidate-rehearsal.resources.test.tss0046
src/gateway/github-publication.test-support.tssrc/gateway/node-invoke-plugin-policy.test.tssrc/gateway/server-methods.session-narrow-mutations.test.tssrc/gateway/server.agent-input-authority.test.tssrc/gateway/server.hooks.test.tssrc/gateway/server.subagent-stop-followup.product.test.tssrc/gateway/session-lifecycle-state.test.tss0047
src/commands/agents.commands.list.test.tssrc/commands/model-picker.test.tssrc/commands/sessions-tail.test.tssrc/commands/triage-target.test.tss0048
extensions/qa-lab/src/bus-server.test.tsextensions/qa-lab/src/scenario-flow-runner-cron-proof.test.tsextensions/qa-lab/src/scenario-flow-runner.test-support.tsextensions/qa-lab/src/suite-runtime-flow.test.tsextensions/qa-lab/src/suite.test.tsextensions/qa-lab/src/test-file-scenario-command-lifecycle.test.tsextensions/qa-lab/src/test-file-scenario-runner.docker.test.tss0049
src/agents/agent-tools-agent-config.test.tssrc/agents/cli-executable-identity.test.tssrc/agents/mcp-stdio-transport.test.tssrc/agents/prepared-model-runtime.remote-publication.test.tss0050
src/agents/embedded-agent-runner/run/attempt-client-tools.test.tssrc/agents/embedded-agent-runner/run/attempt-session-runtime-prepare.test.tssrc/agents/embedded-agent-runner/run/attempt-system-prompt.test.tssrc/agents/embedded-agent-runner/run/attempt.test.tssrc/agents/embedded-agent-runner/run/terminal-preparation.test.tss0051
extensions/codex/src/app-server/attempt-context.test.tsextensions/codex/src/app-server/plugin-activation.test.tss0052
extensions/whatsapp/src/channel-outbound.test.tsextensions/whatsapp/src/channel-react-action.test.tsextensions/whatsapp/src/login-qr.test.tsextensions/whatsapp/src/monitor-inbox.access-and-echo.test.tsextensions/whatsapp/src/monitor-inbox.delivery-and-dedupe.test.tsextensions/whatsapp/src/outbound-base.test.tsCampaign coverage evidence
The supplied
results/s0040.mdthroughresults/s0052.mdreports explicitly say tests and coverage were not run under CI-only mode. They contain no measured coverage totals line to reproduce. The earlier generic ≤1% coverage description therefore is not claimed as measured evidence for this batch. Historical shard LOC/declaration inventories are superseded for this replay by the actual-diff table above.Replay decisions
cc88e60f0f67(s0040) was skipped entirely: all five files conflicted with newer main assertions or removed inline/helper scaffolding. For the remaining conflict-affected commits, the entire conflicting file hunk set was dropped and the pre-pick version retained, preserving newer main behavior and any earlier accepted batch changes. Clean independent files were retained. No production seam was removed.Dropped file hunk sets by source commit:
231d1a104d15: cli-output-framing, native-mcp-runtime.3902dd4ff6b8: cli-output-framing.5fa89f2e3164: database-engine/archive-restore.postgres, port-command.integration.ceee8187700d: database-engine/port-command.integration, update-preflight.conformance.14a53b6c1f11: database-engine/archive-restore.postgres, port-command.integration, session-actor.conformance, update-preflight.conformance.456b603aa0ec: cli/plugins-authoring-command, plugins-install-config, run-main.command-dispatch, update-cli.6cf07312ad9b: cli/config-cli.integration, plugins-authoring-command, plugins-install-config, update-cli.090263b41441: infra/exec-approval-channel-runtime, exec-approval-forwarder, kysely-sync, sqlite-worker-shared-state.bedc145ab010: infra/exec-approval-forwarder, sqlite-worker-shared-state.f848fdbe279f: gateway/server-plugin-subagent-runtime, server.hooks.614f94cd084b: commands/auth-choice, backup-schedule, channels.remove.8a76fa55fac9: commands/auth-choice, backup-schedule.fa18ec840eeb: commands/auth-choice, backup-schedule, channels.remove, doctor-config-preflight.admission.process, triage-target.3c7a05e701c5: gateway/server-methods/cron-stream-approval.integration, nodes, requester-cron-authority.integration, sessions-read-cache; also dropped the associated cron-stream support expansion because its callers were dropped.886f84c9e572: qa-lab/crabline-transport, evidence-gallery, scorecard-gap-report.b97e2994d913,1ee47284f814: qa-lab/crabline-transport, evidence-gallery.5826ce1e869e: agents/cli-auth-epoch, mcp-stdio-transport.278b2025bd2e: agents/agent-tools-agent-config.exec, bash-tools.exec-notify, cli-auth-epoch, cli-executable-identity, tool-surface-plan.2488c5715643: codex/compact, native-subagent-monitor, side-question support.7a1ec9311437: whatsapp/inbound.media, monitor-inbox.socket-lifecycle.2641114abf8c: embedded-agent-runner/assistant-failure, attempt.model-diagnostic-lifecycle, message-tool-terminal.584c0383445e: those same three files plus setup.Some source deletions already matched main and yielded no diff (for example Code Mode and Codex projector duplicates); the remaining independent changes in those commits were retained. All other commits applied cleanly. Commit messages are preserved; this replay-decision section identifies any claims in source commit messages whose hunks were not retained.
Review and first-head CI follow-up
Independent review accepted two findings: retained-pending submitted-input recovery and real multirow conversation conformance have distinct SQLite/PostgreSQL value. Restored
post-ready.conformance.test.tscompletely to main. The restoration and the subsequent CI repairs passed fresh independent P0–P2 review.Eight findings were rejected after source verification:
afterEachdisposes every runtime; the runtime owner aborts lifecycle work and closes current sessions and native children.src/cli/update-cli/schema-preflight.test.tsretains the configured, retired, and custom-path discovery matrix. The higher-level target-schema cleanup was nevertheless dropped after CI exposed a separate fixture mismatch.embedded-agent-runner/stream-resolution.test.tsretains Cloudflare boundary selection and refreshed runtime-auth call assertions.agent-bundle-mcp-runtime.agent-bundle.test.tsretains real user-ownedPLUGIN_DATAcollision proof.messageandwrong-edit-marker; the other variants were never registered.doctor-session-incognito-key-repair.test.tsretains every key-bearing linkage, JSON projection, reopen, and idempotence assertions.expectUnchangedcallsexpectSelection, which still assertsread()equals the entire record.status,endedAt, andruntimeMsareundefined.First-head CI run: https://github.com/openclaw/openclaw/actions/runs/40148823486. Repaired/drop decisions, without local test execution:
backupRowswith the existing SQLite snapshot reader and restored the cron fixture's asserted first-job access.voidtype arguments.bash-tools.exec.security-floor.test.ts,session-actor.conformance.test.ts,approval-reactions.test.ts, andupdate-cli.target-schema.test.tsafter type/fixture failures.update-cli-mocks.test-support.tscleanup after mock-export ratchet failures; no baseline exception was added.kysely-sync.test.tsandmodel-auth-availability.session-pin.test.tscleanup after native-authorization and selected-profile mismatches, rather than weakening assertions.ad2172d77e260e3039febbc4f531bd476245f912included earlier catalog-client fixture work, but hosted CI still exposed an untouched helper type failure.The size and file table above reflect these final decisions, not the larger first head. Runtime proof is the new exact-head hosted CI; no old-head green result is claimed for the repaired head.
PostgreSQL follow-up and final base
Second-head CI: https://github.com/openclaw/openclaw/actions/runs/40149780674. All non-PostgreSQL jobs passed except the same untouched catalog-helper type failure. PostgreSQL shards 2/3 and 3/3 passed. Shard 1/3 exposed the Matrix fixture's original-artifact versus captured-snapshot path mismatch; dropped
matrix-roots.postgres.test.tscleanup completely and restored main's full test. A fresh independent P0–P2 restoration review was clean.Previous conflict-free rebase:
fed1c12d0d4eeaec93bbd78a54e6926f4be76889, including canonical main fix465fd7af01b6for the catalog-helper type failure. No inherited-failure bypass is being requested; the final head must satisfy fresh hosted CI. All 55 changed files passed oxfmt, plain oxlint (exit 0), and diff checking after this rebase. The actual size and shard tables above reflect the final 55-file subset.Main-conflict refresh
The PR became conflicting while the PostgreSQL checks were running. Rebased onto pinned main
fdad53b1bc1d66d98a11da12fb633a75f8285ecb. The single conflict was inserver.subagent-stop-followup.product.test.ts: preserved main's newsweepPastKillReconciliationhelper and its clock-driven terminal-kill confirmation behavior, while keeping the branch's earlier client type alias and removing only its duplicate old declaration. Main's shared HTTP reader and newer assertions remain intact. No behavioral decision or weakened assertion was introduced.The final subset remains +3417/-6837 test/support LOC across 55 files, with +0/-0 production LOC. All 55 files passed oxfmt, plain oxlint (exit 0), and diff checking again. New exact-head CI is required after this conflict refresh; earlier-head runs are not presented as current-head proof.