Skip to content

test: remove low-value tests (batch d517) - #183339

Merged
steipete merged 31 commits into
mainfrom
tcr/land-d517-1792909006
Oct 25, 2026
Merged

steipete merged 31 commits into
mainfrom
tcr/land-d517-1792909006

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces redundant test scaffolding and overlapping proof in batch d517 while retaining owning-boundary tests.

User Impact

No production runtime behavior change. The only non-test edit removes the deleted async registry test from the protected CI test inventory; its SQLite cases move into the still-protected state suite.

Evidence

Replayed 27 of 30 requested commits onto pinned main 127f3c2574cad42e555e2bf7f2a5c64b9fca8332. Three commits were skipped entirely: a70a41d93158 (s0181: newer Gateway lifecycle/authority coverage conflicted) and de26ce907101 (s0197: the only changed cron store file was retained), and 8587f722f1ce (s0190: main now uses generated probe files, so runtime-paths was retained). Conflicting files were kept at the current replay HEAD; clean files were retained. Details below record every dropped file-level hunk.

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • Changed-file oxfmt --write: passed.
  • Plain oxlint -c .oxlintrc.json on changed TS/JS files: exit 0. The prior unchanged avatar warning is outside the final diff, since all UI test edits were withdrawn.
  • git diff --check against the pinned base: passed.
  • CI-only operator rule: no local tests, typechecks, check-changed, builds, coverage, or Testbox. Runtime proof is PR CI and openclaw/ci-gate. No lease was created.
  • Supplied shard reports explicitly state coverage was not run. There are no measured coverage totals to quote; no <=1% coverage claim is made. Their earlier LOC totals describe earlier shard snapshots, not this replay.
  • No changed path matches a CODEOWNERS rule at this base.

Static replay deltas

Counts below compare the final replay to pinned main across actually changed files; declarations are lexical source counts, not expanded/runtime cases. Production runtime: +0/-0. Test/support: +2138/-4083 (net -1945). CI inventory: +0/-1. Total: +2138/-4084 (net -1946), 37 files.

Shard Files Test/support LOC before → after Declarations before → after Coverage
s0181 0 0 → 0 0 → 0 Not run; skipped
s0185 0 0 → 0 0 → 0 Entire shard restored after CI
s0190 0 0 → 0 0 → 0 Entire shard restored after rebase/lint
s0196 0 0 → 0 0 → 0 Entire UI shard restored after CI
s0185 0 0 → 0 0 → 0 Not run (CI-only)
s0186 3 1371 → 1245 26 → 25 Not run (CI-only)
s0187 2 1111 → 1008 16 → 15 Not run (CI-only)
s0188 6 2622 → 2087 57 → 42 Not run (CI-only)
s0189 4 2453 → 2321 64 → 64 Not run (CI-only)
s0190 0 0 → 0 0 → 0 Not run (CI-only)
s0191 2 1577 → 1418 28 → 26 Not run (CI-only)
s0192 4 3117 → 2940 61 → 57 Not run (CI-only)
s0193 7 3072 → 2566 45 → 41 Not run (CI-only)
s0194 1 430 → 403 20 → 20 Not run (CI-only)
s0195 2 1376 → 1348 21 → 21 Not run (CI-only)
s0196 0 0 → 0 0 → 0 Not run (CI-only)
s0197 4 2568 → 2428 33 → 31 Not run (CI-only)
s0198 1 774 → 762 17 → 17 Not run (CI-only)
Per-shard changed files

s0185

s0186

  • src/infra/approval-handler-runtime.test.ts
  • src/infra/restart-handoff.test.ts
  • src/infra/update-candidate-state.schema-lifetime.test.ts

s0187

  • src/infra/session-cost-usage-memory.test.ts
  • src/infra/update-candidate-state.inventory.test.ts

s0188

  • src/agents/embedded-agent-runner/history.test.ts
  • src/agents/embedded-agent-runner/model.provider-runtime.test-support.ts
  • src/agents/embedded-agent-runner/model.static-catalog.test.ts
  • src/agents/embedded-agent-runner/openrouter-model-capabilities.test.ts
  • src/agents/embedded-agent-runner/run.empty-error-retry.test-support.ts
  • src/agents/embedded-agent-runner/server-endpoint-compaction.test.ts

s0189

  • extensions/codex/src/app-server/managed-binary.test.ts
  • extensions/codex/src/app-server/sandbox-exec-server-node-relay.test.ts
  • extensions/codex/src/app-server/computer-use-startup.test.ts
  • extensions/codex/src/app-server/computer-use.test.ts

s0190

s0191

  • src/agents/openclaw-tools.requester-yield.test.ts
  • src/agents/prepared-model-runtime.native-picker-failures.test.ts

s0192

  • src/gateway/server-broadcast.serialization.test.ts
  • src/gateway/server-session-events.test.ts
  • src/gateway/event-web-push.test.ts
  • src/gateway/remote-control-ui-ingress.integration.test.ts

s0193

  • src/agents/subagents/registry/subagent-registry-state.test.ts
  • src/agents/subagents/registry/subagent-registry-sweeper-session-read.test-support.ts
  • src/agents/subagents/registry/subagent-registry.archive-cancellation.test-support.ts
  • src/agents/subagents/registry/subagent-yielded-run-settlement.restart-integration.test.ts
  • src/agents/subagents/registry/subagent-control.refresh.test.ts
  • src/agents/subagents/registry/subagent-control.stop-selection.test-support.ts
  • scripts/lib/ci-proof-test-inventory.mts
  • src/agents/subagents/registry/subagent-registry-state.async.test.ts

s0194

  • src/plugin-sdk/reply-payload.test.ts

s0195

  • src/gateway/talk/handlers/client-native-actions.test.ts
  • src/gateway/talk/handlers/file-transcription.test.ts

s0196

s0197

  • src/cron/isolated-agent.auth-continuity.integration.test.ts
  • src/cron/service.one-shot-schedule-ownership.test.ts
  • src/cron/session-reaper.test.ts
  • src/cron/run-history.test.ts

s0198

  • src/gateway/worker-environments/placement-move-abandon.test.ts
Exact numstat
2	9	extensions/codex/src/app-server/computer-use-startup.test.ts
31	50	extensions/codex/src/app-server/computer-use.test.ts
26	86	extensions/codex/src/app-server/managed-binary.test.ts
84	130	extensions/codex/src/app-server/sandbox-exec-server-node-relay.test.ts
0	1	scripts/lib/ci-proof-test-inventory.mts
175	465	src/agents/embedded-agent-runner/history.test.ts
119	211	src/agents/embedded-agent-runner/model.provider-runtime.test-support.ts
37	95	src/agents/embedded-agent-runner/model.static-catalog.test.ts
23	62	src/agents/embedded-agent-runner/openrouter-model-capabilities.test.ts
63	100	src/agents/embedded-agent-runner/run.empty-error-retry.test-support.ts
32	51	src/agents/embedded-agent-runner/server-endpoint-compaction.test.ts
84	142	src/agents/openclaw-tools.requester-yield.test.ts
8	109	src/agents/prepared-model-runtime.native-picker-failures.test.ts
7	18	src/agents/subagents/registry/subagent-control.refresh.test.ts
25	107	src/agents/subagents/registry/subagent-control.stop-selection.test-support.ts
0	357	src/agents/subagents/registry/subagent-registry-state.async.test.ts
556	467	src/agents/subagents/registry/subagent-registry-state.test.ts
11	46	src/agents/subagents/registry/subagent-registry-sweeper-session-read.test-support.ts
86	161	src/agents/subagents/registry/subagent-registry.archive-cancellation.test-support.ts
68	103	src/agents/subagents/registry/subagent-yielded-run-settlement.restart-integration.test.ts
146	176	src/cron/isolated-agent.auth-continuity.integration.test.ts
14	25	src/cron/run-history.test.ts
43	78	src/cron/service.one-shot-schedule-ownership.test.ts
49	113	src/cron/session-reaper.test.ts
18	45	src/gateway/event-web-push.test.ts
6	9	src/gateway/remote-control-ui-ingress.integration.test.ts
16	21	src/gateway/server-broadcast.serialization.test.ts
161	303	src/gateway/server-session-events.test.ts
12	20	src/gateway/talk/handlers/client-native-actions.test.ts
50	70	src/gateway/talk/handlers/file-transcription.test.ts
14	26	src/gateway/worker-environments/placement-move-abandon.test.ts
32	85	src/infra/approval-handler-runtime.test.ts
67	139	src/infra/restart-handoff.test.ts
28	73	src/infra/session-cost-usage-memory.test.ts
13	71	src/infra/update-candidate-state.inventory.test.ts
0	1	src/infra/update-candidate-state.schema-lifetime.test.ts
32	59	src/plugin-sdk/reply-payload.test.ts

Review resolution

Isolated source review raised 17 findings (one P1, sixteen P2). All were accepted conservatively by restoring each affected file to main rather than retaining disputed coverage cuts. This includes the deadline-heartbeat loop and async short-route fixture risks. No finding was dismissed. No new test or runtime code was added in response. The remaining diff is a strict reduction of the reviewed scope; rebase conflicts retained current main.

Restored review findings
  • P2: Restore host-OAuth coverage for custom OpenAI base URLs — extensions/codex/src/app-server/inference-routing.test.ts restored.
  • P2: Verify report-only fallback capabilities are actually enforced — src/agents/embedded-agent-runner/run.prompt-timeout-fallback.test-support.ts restored.
  • P2: Keep in-memory reconciliation checks after a lost cron mutation reply — src/cron/store.worker.test.ts restored.
  • P2: Preserve later cron edits during legacy-result recovery — src/cron/service.trigger-eval.test.ts restored.
  • P2: Retain patch serialization across session lifecycle mutations — src/gateway/server.sessions.delete-lifecycle.test.ts restored.
  • P2: Restore commentary-persistence opt-out coverage — extensions/codex/src/app-server/event-projector.commentary.test.ts restored.
  • P2: Test configured embedding dimensions without a request override — src/gateway/embeddings-http.test.ts restored.
  • P2: Exercise extra-service detection through the Doctor registry — src/daemon/inspect.startup.test.ts restored.
  • P1: Advance the backend allowance case to a recovery heartbeat — src/logging/diagnostic-controller-recovery.integration.test.ts restored.
  • P2: Restore the asynchronous wait for the short-route history request — ui/src/pages/chat/chat-history-observation.test.ts restored.
  • P2: Keep staged-only candidate changes in the preflight matrix — src/infra/update-runner-git-preflight.reference.test.ts restored.
  • P2: Retain recovery-mode dead-letter settlement retry coverage — src/infra/session-delivery-queue.recovery.test.ts restored.
  • P2: Preserve exact-budget prefix cancellation coverage — src/infra/http-body.response.test.ts restored.
  • P2: Keep asynchronous capture coverage for every history request variant — src/gateway/session-history-worker-runtime.test.ts restored.
  • P2: Retain the dedupe publication-invalidation concurrency case — src/plugin-sdk/persistent-dedupe.worker.test.ts restored.
  • P2: Restore Windows sidecar path-normalization coverage — src/plugin-sdk/channel-entry-contract.test.ts restored.
  • P2: Continue asserting safe boot-identity subprocess options — src/infra/update-managed-service-handoff-identity.test.ts restored.
Replay conflict ledger

Listed files were kept at pre-pick HEAD in full; clean files were retained. Later rebase conflicts kept current main.

  • a70a41d93158: Skipped entire s0181 commit: seven overlapping Gateway files have newer main coverage and lifecycle changes.
  • 3c7c3832cd21: Keep current main orchestration and registration fixture. Files: src/agents/embedded-agent-runner/sessions-yield.orchestration.test-support.ts.
  • a5e0b9ee0d17: Keep rewritten current orchestration and host-bound skill fixtures. Files: src/agents/embedded-agent-runner/sessions-yield.orchestration.test-support.ts, src/agents/embedded-agent-runner/skill-runtime.library-read.test.ts.
  • 8269ddb07877: Retain current main authority, filesystem, package swap, SQLite and native lifecycle fixtures rather than replay stale overlapping refactors. Files: src/infra/exec-approvals-store.read-worker.test.ts, src/infra/fs-safe.test.ts, src/infra/package-update-swap.test.ts, src/infra/sqlite-index-schema.test.ts, src/infra/worker-native-lifecycle.test-support.ts.
  • ad6b1cf49d32: Keep current main rewritten worker/approval/filesystem/SQLite proofs; retain three cleanly applied accounting/recovery/inventory files. Files: src/infra/bun-sqlite-library.worker.test.ts, src/infra/exec-approvals-store.read-worker.test.ts, src/infra/fs-safe.test.ts, src/infra/sqlite-index-schema.test.ts.
  • 49a70349e91d: Keep current main console and tail suites; their config/redaction and lifecycle fixtures differ materially. Files: src/logging/console-capture.test.ts, src/logging/log-tail.test.ts.
  • 30aec316e24f: Keep current main log-tail suite as in preceding logging conflict; preserve newer rotation/redaction proof. Files: src/logging/log-tail.test.ts.
  • a49939e01839: Keep current main console and GC contracts; overlapping fixture/deletion edits are omitted. Files: src/logging/console-capture.test.ts, src/logging/diagnostic-gc.test.ts.
  • 21391f1075b5: Preserve current main native audit and sandbox lifecycle fixtures; omit overlapping stale consolidation. Files: extensions/codex/src/app-server/event-projector.native-audit.test.ts, extensions/codex/src/app-server/sandbox-exec-server.lifecycle.test.ts.
  • 16133358a9ac: Preserve current main native-audit suite; omitted repeated native failure-recovery block removed or relocated on main. Files: extensions/codex/src/app-server/event-projector.native-audit.test.ts.
  • 46472d546d57: Keep newer main Code Mode, final-answer and tool-registration cases/fixtures; retain clean completion-delivery and requester-yield changes. Files: src/agents/code-mode-swarm.test.ts, src/agents/code-mode.mcp.test.ts, src/agents/embedded-agent-subscribe.subscribe-embedded-agent-session.final-answer-delivery.test.ts, src/agents/openclaw-tools.registration.test.ts.
  • c574e858cae1: Preserve current completion-delivery and preceding retained Code Mode/registration files; drop sibling edits depending on divergent fixture shapes. Files: src/agents/agent-harness-completion-delivery.test.ts, src/agents/code-mode-swarm.test.ts, src/agents/code-mode.mcp.test.ts, src/agents/embedded-agent-subscribe.subscribe-embedded-agent-session.final-answer-delivery.test.ts, src/agents/openclaw-tools.registration.test.ts.
  • 8a0e3574cf1d: Retain current main delete lifecycle proof and cleanup changes. Files: src/gateway/server.sessions.delete-lifecycle.test.ts.
  • 2e4b4d20811b: Keep current main remote-ingress and broadcast serialization fixtures; overlapping dispatcher and publication lifecycle code has diverged. Files: src/gateway/remote-control-ui-ingress.integration.test.ts, src/gateway/server-broadcast.serialization.test.ts.
  • 0064755e15c0: Keep current broadcast suite and previously retained worker-history fixture; omit divergent history fixture refactor. Files: src/gateway/server-broadcast.serialization.test.ts, src/gateway/session-history-worker-runtime.test.ts.
  • b983be07d0b6: Keep main's current Windows scheduled-task diagnostics, installed and stop fixtures; drop overlapping proof-layer removal. Files: src/daemon/schtasks.installed-diagnostics.test-support.ts, src/daemon/schtasks.installed.integration.test-support.ts, src/daemon/schtasks.stop.test.ts.
  • 574f03ba63ad: Keep all current scheduled-task fixtures, including newer command/redaction and lifecycle facts; only independent startup/runtime-path/service-audit consolidation retained. Files: src/daemon/schtasks.installed-diagnostics.test-support.ts, src/daemon/schtasks.installed-package.test-support.ts, src/daemon/schtasks.installed-package.test.ts, src/daemon/schtasks.installed.integration.test-support.ts, src/daemon/schtasks.stop.test.ts.
  • 5417edf46225: Retain current SDK approval, provider-auth and catalog fixtures; updated owner contracts conflict with old consolidation. Files: src/plugin-sdk/approval-reaction-runtime.test.ts, src/plugin-sdk/provider-auth.test.ts, src/plugin-sdk/session-catalog.test.ts.
  • f6534dd51877: Retain current SDK approval/migration/provider/catalog/session-store fixtures; their lifecycle and owner changes invalidate direct replay of the old deletion hunks. Files: src/plugin-sdk/approval-reaction-runtime.test.ts, src/plugin-sdk/migration-runtime.test.ts, src/plugin-sdk/provider-auth.test.ts, src/plugin-sdk/provider-catalog-runtime.test.ts, src/plugin-sdk/session-store-runtime.async.test.ts.
  • 1382cdfc48c0: Keep main's current subagent list metadata/ownership coverage; preserve clean registry changes. Files: src/agents/subagents/registry/subagent-list.test.ts.
  • ca7b7ce32a0e: Keep current list and announce-loop owner fixtures; omit conflicting runtime fixture rewrite. Files: src/agents/subagents/registry/subagent-list.test.ts, src/agents/subagents/registry/subagent-registry.announce-loop-guard.test.ts.
  • d07c65d78708: Keep current subagent-list owner metadata coverage, unchanged through the shard's follow-up consolidation. Files: src/agents/subagents/registry/subagent-list.test.ts.
  • 2010281e2c61: Keep current approval-routing and storage-migration fixtures; preserve newer boundary/admission behavior. Files: src/infra/approval-gateway-resolver.test.ts, src/infra/state-migrations.caller-mode.storage.test.ts.
  • c1da30eac486: Keep current Talk create/consult authority fixture changes; retain native-action and transcription consolidation. Files: src/gateway/talk/handlers/client-consult-authority.test.ts, src/gateway/talk/handlers/client-create-authority.test.ts.
  • de26ce907101: Keep current main cron-store quarantine/admission tests; conflicting removal overlaps migrated fixture layout. Entire commit skipped after the only changed file was retained. Files: src/cron/store.test.ts.
  • f35547064af0: Keep current main cron-store fixtures, retaining newer runtime-state, reservation and legacy normalization tests; omit dependent store cleanup. Files: src/cron/store.test.ts.
  • 8587f722f1ce: Skipped on rebase: main replaced inline runtime probes with generated script-file invocation; retain updated runtime-paths suite.
  • b983be07d0b6: Rebase: preserve new main generated-file runtime probe fixture; omit all runtime-paths changes. Files: src/daemon/runtime-paths.test.ts.
  • 574f03ba63ad: Rebase: retain main's rewritten runtime probe fixture, including new generated-script contract. Files: src/daemon/runtime-paths.test.ts.

CI-driven restoration

Run https://github.com/openclaw/openclaw/actions/runs/40169667930 exposed replay incompatibilities in callback types, assertion imports, helper arity, SQLite alias snapshot setup, migration output expectations, placement rejection ordering, and diagnostic allowance fixtures. The affected files were restored wholesale to main; the full logging shard was restored together so its previously merged/deleted suites remain intact. No timeouts, retries, or assertions were weakened. Local validation remains format/lint/diff-only; fresh-head PR CI is required.

Files restored from CI findings
  • src/logging/diagnostic-backend-liveness.test.ts
  • src/logging/diagnostic-lifecycle.test.ts
  • src/logging/diagnostic-memory.test.ts
  • src/logging/diagnostic-responses-request-deadline.integration.test.ts
  • src/logging/diagnostic-run-activity-owners.test.ts
  • src/logging/diagnostic-run-activity.test.ts
  • src/logging/logger-file-transport.test.ts
  • src/logging/subsystem.test.ts
  • src/agents/agent-harness-completion-delivery.test.ts
  • src/agents/subagents/registry/subagent-control.late-registration.test-support.ts
  • src/agents/subagents/registry/subagent-registry.announce-loop-guard.test.ts
  • src/agents/subagents/registry/subagent-reset.lifecycle.test.ts
  • src/infra/client-credential-restore.test.ts
  • src/infra/state-migrations.exec-approvals.test.ts
  • src/gateway/worker-environments/placement-store.test.ts

Final lint restoration

Run https://github.com/openclaw/openclaw/actions/runs/40170064760 passed the previously failing type and backend-test jobs. Type-aware lint rejected three more refactors (array sort comparator, unnecessary conversion, unbound method); their files were restored to main rather than changing lint policy:

  • src/daemon/service-audit.definition-facts.test.ts
  • src/infra/backup-scratch.test.ts
  • extensions/codex/src/app-server/run-attempt.native-hook-relay.test.ts

The UI shard ran 720 files successfully but reported an unrelated unhandled rejection: ui/src/pages/skill-workshop/skill-workshop-page.test.tsx, shows a failed configuration read and retries only when requested, Configuration temporarily unavailable. The identical error occurs in main's scheduled hourly CI job: https://github.com/openclaw/openclaw/actions/runs/40170194218/job/121099484564 . This batch does not touch that test or its production code. Fresh-head CI remains the gate; any inherited-only exception must account for every red job.

Fresh-main integration

After run 40170744015 completed, main fixed the workshop configuration-rejection fixture in 0eb9d17cee48 (test(ui): await workshop config request before rejecting). Rebased cleanly onto 127f3c2574cad42e555e2bf7f2a5c64b9fca8332 to include that fix, rather than merging with stale-base failure evidence. The remaining reduction is patch-equivalent; no additional cuts or new test logic. Format, plain lint and diff checks pass; a new exact-head hosted run is required.

UI shard withdrawn

The next head's UI job exposed a different provider-login assertion alongside the forwarded-disclosure failure. Hourly main reproduced only the forwarded-disclosure failure, so the provider-login assertion remained unproven. The complete UI test portion of this batch was restored to main, rather than claiming an inherited-only exception or weakening an assertion. No UI files remain changed. Fresh-head CI must prove the remaining non-UI reduction.

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 25, 2026 06:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T07:52:57.058363Z a6a7e39 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: codex size: XL labels Oct 25, 2026
@steipete
steipete disabled auto-merge October 25, 2026 06:32
@steipete
steipete force-pushed the tcr/land-d517-1792909006 branch from 48a11b5 to cc072a2 Compare October 25, 2026 06:36
@steipete
steipete enabled auto-merge (squash) October 25, 2026 06:36
@steipete
steipete disabled auto-merge October 25, 2026 06:41
@steipete
steipete enabled auto-merge (squash) October 25, 2026 06:42
@steipete
steipete disabled auto-merge October 25, 2026 06:52
@steipete
steipete enabled auto-merge (squash) October 25, 2026 06:53
@steipete

Copy link
Copy Markdown
Contributor Author

Both currently failing UI checks on head 9d7d494fa54a98003b77b22aa28c94c2f0dd70e9 reproduce in scheduled hourly main CI:

This diff changes neither failing test nor its production code. A fresh main fetch has no changes to these files since the pinned base. All PR-caused findings have been removed by restoring the affected files. Remaining jobs must finish and any further failures must be classified before using the authorized inherited-only exception. No reruns or assertion weakening.

Share history/model fixtures and remove duplicate usage cases already covered by usage-reporting.test-support.ts. Delegation filtering remains covered by delegation-capability.test.ts; keep dispatched capability assertions. Remove duplicate server matrix paths before provider selection, preserving distinct budget and persistence cases.
Share history decision fixtures and server budget cases. Remove duplicate library revision/profile/command proof covered by gateway/server/skill-library-read.test.ts and host pin capture covered by harness/host-capability.skill-pins.test.ts. Keep embedded filtering, hydration, hidden materialization, authorization and symlink checks; call the production skill preparer directly instead of its absent test wrapper.

Remove unused model mock profiles after repo-wide caller inspection. Keep yield orchestration outcomes, leaving tool response/callback and pause-notice details to sessions-yield-tool.test.ts and openclaw-tools.requester-yield.test.ts.
Remove the duplicated system package replacement ownership suite; all 13 cases remain in package-update-swap.freebsd.test.ts. Consolidate fixtures and assertions without removing distinct approval, accounting, filesystem, SQLite, recovery, or lifecycle coverage.

CI-only campaign: plain oxlint, oxfmt, and diff checks passed. Tests and coverage intentionally not run. Test/support lines reduced from 4901 to 4565; the remaining distinct boundary contracts prevent an honest 25 percent cut.
Keep approval reopening in exec-approvals-schema-admission.test.ts; sparse-row snapshot proof in update-candidate-state.online-backup.process.test.ts; read/write facade proof in plugin-sdk/fs-safe-compat.test.ts; compressed-body decoding in session-cost-usage-worker-io.test.ts. Replace bespoke SQL tracing with the existing observer and retain snapshot isolation, repair outcomes, integrity and authorization checks.

Consolidate shared recovery-handler mode replays and fixture lifetime. Retain real broker construction-time policy proof using append receipts; generic alias and native-close behavior remains in sqlite-worker-store.test.ts and sqlite-worker-native-stop.test.ts. Remove stale mock instrumentation.

CI-only: plain oxlint, oxfmt and diff checks pass; no tests or coverage run. Additional 551 lines removed; shard 4901 to 4014 lines, below the 25 percent target because remaining distinct authority, accounting, recovery and native lifecycle boundaries lack equivalent proof.
Consolidate repeated diagnostic memory, owner, controller, console, and transport fixtures while preserving distinct authority and lifecycle assertions.

Keep config resolution in config.test.ts and generation/silent-child behavior in level-filter.test.ts. Keep PEM delimiter, filtering, rotation, and inode behavior in the identically named log-tail-redaction.test.ts cases. Pressure-only sampling remains in the inclusive threshold table; repeated retirement and throttling remain in the silent RSS retirement scenario.

CI-only campaign: plain oxlint, oxfmt, and diff checks pass; no tests or coverage run. Shard LOC 5011 to 4491 (10.4%); below 25% because retained cases protect distinct failure, privacy, authority, ordering, and transport paths.
Merge backend-liveness into the same-routed owner-generation suite. Remove same-branch pressure variants and the copied memory event envelope while retaining numeric metric assertions. Consolidate metadata serialization and independent failure streaks into their existing boundary scenarios.

Keep heartbeat sleep policy in gateway-scheduler.test.ts (coalesces sleep and forward jumps into one pass while retaining absolute deadlines), with explicit heartbeat stop assertions retained. Keep repeated-request classification in diagnostic.test.ts (reports repeated requests during model/tool calls without granting recovery authority). Reuse existing HTTP body and Responses frame fixture helpers.

CI-only static gates pass: oxlint, oxfmt and git diff --check. No tests or coverage run. Additional LOC 4491 to 4289; cumulative 5011 to 4289 (14.4%). Below the 25% target: remaining distinct authority, privacy, lifecycle, GC and transport failure contracts retained.
Merge lifecycle cases into the same-routed owner suite and share reset/fixtures. Consolidate churn, alias-ordering, RSS/Bun, serialization, and timestamp scenarios while retaining their observable assertions. Replace GC raw-record repetition with a fixture builder and retain final diagnostic batch proof.

Retain recovery coordinator retirement authority explicitly. Request deadline table owns stalled observation without recovery and exact allowance expiry; recovery.runtime tests own missing physical-owner capture. Drop only the manually supplied default-timeout variant. Keep real HTTP fallback, native registration and execution cleanup while removing the unrelated admission wrapper and duplicate fallback order checks.

Named keepers: console-timestamp.test.ts for compact timestamp formatting; logger-file-transport rotation/target boundary table for exact sync and async bytes/order; diagnostic-stuck-session-recovery.runtime.test.ts for missing owner capture; model-fallback.context-overflow.test.ts for configured non-overflow fallback order.

CI-only: oxlint, oxfmt and diff checks pass; no tests run. Additional LOC 4289 to 3956; cumulative 5011 to 3956 (21.1%). Target remains below 25%; distinct authority, lifecycle and failure-path proof is retained.
Consolidate repeated relay registration, lifecycle blockers, approval envelopes, and transcript fixtures without dropping distinct boundary checks. The managed-binary launcher/native disappearance table retains the missing-native fallback, version, and warning proof removed from the earlier selection table. CI-only validation: plain oxlint, oxfmt, and diff-check; no runtime or coverage runs.
Keep process termination, workspace revocation, and spawn-error proof in sandbox-exec-server.termination.test.ts, sandbox-exec-server.workspace-lifecycle.test.ts, and sandbox-exec-server.spawn-error.test.ts. Keep native failure and Code Mode proof in event-projector.native-failures.test.ts and event-projector.code-mode.test.ts. Commentary opt-out remains covered through the real attempt and SQLite checkpoint in run-attempt.checkpoint.test.ts. Remove redundant native configuration variants, internal request-count/log metadata assertions, and duplicated fixture dispatch.
Consolidate Responses stream runners, requester fixtures, registration matrices, MCP runtime fixtures, and repeated assertions without dropping distinct authority or delivery contracts.

Remove the synthetic pending-snapshot expiry table: code-mode-worker-lifecycle.test.ts, bounds suspended agentWait lifetime, retains renewal and cancellation proof through storeSuspendedRun and its real lifecycle owner.

CI-only campaign: formatting, plain oxlint, and diff checks passed; no tests, builds, or coverage run. Reduce 5509 to 5340 lines (3.1%); protected owner, recovery, policy, privacy, and interleaving contracts prevent an honest 25% reduction.
Remove duplicate native reconciliation and Ollama cases retained in the dedicated text-end-reconciliation and streams-ollama-pretool-narration suites. Keep forged scope, requester receipt, historical custody, post-await revocation and pre-mirror recorder coverage in agent-harness-completion-ownership.test.ts.

Keep native discovery cache and retirement proof in prepared-model-runtime.native-demand.test.ts, paired thinking reuse in prepared-model-catalog.scoped-thinking.test.ts, and empty-generation snapshots in prepared-model-runtime.capture.test.ts. Preserve refreshed thinking assertions in the retained warm-turn test.

Consolidate swarm option mapping into the real host bridge and remove its private worker harness. Merge reserved MCP namespace invocation into the root API integration case. Remove duplicate MCP metadata and generic handle projections covered by agent-bundle-mcp-tools.request-boundary.test.ts and code-mode.test.ts. Retain all policy, source custody, resume and execution boundary assertions.

CI-only: plain oxlint, formatting and diff-check passed; no tests or builds run. 5340 to 4491 lines in this pass; 5509 to 4491 cumulatively (18.5%). The 25% target remains unmet rather than deleting unique concurrent-publication, native-task race, delivery-authority or MCP-schema proof.
Factor repeated message, session identity, deferred-read and recipient fixtures. Consolidate thinking-state and user-metadata assertions without dropping their cases.

The retained broadcasts user message metadata case covers the removed nominal slow-subscriber probe's single-delivery/key/id/sequence assertions; that probe did not simulate a slow subscriber. Explicit-store lookup remains covered by reads the canonical message through the target's explicit store.

CI-only: oxfmt, plain oxlint and diff checks pass. Remaining lifecycle, authority, privacy, transport and history cases are distinct; conservative reduction falls short of the 25 percent shard target.
Collapse non-RPC/HTTP history capture variants through their shared captureHistoryRequest branch; retain the message-by-id case with nested selectors, target identity and environment filtering. Real cleanup failure is covered by session-history-worker-errors preserves visibility ordering with close failure.

Presence encoding remains covered by server-broadcast.transport shares encoded presence only after current recipient projection and presence-delivery encodes interleaved audiences and delivery baselines once per publication. Shared/draft/incognito and live revocation remain in server-connection-state serves current presence through broadcasts, RPCs, and hello.

Ingress keeps principal, credential and held-effect fences; image byte contracts remain in channel-avatar-http, user-background-http and assistant-avatar-http. Ordinary archived deletion remains in server.sessions.store-rpc write-scoped operators manage chat organization but not admin session settings. Merge canonical-message content and explicit-store selection proof.

CI-only: oxfmt, plain oxlint and diff checks passed; no test or coverage runs. Total shard reduction is 376 of 5264 lines; further distinct authority and lifecycle cases retained rather than forcing the 25 percent target.
Keep marker FIFO coverage in registerTranscriptMarkerQueueTests joins an unresolved marker to its keyed lane; keep generic patch admission ordering in server.sessions.patch-expected-identity rechecks plugin ownership after waiting for lifecycle admission.

Retain encoded coalesced cancellation/capacity proof and plain-page independence in shares queued equivalent pages but starts a fresh read after dispatch. Remove redundant internal clone/log/getter bookkeeping, factor recipient fixtures, and retain both provider dimension selection and mismatch rejection without replaying their combination.

Static-only validation: oxfmt, plain oxlint and diff check pass. No tests or coverage run. Supplied baseline already imports absent ingress helpers expectRemoteHello, requestIngressHttp and ingressWebSocketRequest; not modified here. Original shard 5264 lines now 4716; distinct authority, privacy and lifecycle cases retained.
Keep unpublished-owner matrices in schtasks-owner-publication.test.ts and the portless restart refusal in schtasks.settlement.test.ts. Keep bounded absent and late-port observations in schtasks-runtime.deadline.test.ts; Startup retains its outer native and stalled-file deadlines.

Reduce installed discovery to its unique direct-action state and preview proof. Non-Gateway, missing-launcher and custom registered-launcher classification remain in inspect.startup.test.ts; disabled runtime classification remains in schtasks-runtime.test.ts. Preserve admission, immutable selected state, pre-cleanup failure recording and native cleanup.

Merge mock-only Bun library proof into executable probe proof, retaining secret/preload exclusion and library selection ordering. Compact systemd directive fixtures and remove redundant native wiring assertions. CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Total original shard 4694 to 4220 lines, 10.1 percent, still below the 25 percent target.
Share launchd and command-failure setup, consolidate owner transition and stale-CIM rows, and localize the single-caller installed direct-task fixture without its exported parameter layer. Preserve native admission, pre-cleanup failure recording, redaction, profile binding, and cleanup order.

Remove the repeated CORE_HEALTH_CHECKS projection from Startup tests: src/flows/doctor-gateway-services-check.test.ts owns reports inventory with verified cleanup; the Startup suite still exercises real Doctor output. Keep every transition and package-provenance case.

CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Original shard 4694 to 4014 lines, 14.5 percent reduction; the 25 percent target remains unmet without removing distinct retained behavior.
Remove duplicate directory-substitution races: migration-runtime.memory-races.test.ts retains the same destination/staged fault hooks, preservation and recovery assertions. Consolidate sidecar, auth-profile, reaction-store and reply fixtures without dropping other behaviors.

CI-only validation: oxfmt, plain oxlint and diff-check pass; no tests or coverage run. Static cases 188 to 186; test LOC 5332 to 5213. Below the 25% target: remaining cases protect distinct SDK, authority, persistence and lifecycle contracts.
Keep auth runtime and write compatibility contracts in provider-auth-runtime.test.ts and provider-auth-write-compat.test.ts. Both retain the copied test cases, including OAuth CORS/cancellation and lossless SecretRef/null-return writes.

Loader keepers: plugin-module-loader-cache.test.ts, falls back to source transform (Windows paths: %s); shared/runtime-import.test.ts, converts Windows absolute import specifiers to file URLs. Replace SDK filesystem call counting with cached loading after the sidecar disappears; run real source fallback rather than a fake transformer.

Lifecycle keepers: cli-service-scheduler.test.ts, retains the registered CLI owner scheduler and joins its work before retirement; services.scheduler-context.test.ts, owns service callbacks after startup and reload callers finish; registry-inspection-resources.test.ts, keeps registration cleanup captured by capturedDisposal after its caller closes. Reuse its native SQLite inspection fixture.

Session policy and absent-owner keepers are session-entry-current-check.test.ts, session-entry-read.memory.test.ts and session-actor-memory.test.ts. Preserve SDK-specific projection, expected mismatch, closed binding and no-allocation assertions. Cached duplicate and legacy namespace keepers remain in memory-host-events.test.ts.

Table distinct migration link/overwrite branches and approval prompt modes without dropping their assertions. CI-only: plain oxlint, oxfmt and diff-check pass; no tests/build/coverage runs. Additional LOC 5213 to 4416; original base 5332 to 4416 (17.2 percent, below the 25 percent target). Static declarations 142 to 116, expanded cases 188 to 160. No production or support edits.
Consolidate shared archive, reservation, session identity, and paused-run fixtures while preserving lifecycle and authority checks.

Keep collector-ID hydration at the real SQLite boundary in subagent-registry-state.async.test.ts (consumes only selected full rows with current raw ownership after worker hydration). Fold moved-live child masking into keeps warm child lookups scoped through cache publications and live moves.

Combine fresh active/recent metadata with mixed memory/durable owner coverage. Retain hidden, empty, whitespace and silent-token collector cases without the redundant outcome cross-product.

CI-only: plain oxlint, oxfmt and git diff --check pass; runtime tests and coverage deferred to hosted CI. The dense retained race and durability cases prevent the requested 25 percent line reduction.
Replace the parallel cache-read and announcement mock protocols with existing real SQLite and restart fixtures. Preserve source ownership, cold restore, backoff, queued delivery custody, and terminal outcomes at the actual owner boundary.

Consolidate controller-move coverage into keeps control selection grouped and distinguishes agents sharing a child key. Consolidate done/timeout list rendering into a two-branch table and use the standard session-entry path for incognito fixtures.

Remove admin cancellation and failed beforeKill replays already covered by subagent-control.retirement.test.ts: handles ordinary retirement during admin admission drain, and does not create a missing child database while binding cancellation. Keep two refresh batches for independent settlement, coalescing and finalization joining.

CI-only: plain oxlint, oxfmt and diff-check passed. No tests or coverage run. Further cuts remain below the 25 percent target because the retained cases exercise distinct lifecycle and authority paths.
Move worker snapshots into the state suite with its existing SQLite fixture and agents-support routing. Keep admission, publication, recovery, and cleanup race assertions; remove internal call-shape probes and reuse control/worker fixtures.

The direct-kill replay is covered by subagent-registry-worker.test.ts: settles a requester cohort while many children finish and one is killed. Missing-owner sweeper variants share the unconditional authority guard and retain its no-effect assertions. The yielded legacy leaf retains the same continuation branch as the removed orchestrator control.

CI-only: oxfmt, plain oxlint, and diff-check passed; no test or coverage commands run. Shard lines 5156 to 4344 (15.7%); below the 25% target because remaining cases protect distinct authority and lifecycle paths.
Port and squash s0186 commits 9d0c91fe524f4d77df87a459f9afd2e15c5ee05c, ccf7b6929d9d17941be6134b646f81255d3b53a3, and 5cd598a17e6d9e74bbba58137271dccf62248c9d onto the campaign lane. Preserve the lane shared makeStallingStream extraction; all eleven final test files match the shard result. No lane-added or lane-modified test cases or assertions were removed.

CI-only validation: oxlint on all 11 files exited 0; oxfmt --check exited 0; staged and unstaged git diff --check exited 0. Independent review found no actionable P0/P1 issues. No tests, coverage, Testbox, or check-changed run; affected test execution is deferred to landing PR CI.
Share account fixtures and direct/short-route startup retry scenarios. Keep all authority, lifecycle, cursor and rendering branches represented.

The canonical older-page join test now also proves prepend and exhaustion, replacing the duplicate standalone case. Permission link navigation remains covered by components/chat-permission-picker.test.tsx.

CI-only validation: plain oxlint, oxfmt and git diff --check. Retain dense dashboard and embedded-panel suites; this conservative shard cut does not reach the 25% LOC target.
Merge logical-owner invalidation into the shared-store discovery/worker integration case. Retain the exact invalidation, owner isolation and foreground-reader interleaving checks in discovers, accesses, invalidates, and reaps only the logical owner in a shared store.

Keep one replacement-order case covering new, healthy and unsupported rows. Reuse watcher/one-shot construction and independent continuation fixtures; simplify auth mode metadata and the HTTP response fixture. Remove redundant internal hook identity and cache assertions while retaining uncertain-write no-replay proof.

CI-only validation: plain oxlint exits zero, oxfmt and git diff --check pass. No tests, coverage, builds or Testbox. Additional cut is 177 lines; cumulative shard reduction is 5200 to 4900, below the 25 percent target.
Cover structured no_change and blocked results in both worker views inside retains history across worker reads, isolates stores, and recovers only an exact receipt, removing separate fixture setup.

Leave shared-store discovery/projection assertions to targets-discovery.test.ts (requires agent-specific rows instead of fixed-store file existence) and combined-store-gateway.test.ts (projects shared rows under their logical owner while retaining the physical database owner). Keep the reaper cold-resource and foreground-reader interleaving.

Remove the late terminal replacement replay: service.recovery-identity.test.ts covers late retirement, while this shard's trigger ABA test and service.declarative-jobs.test.ts retain trigger replacement/reset checks. Preserve real failed-update rollback coverage.

CI-only: plain oxlint exits zero, oxfmt and diff check pass; no tests or builds run. Cumulative shard size 5200 to 4842 lines, still below the requested 25 percent reduction.
Reuse placement transition fixtures and device dispatch setup. Keep draining release distinct from atomic reclaim fencing; consolidate shared drain assertions in the reclaim test.

The completed-workspace-result test now owns active manifest advancement and stale-claim rejection previously repeated by the standalone manifest test. Preserve all authority, persistence, and lifecycle assertions. Validation: plain oxlint, oxfmt, and diff-check; runtime proof deferred to hosted CI per campaign CI-only mode.
@steipete
steipete force-pushed the tcr/land-d517-1792909006 branch from 9d7d494 to 0ad155b Compare October 25, 2026 07:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ad155bbb3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 353 to 354
await Promise.resolve();
expect(mocks.sender).not.toHaveBeenCalled();
expect(mocks.send).not.toHaveBeenCalled();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the sender-preparation assertion for injected updates

Removing the mocks.sender assertion makes this negative test pass even if the injected-message exclusion in resolveEventWebPushNotification is removed. With this suite's resolved mocks, the single await Promise.resolve() only advances delivery through hasBoundWebPushSubscriptions() into sender preparation; mocks.send remains uncalled because delivery is suspended at the next await. Restore the sender-preparation assertion or wait for delivery settlement before checking send, so the test actually detects unwanted completion notifications.

Useful? React with 👍 / 👎.

@steipete
steipete disabled auto-merge October 25, 2026 07:34
@steipete
steipete enabled auto-merge (squash) October 25, 2026 07:49
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Oct 25, 2026
@steipete
steipete merged commit f7fa650 into main Oct 25, 2026
136 checks passed
@steipete
steipete deleted the tcr/land-d517-1792909006 branch October 25, 2026 08:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
* test(agents): deslop s0188 tests

Share history/model fixtures and remove duplicate usage cases already covered by usage-reporting.test-support.ts. Delegation filtering remains covered by delegation-capability.test.ts; keep dispatched capability assertions. Remove duplicate server matrix paths before provider selection, preserving distinct budget and persistence cases.

* test(agents): consolidate s0188 owner-boundary proof

Share history decision fixtures and server budget cases. Remove duplicate library revision/profile/command proof covered by gateway/server/skill-library-read.test.ts and host pin capture covered by harness/host-capability.skill-pins.test.ts. Keep embedded filtering, hydration, hidden materialization, authorization and symlink checks; call the production skill preparer directly instead of its absent test wrapper.

Remove unused model mock profiles after repo-wide caller inspection. Keep yield orchestration outcomes, leaving tool response/callback and pause-notice details to sessions-yield-tool.test.ts and openclaw-tools.requester-yield.test.ts.

* test(infra): deslop s0187 tests

Remove the duplicated system package replacement ownership suite; all 13 cases remain in package-update-swap.freebsd.test.ts. Consolidate fixtures and assertions without removing distinct approval, accounting, filesystem, SQLite, recovery, or lifecycle coverage.

CI-only campaign: plain oxlint, oxfmt, and diff checks passed. Tests and coverage intentionally not run. Test/support lines reduced from 4901 to 4565; the remaining distinct boundary contracts prevent an honest 25 percent cut.

* test(infra): remove redundant s0187 proof layers

Keep approval reopening in exec-approvals-schema-admission.test.ts; sparse-row snapshot proof in update-candidate-state.online-backup.process.test.ts; read/write facade proof in plugin-sdk/fs-safe-compat.test.ts; compressed-body decoding in session-cost-usage-worker-io.test.ts. Replace bespoke SQL tracing with the existing observer and retain snapshot isolation, repair outcomes, integrity and authorization checks.

Consolidate shared recovery-handler mode replays and fixture lifetime. Retain real broker construction-time policy proof using append receipts; generic alias and native-close behavior remains in sqlite-worker-store.test.ts and sqlite-worker-native-stop.test.ts. Remove stale mock instrumentation.

CI-only: plain oxlint, oxfmt and diff checks pass; no tests or coverage run. Additional 551 lines removed; shard 4901 to 4014 lines, below the 25 percent target because remaining distinct authority, accounting, recovery and native lifecycle boundaries lack equivalent proof.

* test(logging): deslop s0185 tests

Consolidate repeated diagnostic memory, owner, controller, console, and transport fixtures while preserving distinct authority and lifecycle assertions.

Keep config resolution in config.test.ts and generation/silent-child behavior in level-filter.test.ts. Keep PEM delimiter, filtering, rotation, and inode behavior in the identically named log-tail-redaction.test.ts cases. Pressure-only sampling remains in the inclusive threshold table; repeated retirement and throttling remain in the silent RSS retirement scenario.

CI-only campaign: plain oxlint, oxfmt, and diff checks pass; no tests or coverage run. Shard LOC 5011 to 4491 (10.4%); below 25% because retained cases protect distinct failure, privacy, authority, ordering, and transport paths.

* test(logging): consolidate s0185 owner and boundary proof

Merge backend-liveness into the same-routed owner-generation suite. Remove same-branch pressure variants and the copied memory event envelope while retaining numeric metric assertions. Consolidate metadata serialization and independent failure streaks into their existing boundary scenarios.

Keep heartbeat sleep policy in gateway-scheduler.test.ts (coalesces sleep and forward jumps into one pass while retaining absolute deadlines), with explicit heartbeat stop assertions retained. Keep repeated-request classification in diagnostic.test.ts (reports repeated requests during model/tool calls without granting recovery authority). Reuse existing HTTP body and Responses frame fixture helpers.

CI-only static gates pass: oxlint, oxfmt and git diff --check. No tests or coverage run. Additional LOC 4491 to 4289; cumulative 5011 to 4289 (14.4%). Below the 25% target: remaining distinct authority, privacy, lifecycle, GC and transport failure contracts retained.

* test(logging): remove duplicate s0185 proof layers

Merge lifecycle cases into the same-routed owner suite and share reset/fixtures. Consolidate churn, alias-ordering, RSS/Bun, serialization, and timestamp scenarios while retaining their observable assertions. Replace GC raw-record repetition with a fixture builder and retain final diagnostic batch proof.

Retain recovery coordinator retirement authority explicitly. Request deadline table owns stalled observation without recovery and exact allowance expiry; recovery.runtime tests own missing physical-owner capture. Drop only the manually supplied default-timeout variant. Keep real HTTP fallback, native registration and execution cleanup while removing the unrelated admission wrapper and duplicate fallback order checks.

Named keepers: console-timestamp.test.ts for compact timestamp formatting; logger-file-transport rotation/target boundary table for exact sync and async bytes/order; diagnostic-stuck-session-recovery.runtime.test.ts for missing owner capture; model-fallback.context-overflow.test.ts for configured non-overflow fallback order.

CI-only: oxlint, oxfmt and diff checks pass; no tests run. Additional LOC 4289 to 3956; cumulative 5011 to 3956 (21.1%). Target remains below 25%; distinct authority, lifecycle and failure-path proof is retained.

* test(codex): deslop s0189 tests

Consolidate repeated relay registration, lifecycle blockers, approval envelopes, and transcript fixtures without dropping distinct boundary checks. The managed-binary launcher/native disappearance table retains the missing-native fallback, version, and warning proof removed from the earlier selection table. CI-only validation: plain oxlint, oxfmt, and diff-check; no runtime or coverage runs.

* test(codex): remove duplicated s0189 boundary layers

Keep process termination, workspace revocation, and spawn-error proof in sandbox-exec-server.termination.test.ts, sandbox-exec-server.workspace-lifecycle.test.ts, and sandbox-exec-server.spawn-error.test.ts. Keep native failure and Code Mode proof in event-projector.native-failures.test.ts and event-projector.code-mode.test.ts. Commentary opt-out remains covered through the real attempt and SQLite checkpoint in run-attempt.checkpoint.test.ts. Remove redundant native configuration variants, internal request-count/log metadata assertions, and duplicated fixture dispatch.

* test(agents): deslop s0191 tests

Consolidate Responses stream runners, requester fixtures, registration matrices, MCP runtime fixtures, and repeated assertions without dropping distinct authority or delivery contracts.

Remove the synthetic pending-snapshot expiry table: code-mode-worker-lifecycle.test.ts, bounds suspended agentWait lifetime, retains renewal and cancellation proof through storeSuspendedRun and its real lifecycle owner.

CI-only campaign: formatting, plain oxlint, and diff checks passed; no tests, builds, or coverage run. Reduce 5509 to 5340 lines (3.1%); protected owner, recovery, policy, privacy, and interleaving contracts prevent an honest 25% reduction.

* test(agents): deslop s0191 sibling layers

Remove duplicate native reconciliation and Ollama cases retained in the dedicated text-end-reconciliation and streams-ollama-pretool-narration suites. Keep forged scope, requester receipt, historical custody, post-await revocation and pre-mirror recorder coverage in agent-harness-completion-ownership.test.ts.

Keep native discovery cache and retirement proof in prepared-model-runtime.native-demand.test.ts, paired thinking reuse in prepared-model-catalog.scoped-thinking.test.ts, and empty-generation snapshots in prepared-model-runtime.capture.test.ts. Preserve refreshed thinking assertions in the retained warm-turn test.

Consolidate swarm option mapping into the real host bridge and remove its private worker harness. Merge reserved MCP namespace invocation into the root API integration case. Remove duplicate MCP metadata and generic handle projections covered by agent-bundle-mcp-tools.request-boundary.test.ts and code-mode.test.ts. Retain all policy, source custody, resume and execution boundary assertions.

CI-only: plain oxlint, formatting and diff-check passed; no tests or builds run. 5340 to 4491 lines in this pass; 5509 to 4491 cumulatively (18.5%). The 25% target remains unmet rather than deleting unique concurrent-publication, native-task race, delivery-authority or MCP-schema proof.

* test(gateway): deslop s0192 tests

Factor repeated message, session identity, deferred-read and recipient fixtures. Consolidate thinking-state and user-metadata assertions without dropping their cases.

The retained broadcasts user message metadata case covers the removed nominal slow-subscriber probe's single-delivery/key/id/sequence assertions; that probe did not simulate a slow subscriber. Explicit-store lookup remains covered by reads the canonical message through the target's explicit store.

CI-only: oxfmt, plain oxlint and diff checks pass. Remaining lifecycle, authority, privacy, transport and history cases are distinct; conservative reduction falls short of the 25 percent shard target.

* test(gateway): consolidate s0192 owner-boundary coverage

Collapse non-RPC/HTTP history capture variants through their shared captureHistoryRequest branch; retain the message-by-id case with nested selectors, target identity and environment filtering. Real cleanup failure is covered by session-history-worker-errors preserves visibility ordering with close failure.

Presence encoding remains covered by server-broadcast.transport shares encoded presence only after current recipient projection and presence-delivery encodes interleaved audiences and delivery baselines once per publication. Shared/draft/incognito and live revocation remain in server-connection-state serves current presence through broadcasts, RPCs, and hello.

Ingress keeps principal, credential and held-effect fences; image byte contracts remain in channel-avatar-http, user-background-http and assistant-avatar-http. Ordinary archived deletion remains in server.sessions.store-rpc write-scoped operators manage chat organization but not admin session settings. Merge canonical-message content and explicit-store selection proof.

CI-only: oxfmt, plain oxlint and diff checks passed; no test or coverage runs. Total shard reduction is 376 of 5264 lines; further distinct authority and lifecycle cases retained rather than forcing the 25 percent target.

* test(gateway): trim repeated s0192 fixtures and boundary replays

Keep marker FIFO coverage in registerTranscriptMarkerQueueTests joins an unresolved marker to its keyed lane; keep generic patch admission ordering in server.sessions.patch-expected-identity rechecks plugin ownership after waiting for lifecycle admission.

Retain encoded coalesced cancellation/capacity proof and plain-page independence in shares queued equivalent pages but starts a fresh read after dispatch. Remove redundant internal clone/log/getter bookkeeping, factor recipient fixtures, and retain both provider dimension selection and mismatch rejection without replaying their combination.

Static-only validation: oxfmt, plain oxlint and diff check pass. No tests or coverage run. Supplied baseline already imports absent ingress helpers expectRemoteHello, requestIngressHttp and ingressWebSocketRequest; not modified here. Original shard 5264 lines now 4716; distinct authority, privacy and lifecycle cases retained.

* test(daemon): remove duplicate s0190 proof layers

Keep unpublished-owner matrices in schtasks-owner-publication.test.ts and the portless restart refusal in schtasks.settlement.test.ts. Keep bounded absent and late-port observations in schtasks-runtime.deadline.test.ts; Startup retains its outer native and stalled-file deadlines.

Reduce installed discovery to its unique direct-action state and preview proof. Non-Gateway, missing-launcher and custom registered-launcher classification remain in inspect.startup.test.ts; disabled runtime classification remains in schtasks-runtime.test.ts. Preserve admission, immutable selected state, pre-cleanup failure recording and native cleanup.

Merge mock-only Bun library proof into executable probe proof, retaining secret/preload exclusion and library selection ordering. Compact systemd directive fixtures and remove redundant native wiring assertions. CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Total original shard 4694 to 4220 lines, 10.1 percent, still below the 25 percent target.

* test(daemon): consolidate remaining s0190 fixtures

Share launchd and command-failure setup, consolidate owner transition and stale-CIM rows, and localize the single-caller installed direct-task fixture without its exported parameter layer. Preserve native admission, pre-cleanup failure recording, redaction, profile binding, and cleanup order.

Remove the repeated CORE_HEALTH_CHECKS projection from Startup tests: src/flows/doctor-gateway-services-check.test.ts owns reports inventory with verified cleanup; the Startup suite still exercises real Doctor output. Keep every transition and package-provenance case.

CI-only: plain oxlint, oxfmt and diff-check passed; no tests or coverage run. Original shard 4694 to 4014 lines, 14.5 percent reduction; the 25 percent target remains unmet without removing distinct retained behavior.

* test(plugin-sdk): deslop s0194 tests

Remove duplicate directory-substitution races: migration-runtime.memory-races.test.ts retains the same destination/staged fault hooks, preservation and recovery assertions. Consolidate sidecar, auth-profile, reaction-store and reply fixtures without dropping other behaviors.

CI-only validation: oxfmt, plain oxlint and diff-check pass; no tests or coverage run. Static cases 188 to 186; test LOC 5332 to 5213. Below the 25% target: remaining cases protect distinct SDK, authority, persistence and lifecycle contracts.

* test(plugin-sdk): remove s0194 duplicate test layers

Keep auth runtime and write compatibility contracts in provider-auth-runtime.test.ts and provider-auth-write-compat.test.ts. Both retain the copied test cases, including OAuth CORS/cancellation and lossless SecretRef/null-return writes.

Loader keepers: plugin-module-loader-cache.test.ts, falls back to source transform (Windows paths: %s); shared/runtime-import.test.ts, converts Windows absolute import specifiers to file URLs. Replace SDK filesystem call counting with cached loading after the sidecar disappears; run real source fallback rather than a fake transformer.

Lifecycle keepers: cli-service-scheduler.test.ts, retains the registered CLI owner scheduler and joins its work before retirement; services.scheduler-context.test.ts, owns service callbacks after startup and reload callers finish; registry-inspection-resources.test.ts, keeps registration cleanup captured by capturedDisposal after its caller closes. Reuse its native SQLite inspection fixture.

Session policy and absent-owner keepers are session-entry-current-check.test.ts, session-entry-read.memory.test.ts and session-actor-memory.test.ts. Preserve SDK-specific projection, expected mismatch, closed binding and no-allocation assertions. Cached duplicate and legacy namespace keepers remain in memory-host-events.test.ts.

Table distinct migration link/overwrite branches and approval prompt modes without dropping their assertions. CI-only: plain oxlint, oxfmt and diff-check pass; no tests/build/coverage runs. Additional LOC 5213 to 4416; original base 5332 to 4416 (17.2 percent, below the 25 percent target). Static declarations 142 to 116, expanded cases 188 to 160. No production or support edits.

* test(agents): deslop s0193 tests

Consolidate shared archive, reservation, session identity, and paused-run fixtures while preserving lifecycle and authority checks.

Keep collector-ID hydration at the real SQLite boundary in subagent-registry-state.async.test.ts (consumes only selected full rows with current raw ownership after worker hydration). Fold moved-live child masking into keeps warm child lookups scoped through cache publications and live moves.

Combine fresh active/recent metadata with mixed memory/durable owner coverage. Retain hidden, empty, whitespace and silent-token collector cases without the redundant outcome cross-product.

CI-only: plain oxlint, oxfmt and git diff --check pass; runtime tests and coverage deferred to hosted CI. The dense retained race and durability cases prevent the requested 25 percent line reduction.

* test(agents): consolidate s0193 runtime fixtures

Replace the parallel cache-read and announcement mock protocols with existing real SQLite and restart fixtures. Preserve source ownership, cold restore, backoff, queued delivery custody, and terminal outcomes at the actual owner boundary.

Consolidate controller-move coverage into keeps control selection grouped and distinguishes agents sharing a child key. Consolidate done/timeout list rendering into a two-branch table and use the standard session-entry path for incognito fixtures.

Remove admin cancellation and failed beforeKill replays already covered by subagent-control.retirement.test.ts: handles ordinary retirement during admin admission drain, and does not create a missing child database while binding cancellation. Keep two refresh batches for independent settlement, coalescing and finalization joining.

CI-only: plain oxlint, oxfmt and diff-check passed. No tests or coverage run. Further cuts remain below the 25 percent target because the retained cases exercise distinct lifecycle and authority paths.

* test(agents): consolidate s0193 registry fixtures and state suites

Move worker snapshots into the state suite with its existing SQLite fixture and agents-support routing. Keep admission, publication, recovery, and cleanup race assertions; remove internal call-shape probes and reuse control/worker fixtures.

The direct-kill replay is covered by subagent-registry-worker.test.ts: settles a requester cohort while many children finish and one is killed. Missing-owner sweeper variants share the unconditional authority guard and retain its no-effect assertions. The yielded legacy leaf retains the same continuation branch as the removed orchestrator control.

CI-only: oxfmt, plain oxlint, and diff-check passed; no test or coverage commands run. Shard lines 5156 to 4344 (15.7%); below the 25% target because remaining cases protect distinct authority and lifecycle paths.

* test(infra): reduce s0186 fixture and assertion duplication

Port and squash s0186 commits 9d0c91fe524f4d77df87a459f9afd2e15c5ee05c, ccf7b6929d9d17941be6134b646f81255d3b53a3, and 5cd598a17e6d9e74bbba58137271dccf62248c9d onto the campaign lane. Preserve the lane shared makeStallingStream extraction; all eleven final test files match the shard result. No lane-added or lane-modified test cases or assertions were removed.

CI-only validation: oxlint on all 11 files exited 0; oxfmt --check exited 0; staged and unstaged git diff --check exited 0. Independent review found no actionable P0/P1 issues. No tests, coverage, Testbox, or check-changed run; affected test execution is deferred to landing PR CI.

* test(chat): deslop s0196 tests

Share account fixtures and direct/short-route startup retry scenarios. Keep all authority, lifecycle, cursor and rendering branches represented.

The canonical older-page join test now also proves prepend and exhaustion, replacing the duplicate standalone case. Permission link navigation remains covered by components/chat-permission-picker.test.tsx.

CI-only validation: plain oxlint, oxfmt and git diff --check. Retain dense dashboard and embedded-panel suites; this conservative shard cut does not reach the 25% LOC target.

* test(talk): deslop s0195 tests

* test(cron): consolidate s0197 fixtures and duplicate proof

Merge logical-owner invalidation into the shared-store discovery/worker integration case. Retain the exact invalidation, owner isolation and foreground-reader interleaving checks in discovers, accesses, invalidates, and reaps only the logical owner in a shared store.

Keep one replacement-order case covering new, healthy and unsupported rows. Reuse watcher/one-shot construction and independent continuation fixtures; simplify auth mode metadata and the HTTP response fixture. Remove redundant internal hook identity and cache assertions while retaining uncertain-write no-replay proof.

CI-only validation: plain oxlint exits zero, oxfmt and git diff --check pass. No tests, coverage, builds or Testbox. Additional cut is 177 lines; cumulative shard reduction is 5200 to 4900, below the 25 percent target.

* test(cron): remove overlapping s0197 proof layers

Cover structured no_change and blocked results in both worker views inside retains history across worker reads, isolates stores, and recovers only an exact receipt, removing separate fixture setup.

Leave shared-store discovery/projection assertions to targets-discovery.test.ts (requires agent-specific rows instead of fixed-store file existence) and combined-store-gateway.test.ts (projects shared rows under their logical owner while retaining the physical database owner). Keep the reaper cold-resource and foreground-reader interleaving.

Remove the late terminal replacement replay: service.recovery-identity.test.ts covers late retirement, while this shard's trigger ABA test and service.declarative-jobs.test.ts retain trigger replacement/reset checks. Preserve real failed-update rollback coverage.

CI-only: plain oxlint exits zero, oxfmt and diff check pass; no tests or builds run. Cumulative shard size 5200 to 4842 lines, still below the requested 25 percent reduction.

* test(gateway): deslop s0198 tests

Reuse placement transition fixtures and device dispatch setup. Keep draining release distinct from atomic reclaim fencing; consolidate shared drain assertions in the reclaim test.

The completed-workspace-result test now owns active manifest advancement and stale-claim rejection previously repeated by the standalone manifest test. Preserve all authority, persistence, and lifecycle assertions. Validation: plain oxlint, oxfmt, and diff-check; runtime proof deferred to hosted CI per campaign CI-only mode.

* test: retain coverage flagged during batch review

* test: retain fixtures incompatible with current owners

* test: retain fixtures rejected by type-aware lint

* test: retain UI fixtures after unproven shard failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: codex gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant