Repository navigation
test(sessions,ui,gateway): remove low-value tests (batch d403) - #179786
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d61759ca51
ℹ️ 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".
|
|
||
| const tempDirs = useAutoCleanupTempDirTracker(afterEach); | ||
|
|
||
| it("reads complete lifecycle fences in one statement and observes foreign commits after snapshots", () => { |
There was a problem hiding this comment.
Preserve the atomic delete-snapshot contract
Keep or move this test when deleting the file. For concurrent SQLite writers, this is the only test that verifies readSessionStateDeleteSnapshot obtains every deletion fence in one statement, retains a consistent WAL snapshot during a peer commit, and observes that commit afterward; the remaining maintenance-writer test only compares a snapshot during one lifecycle mutation and does not exercise peer writes or statement count. Without this contract, a later split query can produce a torn snapshot and allow cleanup to delete changed session data undetected. docs/reference/database-schemas/worker-access-inventory.md:122 also explicitly calls for retaining the changed-user-data deletion check.
AGENTS.md reference: AGENTS.md:L78-L80
Useful? React with 👍 / 👎.
|
Current head: The remaining tooling failure is proven pre-existing on the latest scheduled-main CI:
This batch does not modify the failing test or the worker-budget calculation it exercises. The changed planner inventory only removes relocated/retired test paths, not worker-budget policy. A fresh main fetch found no subsequent repair of that assertion/calculation. Another campaign changed test-support helpers, but the newer hourly-main run still exhibits this exact failure. All 88 CI jobs have completed. All three UI shards pass, including the WebKit height-budget test after the narrowly reviewed animation-settlement correction. Core type/lint and PostgreSQL conformance pass. The only failures are the exact inherited planner test above and its aggregate openclaw/ci-gate failure. Earlier-head failures are superseded, not claimed as passing evidence. This satisfies the maintainer-authorized inherited-failure merge exception for this exact head. |
125df2f to
b88e5b4
Compare
…law#179786) * test(msteams): deduplicate y0116 owner coverage * test(new-session): deslop y0115 tests * test(sessions): deslop y0117 tests * test(sessions): deslop y0118 tests * test(gateway): deslop y0121 tests * test(gateway): consolidate y0121 test families * test(gateway): share y0121 fixtures and policy assertions * test(plugins): deslop y0120 tests * test(plugins): consolidate y0120 contract families * test(infra): deslop y0119 tests * test(config): deslop y0122 tests * test(config): consolidate y0122 test family * test(config): merge y0122 reader fixtures * test(chat): deslop y0124 tests * test(chat): consolidate y0124 projection and permission proof * test(subagents): deslop y0125 tests * test(subagents): consolidate y0125 family fixtures * test(subagents): consolidate y0125 cancellation scenarios * test(gateway): deslop y0123 tests * test(chat): retain split projection proof within lint budget * test: preserve distinct proof and repair partial replay fixtures * test(ui): retain recovery validation in its original suite * test: repair consolidated fixture typing and callback contracts * test(ui): settle overlay animation before measuring height budget
What Problem This Solves
Replay the d403 test-reduction batch onto pinned main 3e46d30. Consolidate repeated fixtures and assertions and retain owner-level behavior checks. Current-main tests win when older fixture or file-move assumptions conflict. No production behavior changes.
Evidence
Replay decisions
Applied 19 of 30 supplied commits, preserving subjects, plus five corrective follow-ups. Skipped entire commits: 8679f7c47c0e, 3bf3e6037b48 (New Session moves conflict with current fixtures); f4d583af40ab, 93c25ee51f73, cfa28ddd4bc7 (SQLite consolidation dependencies and newer owner fixtures); be60b1d21c1e (plugin scanner move conflicts); 42e273c92a19, 636949abe459 (infra moves and dependent fixtures conflict); d1d2b421cd79 (newer Chat preferences); 25a116010636, 7f657ccb2511 (Gateway identity/subscription moves and dependent proof conflict).
Partial commits retain current-main versions of: Teams channel.actions, graph-upload, graph, monitor.lifecycle, reply-stream-controller, send; New Session draft-submission-flow; sessions session-snapshot-merge, transcript-reconcile.lifecycle-phases, sqlite-prepared-admission support; Gateway net, question-manager, channel-avatar-http, workspace-icon-http, control-ui-session-entry; plugins plugin-entry-guardrails, scheduled-turns (first pass), session-entry-projection, boundary-invariants (second pass); infra run-node and windows-launcher-encoding; SQLite entry-revision and entry-writes (first pass), assistant-match and entry-admission (second pass); subagents control.warm-preparation. The clean remaining hunks are retained. Omitted the new image HTTP helper with both conflicting consumers. Dropped the paired Chat position projection-to-rail move after lint found the destination exceeded max-lines; both original suites remain. No lint thresholds, assertions, retry policies, or timeout budgets were weakened.
Review and CI corrections
Independent full-diff review reported nine findings. Accepted six: repaired the undefined SQLite namespace; restored the stale cancellation callback, atomic deletion snapshot, GitHub repository/actor binding, failed-revocation closure, and tagged scheduler cleanup proof. Rejected three with retained proof: catch-up bounds and quoted result data at subagent-catchup.runtime-facts.integration.test.ts (bounds retained results); exact object-token output in ws-log.redaction.test.ts; direct terminal setPluginRunContext rejection in the filtered end/error table of run-context-lifecycle.contract.test.ts. Corrective review is scoped-clean through P2.
CI on the first head found the undefined SQLite namespace, a removed scheduler helper still called by newer tests, a cold-admission observer absent from the preserved support file, and an optional killIntent assertion that required an own key rather than accepting the correct absent key. Fixed the namespace and property assertion; dropped the complete scheduler and cold-admission file reductions. Restored factory and retirement files completely, and the atomic deletion test. No production changes or weakened assertions. PR context check required exact template headings; corrected them. Two tooling failures are outside batch source: duplicated memory-core Postgres test assignment and canonical worker-budget expectation. Attribution/green proof remains required before merge.
The second head exposed one more partial test move: its placement-recovery destination called an unavailable write helper. Restored both original recovery suites. Main also changed the overlay owner in #179647 after the prior base; rebased all 22 commits cleanly onto pinned main 3e46d30. oxfmt and plain oxlint passed again; diff-check passed. The new exact head receives fresh CI. No tests or Testbox ran locally.
The next hosted run caught two parameterized-test typing errors and type-aware lint issues in the consolidated fixtures. Marked the optional scope-table callback argument optional, typed the Windows options parameter, made the detached disposal callback an arrow, and made callback return values explicit. Split the archive fixture synchronous callback from its asynchronous callback to preserve the original no-await race boundary, and removed an obsolete lint suppression. Local validation remains format, plain lint, and diff-check only. Unchanged UI tests also failed on that run; these are not assumed pre-existing and require fresh-head CI or exact hourly-main evidence before merge.
Hosted CI on 4cbedd1 passed the corrected type/lint contracts and every substantive job except the unchanged WebKit overlay height-budget test. It measured 477.58px instead of 500px while the entry scale transition was still active (earlier heads measured 497.18px and 489.09px). The supplemental three-line change in ui/src/components/solid/overlay-style.browser.test.tsx uses the existing finishElementAnimations helper before the layout measurement. It retains the exact 500px, viewport, focus, and final-item visibility assertions; no delays, retries, skips, tolerance changes, or production changes. Scheduled-main UI jobs passed, so this failure is not claimed as inherited. The new exact head receives fresh hosted CI.
Per-shard replay inventory
LOC below is actual current replay test/support diff. Declaration sites are lexical static it/test sites, including parameterized declarations, not expanded or executed cases.
y0115
Actual replay: 11 test/support files, +759 / -1062 LOC; static declarations 83 → 79. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Family LOC: 11,225 → 10,903, down 322 lines (2.87%). Declarations: 253 → 249. Statically counted expanded cases: 460 → 460; no cases deleted.
ui/src/pages/new-session/checkout-chip.test.ts(+139/-200)ui/src/pages/new-session/composer.test.tsx(+138/-309)ui/src/pages/new-session/draft-native-terminal-start.test.ts(+2/-8)ui/src/pages/new-session/draft-submission-background.test.ts(+2/-8)ui/src/pages/new-session/draft-submission-flow.test-support.ts(+20/-1)ui/src/pages/new-session/draft-submission-title.test.ts(+3/-8)ui/src/pages/new-session/draft-submission-worktree-cross-tab.test.ts(+0/-246)ui/src/pages/new-session/draft-submission-worktree-name.test.ts(+0/-172)ui/src/pages/new-session/draft-submission-worktree-preferences.test.ts(+385/-11)ui/src/pages/new-session/session-placement-submit.test.ts(+56/-73)ui/src/pages/new-session/where-chip.test-support.ts(+14/-26)y0116
Actual replay: 1 test/support files, +24 / -0 LOC; static declarations 9 → 9. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Shard LOC: 10,605 → 9,819 (−786, 7.4%). Including the shared reply helper, net reduction is 780 lines. Static declarations: 287 → 272; counter-expanded estimate: 374 → 370. The 35% target was not reached without removing distinct behavior.
extensions/msteams/src/send.handoff.test.ts(+24/-0)y0117
Actual replay: 5 test/support files, +192 / -293 LOC; static declarations 31 → 31. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: y0117: 11,310 → 11,162 lines, −148 (1.31%). The 35% target was not met. All 217 declarations remain; static expanded count remains 308. No cases or files deleted. Formatting,
git diff --check, and plain oxlint exited 0. No tests, coverage, Testbox, builds, or check-changed ran, as required by CI-only mode. The counter’s obsolete TypeScript-5 lookup was adapted in memory to installed TypeScript 6 solely for static counting.src/config/sessions/session-transcript-reconcile.bootstrap.test.ts(+2/-15)src/config/sessions/session-transcript-reconcile.fixtures.test-support.ts(+56/-6)src/config/sessions/session-transcript-reconcile.lifecycle.test.ts(+27/-91)src/config/sessions/session-transcript-search.test.ts(+31/-81)src/config/sessions/session-transcript-search.worker.test.ts(+76/-100)y0118
Actual replay: 12 test/support files, +207 / -273 LOC; static declarations 55 → 55. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Family LOC: 11,585 → 11,506 (−79, −0.68%). The 35% target was not met. All 154 declarations / 238 statically expanded cases remain unchanged; these are static counts, not executed-test results.
src/config/sessions/session-accessor.sqlite-history-cache.test.ts(+1/-4)src/config/sessions/session-accessor.sqlite-history-events.legacy.test.ts(+20/-43)src/config/sessions/session-accessor.sqlite-history-events.test.ts(+15/-34)src/config/sessions/session-accessor.sqlite-history-input-visibility.test.ts(+2/-8)src/config/sessions/session-accessor.sqlite-history-query-plan.test.ts(+21/-40)src/config/sessions/session-accessor.sqlite-history.test-support.ts(+48/-0)src/config/sessions/session-accessor.sqlite-maintenance-close.test.ts(+13/-27)src/config/sessions/session-accessor.sqlite-maintenance-worker.test.ts(+7/-44)src/config/sessions/session-accessor.sqlite-maintenance.test-support.ts(+46/-23)src/config/sessions/session-accessor.sqlite-message-cut-native.test.ts(+4/-8)src/config/sessions/session-accessor.sqlite-message-cut.test-support.ts(+5/-1)src/config/sessions/session-accessor.sqlite-message-cut.test.ts(+25/-41)y0119
Actual replay: 12 test/support files, +701 / -1207 LOC; static declarations 153 → 148. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Shard y0119: 10,780 → 10,251 LOC, removing 529 lines (4.91%). This falls short of 35%; further cuts would remove distinct platform, security, error, or lifecycle proof. Static declarations: 293 → 286; expanded cases: 494 → 494. No cases or files deleted.
src/infra/diagnostic-error-metadata.test.ts(+11/-40)src/infra/diagnostic-events.test.ts(+5/-10)src/infra/diagnostic-trace-context.test.ts(+3/-7)src/infra/http-body.response.test.ts(+126/-197)src/infra/infra-runtime.test.ts(+2/-19)src/infra/npm-managed-root.test.ts(+104/-315)src/infra/openclaw-process-census.windows.test.ts(+111/-160)src/infra/openclaw-root.test.ts(+31/-47)src/infra/question-channel-runtime.test.ts(+24/-41)src/infra/question-gateway-resolver.test.ts(+109/-147)src/infra/run-node.live-dist.test.ts(+45/-64)src/infra/run-node.runtime-postbuild.test.ts(+130/-160)y0120
Actual replay: 10 test/support files, +392 / -1060 LOC; static declarations 113 → 112. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Family LOC: 8,782→8,204 (−578, −6.6%). Declarations: 169→166; statically expanded cases: 215→213. The 35% target was not safely achievable while preserving distinct contracts.
src/plugins/contracts/boundary-invariants.test.ts(+10/-21)src/plugins/contracts/config-footprint-guardrails.test.ts(+22/-50)src/plugins/contracts/extension-test-api-consumption.test.ts(+3/-4)src/plugins/contracts/host-hooks.contract.test.ts(+122/-287)src/plugins/contracts/plugin-sdk-subpaths.test.ts(+42/-235)src/plugins/contracts/plugin-testing-harness.contract.test.ts(+5/-37)src/plugins/contracts/plugin-tool-contracts.test.ts(+33/-123)src/plugins/contracts/run-context-cleanup.contract.test.ts(+0/-131)src/plugins/contracts/run-context-lifecycle.contract.test.ts(+146/-147)src/plugins/contracts/runtime-seams.contract.test.ts(+9/-25)y0121
Actual replay: 12 test/support files, +820 / -1098 LOC; static declarations 127 → 93. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: LOC: 11,220 → 11,084 (−136, 1.21%). Static declarations: 326 → 312; expanded cases: 588 → 587. The 35% target was not achievable without dropping distinct coverage.
src/gateway/assistant-avatar-http.test.ts(+92/-2)src/gateway/assistant-avatar.test.ts(+0/-111)src/gateway/assistant-identity.test.ts(+17/-23)src/gateway/channel-health-policy.test.ts(+29/-55)src/gateway/credentials-secret-inputs.test.ts(+0/-143)src/gateway/credentials.test.ts(+293/-234)src/gateway/device-authz.test-helpers.ts(+11/-25)src/gateway/method-scopes.own-session.test.ts(+60/-111)src/gateway/model-account-connect.compat.test.ts(+0/-197)src/gateway/model-account-connect.worker.test.ts(+249/-84)src/gateway/project-github-search.test.ts(+69/-105)src/gateway/ws-log.test.ts(+0/-8)y0122
Actual replay: 17 test/support files, +2812 / -3616 LOC; static declarations 126 → 114. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Test LOC: 11,420 → 11,081. Including the new 42-line helper: 11,420 → 11,123, down 297 lines (2.60%). Static declarations: 189 → 188; counter-reported expanded cases: 278 → 276 (dynamic tables are undercounted).
src/config/sessions/session-accessor.sqlite-bounded-context.test.ts(+448/-589)src/config/sessions/session-accessor.sqlite-branch-fixtures.test-support.ts(+42/-0)src/config/sessions/session-accessor.sqlite-branch-summaries.test.ts(+46/-117)src/config/sessions/session-accessor.sqlite-branches.test.ts(+58/-184)src/config/sessions/session-accessor.sqlite-canonical-read.test.ts(+0/-249)src/config/sessions/session-accessor.sqlite-cleanup-generation-race.test.ts(+0/-274)src/config/sessions/session-accessor.sqlite-cleanup-race.test.ts(+797/-324)src/config/sessions/session-accessor.sqlite-cleanup-reclamation.test.ts(+0/-258)src/config/sessions/session-accessor.sqlite-cold-read.test.ts(+3/-15)src/config/sessions/session-accessor.sqlite-creation-worker.test.ts(+677/-694)src/config/sessions/session-accessor.sqlite-data-version.test.ts(+246/-14)src/config/sessions/session-accessor.sqlite-entry-revision.test.ts(+0/-21)src/config/sessions/session-accessor.sqlite-exact-read.test.ts(+339/-216)src/config/sessions/session-accessor.sqlite-excluded-rows.test.ts(+0/-285)src/config/sessions/session-accessor.sqlite-export-budget.test.ts(+3/-8)src/config/sessions/session-accessor.sqlite-fresh-upsert-archive.test.ts(+13/-28)src/config/sessions/session-accessor.sqlite-generation-readiness.test.ts(+140/-340)y0123
Actual replay: 9 test/support files, +163 / -338 LOC; static declarations 100 → 98. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: The 35% target was not met. Safe consolidation removed 215 lines: 11,578 → 11,363 (−1.86%). Declarations: 265 → 260; statically expanded cases: 483 → 480. No runtime counts or coverage measurements were taken, per CI-only mode.
src/gateway/control-plane-rate-limit.test.ts(+26/-72)src/gateway/control-ui-plugin-assets.test.ts(+22/-24)src/gateway/control-ui-plugin-tabs.test.ts(+20/-26)src/gateway/control-ui-public-session-admission.test.ts(+6/-17)src/gateway/control-ui-routing.test.ts(+22/-50)src/gateway/control-ui-session-entry-document.http.test.ts(+2/-18)src/gateway/control-ui-session-entry.real-auth.e2e.test.ts(+39/-71)src/gateway/github-shared-publication-read.test.ts(+22/-32)src/gateway/github-user-identity.test.ts(+4/-28)y0124
Actual replay: 8 test/support files, +359 / -584 LOC; static declarations 43 → 42. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Shard y0124: 11,094 → 10,918 lines, removing 176 lines (1.6%). The 35% target was not reached. All 230 declarations / 466 statically counted expanded cases remain unchanged; execution counts were not measured.
ui/src/pages/chat/components/chat-model-policy.test.ts(+14/-24)ui/src/pages/chat/components/chat-pdf-preview.test.ts(+5/-8)ui/src/pages/chat/components/chat-permission-card.test.tsx(+32/-86)ui/src/pages/chat/components/chat-question-resource.test.tsx(+84/-121)ui/src/pages/chat/components/chat-run-failure-notice.test.ts(+23/-31)ui/src/pages/chat/components/chat-tool-output.test.ts(+48/-100)ui/src/pages/chat/components/chat-transcript-duration.test.ts(+135/-190)ui/src/pages/chat/components/chat-transcript-geometry-updates.browser.test.tsx(+18/-24)y0125
Actual replay: 19 test/support files, +1384 / -1796 LOC; static declarations 80 → 75. Coverage totals: not measured (CI-only, as recorded in shard report).
Original shard report: Static declarations: 104 → 103; expanded cases: 237 → 237. Two same-path successor cases became a two-row table. Repeated fixtures and worker interception were consolidated; no cases, assertions, or production code were removed.
src/agents/subagents/registry/subagent-announcement-delivery.worker.test.ts(+11/-22)src/agents/subagents/registry/subagent-announcement.test-support.ts(+39/-1)src/agents/subagents/registry/subagent-announcement.worker.test.ts(+14/-45)src/agents/subagents/registry/subagent-catchup.runtime-facts.integration.test.ts(+1/-5)src/agents/subagents/registry/subagent-control.accepted-stop.test.ts(+52/-62)src/agents/subagents/registry/subagent-control.admission-drain.test-support.ts(+0/-106)src/agents/subagents/registry/subagent-control.commands.test.ts(+5/-10)src/agents/subagents/registry/subagent-control.concurrency.test.ts(+6/-25)src/agents/subagents/registry/subagent-control.fixtures.test-support.ts(+190/-1)src/agents/subagents/registry/subagent-control.late-registration.test-support.ts(+295/-42)src/agents/subagents/registry/subagent-control.metadata-publication.test.ts(+0/-450)src/agents/subagents/registry/subagent-control.preparation.test.ts(+7/-22)src/agents/subagents/registry/subagent-control.publication.test.ts(+344/-79)src/agents/subagents/registry/subagent-control.queued-failure.test-support.ts(+0/-215)src/agents/subagents/registry/subagent-control.raw-entry.test.ts(+60/-107)src/agents/subagents/registry/subagent-control.refresh.test.ts(+28/-86)src/agents/subagents/registry/subagent-control.stop-selection.test-support.ts(+49/-61)src/agents/subagents/registry/subagent-control.test-support.ts(+28/-0)src/agents/subagents/registry/subagent-control.test.ts(+255/-457)