Repository navigation
Conversation
…ED race (W9-2a) start-e2e-stack.mjs spawned uvicorn (port 8765 + 8642) and Vite (5173) concurrently. Playwright's webServer.url probe targets only :5173, so when Vite finished binding before uvicorn, the page-load fetch fan-out hit ERR_CONNECTION_REFUSED. Those errors accumulated in attachErrorCapture() and tripped assertNoErrors(), causing the "live-gui.spec.ts:35" flake (and the same root cause in agents.spec.ts:20 — see W9-2_GUI_STABILIZATION_LOG). Fix: spawn API servers first, await /health 200 (60s deadline, 250ms backoff), then spawn Vite. When Playwright's :5173 probe succeeds the API listener is already bound. Deterministic, no test-side timeouts, no skips. Re-run on this branch: live-gui.spec.ts:35 = 5/5 PASS; agents.spec.ts = 1/1 PASS (was failing on same race). Unblocks: #181, #189, #190, #191, #192 (5 GUI PRs blocked on this base flake per W9-2 lane handoff). Sources: - https://playwright.dev/docs/api/class-testconfig#test-config-web-server (webServer.url polls a single URL — multi-process stacks need their own readiness gate) - https://playwright.dev/docs/best-practices#testing-philosophy (avoid waitForTimeout; wait for explicit conditions) Files 03_implementation/ui/scripts/start-e2e-stack.mjs (+22 net LoC) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Ghenghis
merged commit May 10, 2026
2c55c9f
into
feat/hermes3d-7-complete-gui-repo-wiring
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deterministic fix for the base-branch CI flake at
live-gui.spec.ts:35(and the same root-cause failure mode inagents.spec.ts:20and any other spec callingassertNoErrors).Root cause
start-e2e-stack.mjsspawned uvicorn (API on:8765, optional desktop-compat on:8642) and Vite (:5173) concurrently. Playwright'swebServer.urlprobes only the single Vite URL — when Vite's listener finished binding before uvicorn, Playwright considered the stack ready, the test page loaded, and the React app's initial fetch fan-out hitnet::ERR_CONNECTION_REFUSED. Those errors landed in thepageerror/ console capture installed byattachErrorCapture()and trippedassertNoErrors()(_helpers.ts:116).Confirmed in CI failure log of run 25619531513: dozens of
+ "Failed to load resource: net::ERR_CONNECTION_REFUSED"entries before theexpect(errors).toEqual([])assertion.Fix
start-e2e-stack.mjsnow spawns API servers FIRST, awaits each/health(60s deadline, 250ms backoff), then spawns Vite. When Playwright's:5173probe succeeds the API listener is already bound and serving — so the page's first fetch wave never seesERR_CONNECTION_REFUSED.waitForTimeoutflake-maskdesktopPortbeing set, mirroring the existing branchingEvidence
Local 5x re-run of
live-gui.spec.ts:35(CI=1, no reuseExistingServer):Plus
agents.spec.ts(which the CI log showed actually failing under the same root cause): 1 passed (19.3s).Unblocks
Per
03_implementation/docs/handoffs/W9-2_GUI_STABILIZATION_LOG_2026-05-09.mdlines 113-118, all 5 of these PRs are blocked on this same base-branch flake. They should rebase onto this fix once merged.Sources
webServerdocs —webServer.urlpolls a single URL; multi-process stacks need their own readiness gate inside the starterwaitForTimeout; wait on explicit conditionsTest plan
live-gui.spec.ts:355x locally withCI=1— 5/5 PASSagents.spec.ts(same race) — 1/1 PASSHermes evidence chain: PASS
Task ID: W9-2A-BASE-FLAKE-FIX-2026-05-10
hermes_run_gate: e2e-flake-fix
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com