Repository navigation
test(core,ui): remove low-value tests (batch d175) - #174351
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. |
91c2ff9 to
e24ad2d
Compare
|
Codex review: needs changes before merge. What this changesThis PR consolidates repeated fixtures and assertions across core, plugin, tooling, and Control UI tests. Example: Slack progress cards exercise detailed and quiet layouts in working, success, and error states.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 8 items remain Keep open: this maintainer-directed cleanup has value, but eight introduced test defects block merge. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherThe changed tests feed synthetic inputs through OpenClaw owners and transport fixtures, then check outputs, lifecycle behavior, and authorization contracts. flowchart LR
A[Test cases] --> B[Shared fixtures]
B --> C[OpenClaw owners]
C --> D[Transport and storage fixtures]
D --> E[Contract assertions]
Technical reviewBest possible solution: Repair the test fixtures and expectations while preserving their existing contracts, then validate the repaired head through hosted CI. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the introduced failures, and exact-head hosted CI annotations corroborate them; no target code was executed during this review. Is this the best way to solve the issue? Sharing repeated fixtures is appropriate, but incomplete renames and changed expectations must be repaired without altering production behavior to accommodate the tests. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8079cb87aefe. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 11:37 AM ET / 15:37 UTC. |
e24ad2d to
9b170f6
Compare
c232c1c to
d181965
Compare
The fixture extraction in 9d1d2ed (#174351) introduced ORIGINAL_REVISION as an unused export. History has no later removal of an importer: the constant was private fixture state from the start. Keep the constant for lifecycle revision setup and remove only its export. The sole importing suite retains all six delivery-mirror cases. Proof: pnpm test src/gateway/worker-environments/transcript-commit.delivery-mirror.test.ts --maxWorkers=1 passed 6/6 (82.22s before, 35.59s after command wall; warmed worker cache). Gateway-other tsgo, targeted lint, formatting, and P2 review passed. The deadcode:exports before/after scan removes this finding; remaining Discord namespace and transcriptReadOperations findings are inherited.
* test(ui): deslop x7176 tests * test(ui): deslop x7176 tests * test(pr): deslop x7178 tests * test(pr): deslop x7178 tests * test(pr): deslop x7178 tests * test(transcripts): deslop x7183 tests * test(transcripts): deslop x7183 tests * test(transcripts): deslop x7183 tests * test(worker-environments): deslop x7181 tests * test(worker-environments): deslop x7181 tests * test(worker-environments): deslop x7181 tests * test(plugins): deslop x7182 tests * test(plugins): deslop x7182 tests * test(plugins): deslop x7182 tests * test(meeting-bot): deslop x7184 tests * test(meeting-bot): deslop x7184 tests * test(auto-reply): deslop x7188 tests * test(auto-reply): deslop x7188 tests * test(codex): deslop x7185 tests * test(codex): deslop x7185 tests * test(codex): deslop x7185 tests * test(slack): deslop x7177 tests * test(slack): deslop x7177 tests * test(slack): deslop x7177 tests * test(gateway): deslop x7180 tests * test(gateway): deslop x7180 tests * test(gateway): deslop x7180 tests * test(commands): deslop x7186 tests * test(commands): deslop x7186 tests * test(agents): deslop x7187 tests * test: repair replayed fixture contracts * test: drop failing hook and triage cleanup hunks * test(gateway): drop invalid usage context fixture cleanup * test: prune obsolete mock export baseline entries
The fixture extraction in 94adc21 (openclaw#174351) introduced ORIGINAL_REVISION as an unused export. History has no later removal of an importer: the constant was private fixture state from the start. Keep the constant for lifecycle revision setup and remove only its export. The sole importing suite retains all six delivery-mirror cases. Proof: pnpm test src/gateway/worker-environments/transcript-commit.delivery-mirror.test.ts --maxWorkers=1 passed 6/6 (82.22s before, 35.59s after command wall; warmed worker cache). Gateway-other tsgo, targeted lint, formatting, and P2 review passed. The deadcode:exports before/after scan removes this finding; remaining Discord namespace and transcriptReadOperations findings are inherited.
What Problem This Solves
Batch d175 reduces repeated fixtures, redundant assertions, and implementation-shaped scaffolding across twelve previously audited shards. Distinct authority, recovery, security, lifecycle, and ordering scenarios are retained. This is test maintenance, not a product behavior change.
Evidence
Current-main diff: test/support +13542/-19421 LOC (net -5879); production +0/-0 LOC.
Local validation follows the operator's CI-only rule: plain oxfmt, plain oxlint, and git diff --check only. No local Vitest, check-changed, typecheck, or Testbox execution. Hosted openclaw/ci-gate is the runtime and typecheck gate. Independent autoreview runs during CI.
Coverage totals were not measured in these source shards under the same CI-only rule; no measured coverage-drop claim is made. The source reports below provide static declarations/cases and reduction totals, not runtime coverage. Per-file 25% targets were generally not reached because distinct proof was retained.
Replay
All 30 listed source commits applied in order. Conflict resolution in test/scripts/pr-worktree-provision-error.test.ts: preserved current-main SQLite provenance, busy/lifecycle classification, cyclic-cause, hostile-property, and two-row ordinary-error coverage. Kept the reason-capable storage helper because new main cases use it. Retained equivalent held/aborted table consolidation and mock factoring; dropped the obsolete singleton ordinary-error collapse and reason-helper narrowing.
Shard details
x7176
Replayed diff: +2529/-3235 test/support LOC (net -706); lexical test declarations 40 → 39. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
ui/src/e2e/chat-flow-fixtures.test-support.tsui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.tsui/src/e2e/chat-flow.messaging.e2e.test.tsui/src/e2e/chat-flow.navigation-presentation.e2e.test.tsui/src/e2e/chat-flow.streaming.e2e.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed x7176 as
56434e3062a3b516bda85e899b7e7f995bbb6fde. Clean worktree; not pushed.All 40 declarations / 46 expanded cases remain; none deleted or folded. Consolidated fixture data, repeated ordering/footer assertions, and cleanup already owned by the suite’s awaited
afterEach. Distinct reconnect, steering, identity, geometry, and mobile-input behavior remains covered by its original cases.Plain oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and check-changed were not run under CI-only instructions. No production/shared-support files changed; no bug or flake fixes.The 25% per-file target was not met. Coordinator review and hosted CI remain pending.
x7178
Replayed diff: +721/-1211 test/support LOC (net -490); lexical test declarations 34 → 31. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
test/scripts/pr-worktree-evidence.test.tstest/scripts/pr-worktree-provision-error.test.tstest/scripts/pr-wrappers.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed shard
x7178as8ed751ace6f. Worktree is clean; nothing pushed.Factored repeated process, repository, and hook setup; removed unreachable fixture branches. All existing scenarios remain; supplied counter unchanged at 40 declarations / 62 expanded cases. No production changes or bug fixes.
Oxlint exited 0; formatting and diff checks passed. Tests and coverage were not run, per CI-only mode.
25% target not reached. Kept distinct trust/recovery assertions and the deadline helper used by the out-of-shard interruption suite. Coordinator review and hosted CI remain pending.
x7183
Replayed diff: +806/-1023 test/support LOC (net -217); lexical test declarations 49 → 48. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/transcripts/auto-start-retry.test.tssrc/transcripts/capture-append-drain.test.tssrc/transcripts/capture-stop.test.tssrc/transcripts/library.query-budget.test.tssrc/transcripts/library.test.tssrc/transcripts/live-summary.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed
05eb6b26c0e— shardx7183. Worktree clean; nothing pushed.Declarations remain 65 → 65; expanded cases 96 → 96. No cases deleted or folded. Compacted repeated library calls, export decoding, summary setup, diagnostics, and settlement tracking. All distinct assertions and lifecycle scenarios remain.
The 25%-per-file target was not met. Retry and stop suites were already tight; further cuts would obscure interleavings or remove distinct proof.
Formatting, plain oxlint, and diff checks passed. Tests and coverage were not run under CI-only mode. No production/support changes or bug fixes. Coordinator decision: accept this smaller preservation-first reduction.
x7181
Replayed diff: +760/-999 test/support LOC (net -239); lexical test declarations 41 → 41. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/gateway/worker-environments/store-node-enrollment.test.tssrc/gateway/worker-environments/store-projection.test.tssrc/gateway/worker-environments/store-recovery.worker.test.tssrc/gateway/worker-environments/store-retention.test.tssrc/gateway/worker-environments/store-runtime-refresh.test.tssrc/gateway/worker-environments/store-worker.test.tssrc/gateway/worker-environments/store.test-support.tssrc/gateway/worker-environments/transcript-commit.delivery-mirror.test.tssrc/gateway/worker-environments/transcript-commit.fixture.test-support.tsSource shard report (pre-replay totals, not fresh coverage):
Committed shard
x7181as457c295f734. Worktree clean; no push.Net LOC: 3,836 → 3,576 (−260, 6.8%), including the new shared fixture. The 25% target was not reached; further cuts risked obscuring distinct authority, recovery, and ordering checks.
Declarations 53 → 53; expanded cases 73 → 73. No cases deleted or folded. Consolidated repeated setup, message literals, consumption helpers, and assertion blocks. Added only
transcript-commit.fixture.test-support.ts(74 lines), shared exclusively by the two transcript files. No production changes or bug/flake fixes.Plain oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and check-changed were not run under CI-only mode. Hosted CI validation remains pending.x7182
Replayed diff: +1761/-2418 test/support LOC (net -657); lexical test declarations 88 → 78. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/plugins/official-external-plugin-catalog-envelope.test.tssrc/plugins/one-shot-diagnostics.test.tssrc/plugins/openai-compatible-embedding-provider.integration.test.tssrc/plugins/openai-compatible-embedding-provider.test.tssrc/plugins/path-safety.test.tssrc/plugins/payload-verification.test.tssrc/plugins/plugin-cache.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed x7182 as
e17aac224cc. Worktree clean; nothing pushed.Test LOC: 3,842 → 3,536, down 306 (8.0%). The 25%-per-file target was not met.
Declarations: 93 → 90. Statically counted expanded cases: 150 → 150. No cases deleted; six cases share three tables.
Consolidated repeated server lifecycle code, package fixtures, registry setup, and precise assertions. Retained all security, credential-ownership, and cleanup-ordering scenarios. No production/support changes or bug fixes.
Plain oxlint exited 0; formatting and diff checks passed. Tests, coverage, and check-changed were not run under CI-only instructions. Coordinator review and hosted CI remain pending.
x7184
Replayed diff: +883/-1368 test/support LOC (net -485); lexical test declarations 78 → 73. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/meeting-bot/browser-audio-capture-source.test.tssrc/meeting-bot/browser-controller.test.tssrc/meeting-bot/browser-session-control.test.tssrc/meeting-bot/chrome-transport.test.tssrc/meeting-bot/node-host.audio.test.tssrc/meeting-bot/participation-browser.test.tssrc/meeting-bot/participation.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed x7184 as
458a2835b74. Clean worktree; not pushed.Consolidated repeated fixtures, payloads, assertions, and cleanup. All 132 expanded cases remain by static inspection; declarations fell 88 → 87 through one two-row table. No cases or distinct assertions were deleted. The counter reports 120 expanded cases because it undercounts Chrome’s computed tables.
Plain oxlint exited 0; formatting and diff-check passed. Tests, coverage, builds, and Testbox were not run under CI-only mode. No production/support files changed; no bug fixes.
The 25%-per-file target was missed in seven files. Further reductions were held to preserve distinct authority, recovery, and lifecycle-interleaving proof. Hosted CI remains pending.
x7188
Replayed diff: +1363/-2318 test/support LOC (net -955); lexical test declarations 69 → 67. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/auto-reply/reply/commands-session-lifecycle.test.tssrc/auto-reply/reply/commands-session-params.test-support.tssrc/auto-reply/reply/commands-session-restart.test.tssrc/auto-reply/reply/commands-session-store.test.tssrc/auto-reply/reply/commands-session-usage.test.tssrc/auto-reply/reply/commands-status-subagents.test.tssrc/auto-reply/reply/commands-status.test.tssrc/auto-reply/reply/commands-stop-target.test.tssrc/auto-reply/reply/commands-subagents.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed x7188 as
8305891e79f114d457ca6b5d8ac2b5cb628b0dcd. Worktree is clean; nothing pushed.Test LOC: 3,864 → 3,541, down 323 lines (8.4%).
All 69 declarations / 92 statically expanded cases remain. Removed repeated fixtures, argument inspection, event-emission scaffolding, singleton-table machinery, and unused scenario branches. No cases were deleted or folded; no production or external support files changed.
Formatting,
git diff --check, and plain oxlint passed. Tests, coverage, and check-changed were not run, per CI-only instructions. No bug fixes.Coordinator decision: this falls below the 25% target. Remaining reductions were not sufficiently clear-cut to justify risking distinct behavior; hosted CI proof remains pending.
x7185
Replayed diff: +1084/-1440 test/support LOC (net -356); lexical test declarations 21 → 20. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
extensions/codex/src/app-server/run-attempt.steering.test.tsextensions/codex/src/app-server/run-attempt.turn-watches.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed shard x7185 as
38bf1006000. Worktree clean; nothing pushed.Declarations remain 37 → 37; expanded cases 46 → 46. Consolidated protocol fixtures, registration lookups, deferred gates, and repeated assertions. Removed unreachable steering-table alternatives; both retained rows exercise unfinished-answer behavior.
The 25%-per-file target was not reached. Distinct authority, cancellation, persistence, and ordering cases were retained. No production or shared-support files changed; no bug fixes.
Plain oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and typechecks were not run under CI-only instructions. Coordinator review and hosted CI remain pending.x7177
Replayed diff: +661/-1129 test/support LOC (net -468); lexical test declarations 64 → 56. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
extensions/slack/src/outbound-payload.test.tsextensions/slack/src/probe.transport.test.tsextensions/slack/src/progress-blocks.card.test.tsextensions/slack/src/question-finalization.test.tsextensions/slack/src/send.enterprise.test.tsextensions/slack/src/send.reconcile.test.tsextensions/slack/src/send.upload.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed shard x7177 as
76586d66460. Not pushed; worktree clean.LOC: 3,102 → 2,794, down 308 (9.9%). The 25%-per-file target was not met; this is a partial reduction.
Static counts: declarations 65 → 64 (−1.5%); expanded cases 79 → 78 (−1.3%). No cases folded.
Factored repeated payloads, controls, upload-failure setup, and assertions. Removed one duplicate question-delivery case:
removes action blocks and appends terminal contextretains action-ID selection, whilecarries the real WebClient question-card identity through upload and chunk progressretains upload/chunk/card identity proof. Distinct deadline, SSRF, signature, and ordering cases remain; Enterprise was left unchanged.Plain oxlint exited 0; formatting and diff checks passed. Tests, coverage, and check-changed were not run under CI-only mode. No production/support changes or bug/flake fixes. Coordinator review and hosted CI remain pending, including acceptance of the target shortfall.
x7180
Replayed diff: +1553/-1949 test/support LOC (net -396); lexical test declarations 58 → 55. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/gateway/server-methods/update-unexpected-error.test.tssrc/gateway/server-methods/usage.cost-checkpoint-memo.integration.test.tssrc/gateway/server-methods/usage.sessions-usage-cache.test.tssrc/gateway/server-methods/usage.sessions-usage-owner-attribution.integration.test.tssrc/gateway/server-methods/usage.sessions-usage.test.tssrc/gateway/server-methods/usage.status-cache.test.tssrc/gateway/server-methods/usage.test-support.tssrc/gateway/server-methods/usage.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed x7180 as
9b211a449aaf3fcbf414a580acc0ecae71576ceb. Worktree clean; not pushed.Declarations: 59 → 58. Expanded cases: 87 → 87; none deleted. Consolidated repeated fixtures/request plumbing and tabled the two skipped-date cases, retaining both timezone branches and their assertions.
The 25% target was not reached. Lifecycle/revocation, physical-owner attribution, redaction, and checkpoint-decoding scenarios were retained; the two unchanged files were already tight.
Formatting,
git diff --check, and plain oxlint passed (exit 0). Tests, coverage, and check-changed were not run, per CI-only mode. No production or test-support files changed; no bug/flake fixes. Hosted CI remains the runtime gate.x7186
Replayed diff: +1156/-1904 test/support LOC (net -748); lexical test declarations 69 → 63. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/commands/status-overview-rows.test.tssrc/commands/status-runtime-shared.test.tssrc/commands/system-agent-with-inference.test.tssrc/commands/triage-prompt.test.tssrc/commands/triage-recovery.test.tssrc/commands/triage-run.test.tssrc/commands/triage-target.test.tsSource shard report (pre-replay totals, not fresh coverage):
Committed shard x7186 as
a0053f07b19703ce773250eb802223a1a60c2555. Worktree clean; nothing pushed.Declarations 79 → 79; statically counted expanded cases 128 → 128. No cases deleted or folded. Consolidated fixtures, direct inference mock setup, and repeated assertions; removed unreachable alternatives from singleton tables. All reachable assertions remain.
The per-file 25% target was missed except for inference. Remaining triage code largely protects distinct consent, cancellation, authority, redaction, installation-target, child-process, and cleanup behavior.
Formatting, plain oxlint (exit 0), and diff-check passed. Tests, coverage, and check-changed were not run under CI-only mode. No production/support changes or bug fixes. Coordinator follow-up: review the target shortfall and run affected tests in hosted CI.
x7187
Replayed diff: +265/-427 test/support LOC (net -162); lexical test declarations 64 → 64. Expanded cases are documented in the source report below; lexical counts do not expand tables.
Changed files after replay:
src/agents/harness/gateway-question-dispatch.test.tssrc/agents/harness/host-capability.annotation.test.tssrc/agents/harness/host-capability.node-authority.test.tssrc/agents/harness/host-capability.reply-media.test.tssrc/agents/harness/host-capability.shard.test-support.tssrc/agents/harness/host-capability.test.tssrc/agents/harness/host-capability.workspace-readiness.test.tsSource shard report (pre-replay totals, not fresh coverage):
x7187 committed as
217baf7c5f101355895fdb0917fe510632de0c68. Clean worktree; not pushed.Declarations remain 71 → 71; statically expanded cases 118 → 118. No cases deleted or folded. Consolidated admission/tool fixtures, workspace-wait setup, question-result assertions, and media cleanup. No production changes or bug/flake fixes.
Formatting, plain oxlint (exit 0), and
git diff --checkpassed. Tests, coverage, and check-changed were not run, per CI-only instructions.The 25%-per-file target was not met. Distinct authority, lifecycle, transcript, and media assertions remain intact; source-lifetime and delegation were left unchanged. Hosted CI validation remains pending.
Transcript conflict: kept current-main reorder/title table and identity-based assertions in status.producer.test.ts instead of the old title-only/positional rewrite. Other disjoint fixture reductions remain. The later PR-diagnostics deindent/helper-only rewrite was dropped for that file to preserve the reviewed resolution and all newer cases.
Worker-enrollment conflict: retained both newer closed-invocation/fresh-manager first-device-redemption tests, used the shared beforeEach provisioning setup, and kept the incoming held-result/ensure-observation helpers for the existing concurrency cases. Transcript same-date/next-date ID-reconciliation cases were also retained.
Embedding-provider import conflict: retained the newer Agent/Dispatcher observation imports and added the Server type needed by the shared listener helper; removed only the now-unused Socket import.
The subsequent broad embedding-provider deindent/fixture rewrite was dropped for that file because it overlaps newer caller-owned HTTP-deadline and provider behavior cases. The earlier listener cleanup remains; other files in the commit remain applied.
Meeting-bot conflict: preserved all four native-outcome retry-rejection cases (succeeded, failed, uncertain, unsupported), rather than reverting to the old success-only case. Other fixture reductions were retained.
Dropped the subsequent node-host.audio.test.ts and participation.test.ts rewrite hunks: their old helper shapes overlap newer bounded-input-byte tests and the four-state correction table. The first-pass cleanup in both files remains, as do all disjoint second-pass changes.
Slack conflicts: dropped the old outbound-payload.test.ts and reply-blocks.test.ts cleanup hunks, preserving the substantially expanded current-main fallback/accessibility/authored-text/message-boundary contracts and helpers. Other Slack files remain in the batch.
Fresh-main rebase after initial publication: dropped the overlapping realtime-engine.test.ts cleanup hunk to preserve main's removal of an obsolete logging expectation. Hosted CI and review are restarted on the replacement head; the original head is not runtime proof.
Review and CI repair
The first completed CI run (38922835809) exposed stale fixture identifiers, an unbound matcher alias, an inverted Slack expectation, incomplete fixture types, and lost mock-isolation explanations. Corrections restore the missing runId, call current fixture helpers, retain matcher receivers, preserve expected ordering, build directives through the parser, use lexical fixture functions, and explain isolated mocks. Ambiguous protocol, native-resource, transcript-commit, and transcript-status rewrites were dropped rather than widened or cast around. No assertions were weakened and no timeouts, retries, or baseline allowances were added. The replacement head requires fresh hosted CI.
Independent four-pass review: accepted the absent-plugin fixture finding and corrected the registry ownership identity. Rejected the unused-timeout finding: probe.transport.test.ts asserts the timeout spy at line 111. Rejected the browser-context leak finding: createChatFlowE2eSuite enables trackBrowserContexts, and the canonical suite awaits closeOpenBrowserContexts in afterEach. A correction-only review follows the repair commit.
The original CI also reported failures in untouched chat-pane-tool-icons and node-worker-launch-wire tests. These are not claimed as proven pre-existing or waived; the new head must receive an acceptable result before merge. The usage-context integration test was incorrectly grouped with untouched paths in the earlier report; its batch-owned cleanup is now dropped as described below.
Second completed CI run (38927371969): dropped the cleanup of test/scripts/pr-worktree-provision.test.ts and its test-support file because the consolidated checkout-hook receipt assumed a zero previous SHA for relative and branch policies. Restored both files exactly to the branch main baseline. Also dropped src/commands/triage.test.ts cleanup after its updater-decline fixture failed; retained the original main assertions instead of adapting them for green. All 30 source commits remain represented, with these file-level hunks removed.
The correction-only independent review of 9b170f61 completed scoped-clean at P0-P2. Subsequent corrections restore main-baseline files rather than add new behavior. Local plain formatting, lint and diff checks passed.
The fresh run (38930508743) repeated the duplicate guard and unexplained mock export failure in untouched src/flows/doctor-plugin-source-captures.test.ts. Those are not proven pre-existing under the required waiver and are not waived. Source verification also corrected the earlier classification of usage.sessions-usage-context-lifecycle.integration.test.ts: it WAS batch-owned. Its new table supplied session metadata where SessionAccessScope was contextually inferred, causing TS2353 at line 107. Dropped that entire file cleanup and restored the branch main baseline. Fresh CI remains the merge gate. Earlier untouched UI-icon and worker-wire tests passed on the second completed run; their earlier failures are not claimed fixed.
Final fresh-main integration: rebased without conflicts onto ecdf8d3, which includes cb196c3 and its exact doctor mock-isolation correction. All 33 branch commits replayed. The four restored files no longer contribute batch changes. The duplicate guard remains a hosted-CI decision; no baseline proof or merge waiver is claimed.
Final ratchet maintenance: config/test-mock-exports-baseline.txt +0/-18 lines, separate from production and test-code LOC. Removed exactly the 18 obsolete entries printed by run 38932355958 after verifying the corresponding removed mocks or explicit mock-isolation explanations. This only shrinks the allowance; no new exemptions. The same run reports an unrelated terminal-panel-restore.test.ts pointerdown/selection failure (expected one restored session, received zero). That file and its production owner are unchanged by this batch; no pre-existing-failure waiver is claimed.
Ownership
No changed paths match the checked-in CODEOWNERS rules. This batch changes UI, agents, Gateway, plugin, Slack, transcript, worker-environment, and maintainer-tooling tests and a shrink-only test-mock baseline; it makes no product or public API ownership changes.