Repository navigation
fix(test): released-Gateway Dashboard proof fails when the job's first Edge launch is slow - #2140
Conversation
…t Edge launch is slow The search/Dashboard E2E proof failed on main (run 43346981281) with "Edge startup failed at page Network.enable; elapsedMs=31265". Endpoint, page discovery and WebSocket connect had succeeded and Edge was running. All four startup stages shared one 30 s budget, while the job's first (cold) Edge launch measured 1.8-16.1 s across 75 passing runs. Give startup its own named 60 s hang guard, overridable with OPENCLAW_E2E_EDGE_STARTUP_TIMEOUT_SECONDS (1-3600), keep 30 s for per-command operations, and report cumulative per-stage milliseconds and the stderr character count on success and failure so a slow stage can be told apart from a hang. No retries. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR separates Edge startup from the command timeout, adds a bounded startup override, and records sanitized startup timings. Example: The reported hosted Edge launch still awaited Network.enable after 31,265 milliseconds.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a focused test-harness repair absent from current main, with no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe setup/connect E2E harness launches an isolated Edge process, discovers its loopback debugger, and uses page CDP to authenticate, inspect Dashboard routes, and capture screenshots. flowchart LR
A[Setup connect E2E] --> B[Owned Edge process and profile]
B --> C[Loopback debugger discovery]
C --> D[Page CDP startup budget]
D --> E[Released Gateway Dashboard]
E --> F[Authentication and route assertions]
Technical reviewBest possible solution: Keep the separate bounded startup budget and sanitized timings in the existing adapter while preserving strict route assertions and owned-resource cleanup. Do we have a high-confidence way to reproduce the issue? The reported main failure and existing shared deadline identify the timeout path, but the intermittent slow launch was not reproduced and its eventual completion remains unknown. Is this the best way to solve the issue? This is a proportionate guard adjustment with measured justification: it retains one startup owner, adds no retry, and preserves downstream assertions without claiming to establish why Edge stalled. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dff0ec4bdb25. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
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:
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 12, 2026, 9:51 PM ET / November 13, 2026, 02:51 UTC. |
What Problem This Solves
Fixes: the released-Gateway search/Dashboard E2E proof fails on
mainwhen the job's first headless Edge launch takes longer than 30 seconds to answer its first page command.User Impact
No product change. CI no longer fails this proof when the hosted runner's first (cold) Edge start is slow, and any future startup failure reports how long each startup stage took.
Why This Change Was Made
mainrun 43346981281 failedReleasedGateway_SearchDenialAndDashboardRouteswithEdge startup failed at page Network.enable; elapsedMs=31265; process=running; failure=TaskCanceledException. The endpoint, page discovery and page WebSocket stages had all succeeded, and Edge was still running. A warm Edge launch later in the same job was ready in 1.8 s.All four startup stages shared one 30-second budget. Across 75 passing setup/connect runs since #2049, the job's first (cold) Edge launch took 1.8-3.5 s typically, with a tail of 8.9, 13.5, 14.4 and 16.1 s. Later (warm) launches took 0.4-2.1 s. On a page target,
Network.enableis answered only once that page's renderer is live, and no earlier readiness event exists to await. This was the only failure at this stage in 76 runs; the earlier failures were theDevToolsActivePortsharing violation fixed by #2049.This change:
OPENCLAW_E2E_EDGE_STARTUP_TIMEOUT_SECONDS(1-3600; other values keep the default). Per-command operations keep their 30-second bound. No retries are added.endpoint,page,socket,network) and the stderr character count on every startup, and adds the limit to failures. Only numbers and fixed labels are logged, never raw Edge output, URLs or paths.Limit: the failing launch's real duration is unknown (it was cancelled at 31 s), so this widens a hang guard to about 3.7 times the slowest observed passing cold start rather than proving the failure would have finished. If it recurs, the new stage timings show whether the cause is slow or stuck. Candidate follow-ups if they show slow cold starts: Edge flags that reduce first-launch background work, and logging how many
about:blankpage targets matched.Evidence
Edge page CDP ready intimings; the failing run is the onlyNetwork.enablestage failure since fix(test): Edge startup intermittently blocks Gateway route proof #2049.int.MaxValue).Change Type
Scope
winnodeRequired proof pools
windows-wsl-gateway-e2e: the changed helper runs only in the hosted setup/connect lane's released-Gateway Dashboard proof and its Edge startup smoke.Validation
Run locally on
6ddc13b8plus this exact diff (committed unchanged ascaa9f91d):./build.ps1: passed.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 5849 passed, 0 failed, 29 skipped. An earlier run that overlapped with other local builds had 2 failures in untouched tests (UploadRetentionCoordinatorTests10 s timeout and anMxcFolderAdmissionTestshost-path access denial); both passed in isolation (83/83) and in this clean full rerun.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj: 6359 passed, 0 failed.dotnet test ./tests/OpenClaw.E2ETests/OpenClaw.E2ETests.csproj -r win-x64 --filter "FullyQualifiedName~SetupAndConnectTestsBrowserStartup|FullyQualifiedName~GatewaySearchBrowserProofTests": 29 passed, 1 skipped (native Edge smoke, gated byOPENCLAW_RUN_E2E)../scripts/validate-docs.ps1: passed (73 Markdown files).git diff --check: clean.Real Behavior Proof
windows-latestsetup/connect lane for runtime proof.caa9f91d89ce32600519516abccd09d202815b83(local runs used the identical uncommitted tree on6ddc13b8).Setup and connect E2E (WSL Latest)on this PR, which runsReleasedGateway_SearchDenialAndDashboardRoutesandOwnedEdgePageSupportsEvaluationAndScreenshotWithoutAGateway.Edge page CDP ready in <n>ms (stageMs=endpoint:..,page:..,socket:..,network:..; stderrCharacters=..).Edge startup failed at page Network.enable; elapsedMs=31265; process=running; stderrCharacters=2415; failure=TaskCanceledException(run 43346981281).Yes/No/N/A): N/ASecurity Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain the risk and mitigation: N/A. Test-only; new log fields are numbers and fixed stage labels.Compatibility and Migration
Yes/No): YesYes/No): YesYes/No): NoOPENCLAW_E2E_EDGE_STARTUP_TIMEOUT_SECONDS(1-3600) overrides the 60 s Edge startup guard.Review Conversations