Repository navigation
test(runtime,ui): remove low-value tests (batch d342) - #178793
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR consolidates repeated fixtures and assertions across runtime, Slack, and Control UI tests without changing production code. Example: A streamed reply survives a browser reconnect and is then stopped.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored cleanup open; source review found no concrete introduced defect in the retained test contracts. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese suites feed synthetic requests, transport faults, and lifecycle events through runtime owners and browser fixtures, then assert observable results and cleanup. flowchart LR
A[Test fixtures] --> B[Runtime owners]
A --> C[Control UI browser]
C --> D[Gateway transport]
D --> B
B --> E[State and delivery results]
E --> F[Contract assertions]
C --> F
Technical reviewBest possible solution: Retain the focused fixture consolidation and existing behavioral assertions, then merge when the existing CI gate passes. Do we have a high-confidence way to reproduce the issue? This PR addresses test duplication rather than a reported product failure; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? The consolidation reuses existing fixtures and preserves the inspected independent failure cases without introducing another production owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f3ff0d52ff7. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
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 20, 2026, 5:56 PM ET / 21:56 UTC. |
06b4434 to
b681be7
Compare
* test(markdown): deslop z0430 tests * test(markdown): deslop z0430 tests * test(logging): deslop z0432 tests * test(logging): deslop z0432 tests * test(gateway): deslop z0431 tests * test(gateway): deslop z0431 tests * test(gateway): deslop z0431 tests * test(ui): deslop z0435 tests * test(ui): deslop z0435 tests * test(harness): deslop z0433 tests * test(harness): deslop z0433 tests * test(harness): deslop z0433 tests * test(cron): deslop z0436 tests * test(cron): deslop z0436 tests * test(cron): deslop z0436 tests * test(acp): deslop z0437 tests * test(acp): deslop z0437 tests * test(acp): deslop z0437 tests * test(chat): deslop z0439 tests * test(chat): deslop z0439 tests * test(chat): deslop z0439 tests * test(ui): deslop z0434 tests * test(ui): deslop z0434 tests * test(ui): deslop z0438 tests * test(ui): deslop z0438 tests * test(ui): deslop z0438 tests * test(ui): deslop z0440 tests * test(ui): deslop z0440 tests * test(ui): deslop z0440 tests * test(slack): deslop z0441 tests * test: retain authority and lifecycle regression coverage * test(logging): preserve warning assertion semantics * test: preserve typed fixtures and narrowing contracts * test: retain bound mocks and scoped navigation fixtures * test(chat): match gateway request fixture contract
What Problem This Solves
Reduces repetitive fixtures and low-value duplicate test code across the runtime and Control UI without changing production behavior.
User Impact
No user-visible behavior change, configuration migration, or production-code change. Existing security, authority, cancellation, lifecycle, and rendering contracts remain the retention bar.
Why This Change Was Made
Replays all 30 supplied campaign commits for batch d342 onto main, most recently rebased onto
29ce97ac8d162eb44ea993d72918c4f4e7582724(original pinned main8f0973e37405d683e242e217f4d7c30a1efc4118). Consolidates setup and equivalent assertion sequences and shares narrowly scoped test fixtures. Conflicting file changes were omitted rather than overwriting newer main coverage or reviving retired tests. No whole commit was skipped.Evidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <75 changed TS/TSX files>: passed; no additional changes.node_modules/.bin/oxlint -c .oxlintrc.json <75 changed TS/TSX files>: exit 0.git diff --check 8f0973e37405d683e242e217f4d7c30a1efc4118: passed.openclaw/ci-gateis the runtime acceptance gate; CI duration is available in this PR's checks.fs.accessremains in use, and plain oxlint passes.Per-shard replay totals
LOC includes test helpers. Declaration counts are static
it/testcall-site counts (including parameterized declarations), not executed or expanded case counts. They describe the final replay versus pinned main, not the earlier individual shard report snapshot.The supplied shard reports contain no measured coverage totals: each explicitly states that tests and coverage were not run under CI-only instructions. No coverage-retention percentage is claimed. Most original shard reports fell below their earlier 25% reduction target; this replay does not force further deletions to reach that target.
Files by shard
z0430
ui/src/components/markdown-dom-ref.test.tsui/src/components/markdown-highlight.test.tsxui/src/components/markdown-session-links.test.tsz0431
src/gateway/chat-input-recovery.test.tssrc/gateway/cli-session-history.claude-snapshot.test.tssrc/gateway/client.device-auth.test.tssrc/gateway/client.identity.test.tssrc/gateway/composer-prediction-completion.test.tssrc/gateway/config-reload.telegram-policy.test.tsz0432
src/logging/diagnostic-support-bundle.test.tssrc/logging/diagnostic-worker-gc-profile.test.tssrc/logging/log-file-path.test.tssrc/logging/log-file-size-cap.test.tssrc/logging/log-tail-redaction.test.tssrc/logging/logger-env.test.tssrc/logging/logger-file-transport.test.tsz0433
src/agents/harness/settled-turn-finalization-result.test.tssrc/agents/harness/tool-authority.runtime.participants.test.tssrc/agents/harness/tool-authority.runtime.test-support.tssrc/agents/harness/tool-invocation.test.tssrc/agents/harness/tool-result-facts.test-support.tssrc/agents/harness/tool-result-facts.test.tssrc/agents/harness/tool-surface-bridge.diagnostics.test.tssrc/agents/harness/workspace-context.test.tsz0434
ui/src/e2e/chat-reasoning-visibility.e2e.test.tsui/src/e2e/chat-reconnect-continuity.real-gateway.e2e.test.tsui/src/e2e/chat-reply-preview-recovery.e2e.test.tsui/src/e2e/chat-restart-resume.e2e.test.tsui/src/e2e/chat-retained-pane-escape.e2e.test.tsui/src/e2e/chat-retained-pane-hydration.e2e.test.tsui/src/e2e/chat-scope-read-gates.e2e.test.tsui/src/e2e/chat-send-ack-ownership.e2e.test.tsz0435
ui/src/e2e/new-session-page.catalog-bootstrap.e2e.test.tsui/src/e2e/new-session-page.device-stop.e2e.test.tsui/src/e2e/new-session-page.fast-mode-preferences.e2e.test.tsui/src/e2e/new-session-page.host-remediation.e2e.test.tsui/src/e2e/new-session-page.incognito-navigation.e2e.test.tsui/src/e2e/new-session-page.navigation-fixtures.test-support.tsz0436
src/cron/service.cross-tick-admission.test.tssrc/cron/service.failure-alert-notifications.test.tssrc/cron/service.list-page-sort-guards.test.tssrc/cron/service.manual-delivery.test.tssrc/cron/service.removal-postcommit.test.tssrc/cron/service.schedule-maintenance.test.tsz0437
src/acp/control-plane/manager.cancel-session.incognito.worker.test.tssrc/acp/control-plane/manager.cancel-session.producer-custody.worker.test.tssrc/acp/control-plane/manager.cancel-session.test.tssrc/acp/control-plane/manager.turn-delivery.test.tsz0438
ui/src/e2e/chat-lifecycle.test-support.tsui/src/e2e/chat-source-previews.e2e.test.tsui/src/e2e/chat-source-previews.test-support.tsui/src/e2e/chat-split-narrow.e2e.test.tsui/src/e2e/chat-startup-wait.e2e.test.tsui/src/e2e/chat-steer-deferred-custody.e2e.test.tsui/src/e2e/chat-steer-deferred-custody.real-gateway.e2e.test.tsui/src/e2e/chat-stop-owned-exec.real-gateway.e2e.test.tsui/src/e2e/chat-stop-response-ownership.e2e.test.tsz0439
ui/src/pages/chat/offline-account-scope.test.tsui/src/pages/chat/outbox-legacy-account.test.tsui/src/pages/chat/processes-panel-data.test.tsui/src/pages/chat/route-resolution-handoff.test.tsui/src/pages/chat/route-resolution-identity.test.tsui/src/pages/chat/route-resolution.test-support.tsui/src/pages/chat/session-approval-projection.test.tsui/src/pages/chat/session-prefetch.test-support.tsz0440
ui/src/app/router-outlet-solid.test.tsxui/src/app/server-prefs.tab-icon.test.tsui/src/app/service-worker-refresh.runtime.test.tsui/src/app/session-placement-startup.test-support.tsui/src/app/shell-layout-traits-solid.test.tsxz0441
extensions/slack/src/monitor/allow-list.test.tsextensions/slack/src/monitor/auth.test.tsextensions/slack/src/monitor/dm-auth.test.tsextensions/slack/src/monitor/event-scope.test.tsextensions/slack/src/monitor/http-handler.test.tsConflict resolution: omitted file changes
For each entry below, retained the entire pre-pick current-main/replayed file and omitted this commit's changes to that file; other nonconflicting changes in the same commit remain. Markdown overlaps depended on absent helper refactors; Gateway/logging overlaps included newer assertions; Cron overlaps would revive moved/retired tests; service-worker overlap included newer activation cases.
8ef32f9f2df7:ui/src/components/markdown-element-refs-solid.test.ts,ui/src/components/markdown-file-tooltip.browser.test.ts,ui/src/components/markdown-human-mentions.test.ts,ui/src/components/markdown-json.test.ts,ui/src/components/markdown-streaming.test.ts.89bf91f41f70:ui/src/components/markdown-element-refs-solid.test.ts,ui/src/components/markdown-human-mentions.test.ts,ui/src/components/markdown-streaming.test.ts.6dd0745fede3:src/logging/level-filter.test.ts.272d0347f2c2478d4ad718f014069a481ef00b62:src/gateway/chat-input-recovery.test.ts,src/gateway/config-reload-plan.test.ts.032ddba5a05043559ac112cfeaf42454d24b07ac:src/gateway/chat-input-recovery.test.ts,src/gateway/config-reload-plan.test.ts.a4944b47ed43a5c52f2d7952e1d0cc9375dadc11:src/cron/service.scheduler-regressions.test.ts.41d86747ad25a0ff338d26a6651cf95e54fbd2cd:src/cron/service.scheduler-regressions.test.ts.7e0b8024e5ce563c6f7aea661aedf90977ba8b41:src/cron/service.scheduler-regressions.test.ts.4cfcca578621440d76efd47b4c0d26d1af7bbaba:ui/src/app/service-worker-refresh.runtime.test.ts.Review corrections
Restored these files exactly to pinned main rather than retaining unsafe cleanup:
src/acp/control-plane/manager.operator-model-policy.test.ts,src/acp/control-plane/manager.initialize-session.test.ts,src/acp/control-plane/manager.terminal-signals.test.ts,src/agents/harness/tool-authority.runtime.admission.test.ts. This preserves policy-change notifications, host-admission publication/cleanup security checks, failed-initialization rollback, and queued same-ID terminal custody. All 30 supplied commits were replayed; this separate corrective commit drops their changes in these four files. Final static checks pass on 75 files; no local runtime tests were run.CI correction
On head
37b70138b238, checks-node-changed-4 found two batch-caused test assertion errors. The JSON warning case checked unescaped quotes against serialized JSON; the corrected case asserts the decoded message, preserving the compact-case raw-text assertion. The subprocess case grouped an absenterrorproperty intotoMatchObject; it now separately assertsresult.erroris undefined and exit status is zero, matching the original contract. Both focused corrections passed independent P0–P2 review and the permitted static checks. No local tests were run; the new exact head receives fresh hosted CI.Typecheck, lint, and E2E corrections
The completed run on
b9c52f2b047dreported seven failed jobs; all logs were inspected once. Restored these additional files exactly to pinned main, dropping their cleanup:src/cron/service.execution-identity.test.ts,src/gateway/config-reload.operation-policy.test.ts,ui/src/app/server-prefs.test-support.ts,ui/src/app/server-prefs.adoption.test.ts,ui/src/app/shell-viewport.test.ts,ui/src/e2e/new-session-page.attachment-url-lifecycle.e2e.test.ts,ui/src/e2e/new-session-page.draft-handoff.e2e.test.ts. This preserves definedness narrowing, literal config types, mutable fixture setup, shared mock signatures, FileReader method capture, and new-session-scoped attachment selection. Kept the remaining cleanup while restoring a boundMockWebSocket.terminate()method and using the existingcreateTestGatewayClient(request)fixture in both replacement branches. No cast, suppression, retry, timeout, or weakened assertion was added.Relevant failed-job evidence: core type 1, core type 3, core type 4, core type 5, core lint 1, core lint 2, and UI E2E. The earlier logging assertion correction passed its test shard on this run.
Both subsequent correction reviews are scoped-clean for P0–P2. Final local formatting, plain oxlint, and diff checks pass. Runtime/typecheck proof remains the fresh-head hosted gate. All 30 supplied commits were replayed; five follow-up commits preserve reviewed contracts and repair CI-proven regressions.
Final mock-handler contract correction
On
9ff329b451f3, core type 3 exposed the remaining signature mismatch in the short-session request mock: its unused parameter requiredRecord<string, unknown>, butGatewayRequestHandleraccepts optionalunknown. The mock now matches that public callable contract, without a cast or runtime change. Its independent P0–P2 review is scoped-clean. On that prior head, this was the only failed job reported; the final head is06b4434166096117c65a3fc34563124e80ec46afand awaits fresh CI acceptance.Settlement on current main
Rebased onto
29ce97ac8d162eb44ea993d72918c4f4e7582724to include5d80482379b376f9ad921b6acff0df9bc2ce8c80, which fixes the unrelatedtypescript(unbound-method)error insrc/flows/doctor-repair-flow.ts:73reported by core lint 2. The old aggregate gate failed only for that stripe. The cancelled context job had completed every executed step successfully, including its evidence check.Preserved current main's entire
config-reload.operation-policy.test.tsat all three replay conflicts, retaining its newer tool-policy cases. The final PR patch is byte-for-byte identical to the previously reviewed patch (SHA-256453ff8a589a52bafa99dc4faae7bb446dd829a32d276b6155b3889088f1ea7ab). No additional batch fix or assertion/timeout change was needed. Plain oxlint 1.87.0, oxfmt 0.72.0, andgit diff --checkpass on the final 75-file diff. Existing matching dependencies were reused read-only; no install was modified. CI-only: no local tests, typechecks, or leases. Current head:b681be72c17c845067b0d6fbde159addbb850820; exact-head CI is the acceptance proof.