Repository navigation
fix(test): Edge startup intermittently blocks Gateway route proof - #2049
Conversation
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 connects Gateway browser proof directly to Edge’s initial page and adds bounded startup diagnostics and focused coverage. Example: The released-Gateway proof opens authenticated Dashboard routes / and /skills.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a focused, maintainer-authored improvement that current main lacks, with no actionable correctness findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe E2E browser adapter launches isolated headless Edge, sends CDP commands, observes Gateway authentication, and captures route screenshots. flowchart LR
A[Setup connect proof] --> B[Owned Edge profile]
B --> C[Loopback page discovery]
C --> D[Direct page CDP]
D --> E[Released Gateway Dashboard]
E --> F[Authentication and route assertions]
Technical reviewBest possible solution: Retain the direct-page change in the existing adapter and preserve its authentication, endpoint-isolation, timeout, and cleanup contracts. Do we have a high-confidence way to reproduce the issue? There is no deterministic reproduction of the intermittent stall: the author explicitly reports passing baseline replays and an unproven original trigger. Is this the best way to solve the issue? The patch is a proportionate simplification: it removes second-target creation and attachment from the existing owner without weakening the downstream proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c714954e6677. Provenance checked
TestingProof path: in-process harness. 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. 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 November 6, 2026, 5:43 PM ET / 22:43 UTC. |
Co-authored-by: Copilot App <[email protected]>
PR cleanup reviewReviewed head: Thanks for keeping the browser change focused. The direct-page startup is still missing from main. Current main also gained WaitForEndpointAsync in #2066 to handle partial/locked DevToolsActivePort publication, so this branch needs a small integration update that preserves that helper while retaining the direct-page connection and bounded diagnostics. The body currently cites c9409d5, before the cleanup follow-up at 8ee4b4e. Please refresh focused startup and authenticated-route evidence on the integrated head; I would prioritize this as a bounded repair rather than close it as superseded. Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass. |
Keep main's WaitForEndpointAsync (tolerates a partial or locked DevToolsActivePort, openclaw#2066) together with this branch's direct about:blank page connection and bounded startup diagnostics. The browser-level session id is no longer needed because the socket attaches to the page itself. Co-authored-by: Copilot App <[email protected]>
|
Hi @karkarl. I'm a Copilot triage agent working through PRs for Scott overnight (not Scott himself).
How I resolved it: Local check on the merged head (Windows ARM64, separate worktree, isolated Tray data dir):
Update: CI Gate came back green on |
What Problem This Solves
Fixes intermittent Edge startup stalls that block the released-Gateway search/Dashboard E2E proof and alpha release validation before either Dashboard route is visited.
User Impact
No product UI or runtime change. Developers get a smaller browser startup path and sanitized failure-stage diagnostics. The intermittent runner trigger was not reproduced locally; one passing hosted replay is evidence, not proof that all intermittent failures are eliminated.
Why This Change Was Made
Discover and connect directly to the initial
about:blankpage launched inside the unique owned Edge profile. This removes the browser-level WebSocket, second-target creation and flattened attachment where failures were observed.Keep the existing 30-second budget, owned-process cleanup, browser-profile artifact exclusions, authenticated handshake observation and strict route assertions. Loopback discovery disables proxies and redirects and validates the page endpoint. Drain stderr with a fixed buffer and report only coarse startup facts, never raw browser output or URLs. Fixture-free discovery regressions and an opt-in real Edge evaluation/PNG smoke run under the existing hosted setup/connect filter.
Evidence
Current-head hosted setup/connect proof: 63 passed, 7 unrelated skips. The exact previously failing test passed in 14 seconds; Edge page CDP was ready in 1,864ms and both authenticated
/and/skillsroutes rendered. All 10 new startup cases passed.The overall run is failed, not green:
CurrentModel_NativeUiaRespectsActionAvailability(disabled: True)expected an exactCOMExceptionbut receivedElementNotAvailableException. The user reports that a separate session is fixing this unrelated UI test; it is deliberately not changed here. CI Gate also failed as a consequence.Change Type
Scope
winnodeRequired proof pools
none: test-only Edge adapter and documentation change. The existing hosted WSL setup/connect lane directly exercises the changed browser path; no product setup, pairing, node command, native UI or custom-host capability changes.Validation
Local final source corresponds to commit
c9409d52c5f02a179e68b417725011801bba68c8.OPENCLAW_REPO_ROOTpointed at the task worktree; Shared/Tray used task-isolatedOPENCLAW_TRAY_DATA_DIR. Both test projects were built first to prevent fresh-worktree no-op results..\build.ps1: passed, all five projects, host defaultwin-arm64.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: passed, 4,867 passed, 24 existing skips, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: passed, 5,234 passed, 0 skipped/failed.OPENCLAW_RUN_E2E=1,dotnet test .\tests\OpenClaw.E2ETests\OpenClaw.E2ETests.csproj --no-restore --filter 'FullyQualifiedName~SetupAndConnectTestsBrowserStartup|FullyQualifiedName~SetupAndConnectTestsArtifactPolicy': passed, 19 passed, 0 skipped/failed, including native Edge and browser-profile exclusion..\scripts\validate-docs.ps1: passed, 72 Markdown files..\scripts\validate-agent-skills.ps1: passed, 16 skills and 25 Markdown files..\scripts\test-agent-skills-validator.ps1: passed, 27 fixtures plus repository skills.git diff --check: passed.Author simplification pass retained the single adapter, bounded diagnostics and distinct endpoint/cancellation/native-browser regressions. Independent review was not run; this is test harness work, not a change to product UI, setup, permissions or diagnostics. No independent review approval is claimed.
Real Behavior Proof
157.0.4341.42.c9409d52c5f02a179e68b417725011801bba68c8, branch workflow dispatch, attempt 1..\scripts\Invoke-CiE2e.ps1 -Name setup-connect -Filter "FullyQualifiedName~OpenClaw.E2ETests.Setup.SetupAndConnectTests|FullyQualifiedName~OpenClaw.E2ETests.Setup.MxcSetupAndConnectTests|FullyQualifiedName~OpenClaw.E2ETests.Setup.MirroredWslPortLeaseTests|FullyQualifiedName~OpenClaw.E2ETests.Setup.SshOwnershipAdversarialProofTests|FullyQualifiedName~OpenClaw.E2ETests.Setup.TrayExecutableResolutionTests"withOPENCLAW_RUN_E2E=1.[Search proof] Edge page CDP ready in 1864ms.,authenticated browser rendered /.,authenticated browser rendered /skills., andReleasedGateway_SearchDenialAndDashboardRoutes [14 s]passed.Yes/No/N/A): Yes. Hosted job/log linked above;e2e-test-results-setup-connectartifact ID13542105076exists and is not expired. Screenshot pixels were not separately inspected.Security Impact
Yes/No): NoYes/No): NoYes/No): YesYes/No): NoYes/No): NoYes, explain the risk and mitigation: test-only/json/listdiscovery and direct page CDP use the owned loopback debugger. Proxies and redirects are disabled; the page endpoint must match host/port/path and contain no user info, query or fragment. Credentials remain off command lines; raw stderr, profiles and credential-bearing URLs are not emitted.Compatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoReview Conversations