Repository navigation
fix(ui): catalog dashboard e2e stalls in reconnect on loaded runners - #193197
Conversation
The compact replay paused the virtual clock and drove the reconnect step by polling runFor(50) inside a 15 s real-time budget, while reconnectMockGateway awaits its offline -> new attempt -> online -> connected transitions in real time. Slow polls exhaust the budget before the ~1 s first reconnect delay elapses; a lagging host lets virtual time pass the 30 s socket opening deadline so backoff grows. Run reconnect with the clock ticking like boot (and like the other suites that resume before reconnectMockGateway), then pause again. Document that contract on the helper.
|
🦞👀 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 changes before merge. What this changesThis PR resumes the browser clock during the catalog dashboard test’s reconnect step and documents the helper’s clock requirement. Example: The compact dashboard replay reconnects while virtual-time polls take 900 ms each.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this PR makes a focused reconnect timing repair, but its seven unbudgeted test lines cause a required CI failure. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe browser E2E replay drives the Control UI against a mock Gateway and records catalog requests after navigation, invalidation, and reconnect events. flowchart LR
Replay[Dashboard replay] --> Clock[Browser clock]
Clock --> UI[Control UI]
UI --> Transport[Gateway transport]
Transport --> Mock[Mock Gateway]
Mock --> Assertions[Catalog request assertions]
Technical reviewBest possible solution: Retain the focused clock repair and add a justified seven-line test allocation without raising the shared baseline. Do we have a high-confidence way to reproduce the issue? Source confirms that reconnect mixes host-awaited transitions with incremental virtual-time advancement; the body supplies controlled before/after reproduction, but no target code was executed during this review. Is this the best way to solve the issue? Resuming the existing clock around the existing reconnect helper is the smallest complete repair: transport timers progress naturally, then deterministic catalog settlement resumes without weakening assertions. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1e101d06645b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceTests +7. Total +7 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label 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 November 5, 2026, 12:26 AM ET / 05:26 UTC. |
…penclaw#193197) The compact model catalog dashboard replay now runs its reconnect step with the virtual clock ticking, like boot, so the real-time transport waits in reconnectMockGateway no longer race the reconnect backoff and socket opening deadline on loaded runners. Admin merge: the only failing check was checks-fast-baseline-ratchets (test-lines), with ci-gate reporting it. That run measured 131 lines over the ceiling, but this PR's net delta was +7; the remaining 124 lines were inherited main debt, since reconciled by openclaw#193765. On current main with this PR merged, the ratchet passes (6558436 lines, ceiling 6558507), and ui/src/e2e/model-catalog-dashboard.e2e.test.ts passes locally (1/1) on that merged tree under host load of about 50 on 32 cores.
Related: #190824 (CI run 41404623180, job
checks-ui-e2e6/7, failed on an unrelated head)What Problem This Solves
Fixes: the Control UI model catalog dashboard e2e test (
ui/src/e2e/model-catalog-dashboard.e2e.test.ts) intermittently times out in itsreconnectstep on loaded CI runners, with the UI stuck inreconnecting, failing unrelated PRs.User Impact
No user-visible change. The test no longer flakes in its reconnect step, so unrelated PRs stop failing
checks-ui-e2eon it.Why This Change Was Made
The compact replay pauses Playwright's virtual clock and drives each action by polling
page.clock.runFor(50)inside a 15 s real-timeexpect.pollbudget. Thereconnectstep callsreconnectMockGateway, whose offline → new socket attempt → online → connected transitions are awaited in real time withpage.waitForFunction. That couples two clocks:reconnecting, which is the CI signature.The reconnect step now runs with the clock ticking, the way boot already does, then pauses it again. That matches the other suites, which call
page.clock.resume()beforereconnectMockGateway. The helper now documents that it expects a ticking clock. Assertions, timeouts, and row attribution are unchanged; the reconnect row still waits for its post-reconnect catalog read.Evidence
connectcounts on every poll.setOnline(true): the offline socket closed at ~31 s virtual, and the next attempt came after the grown backoff.0809cf31e693: 2/2 failed atreconnectwithexpected false to deeply equal true, readiness{gatewayPhase: "reconnecting", rosterReady: false, ready: true}(identical to the CI dump).reconnectwith the CI signature above, after the 15 s poll budget.oxfmt --checkandgit diff --checkclean on the changed files. The local oxlint wrapper timed out preparing plugin-sdk boundary types under host load; CI lint covers it.0809cf31e693, P0–P1): scoped-clean, no findings.Gap: the CI failure dump has no transport state, so which of the two modes the CI runner hit is not proven. The fix removes the coupling behind both.