Repository navigation
fix(test): wait for desktop viewer handoff before resizing - #149975
Conversation
Port the self-contained handoff readiness wait from #143817. Wait for the former controller canvas to detach and for its replacement to render before starting the resize matrix on both transports.
|
🦞👀 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. Reviewed September 16, 2026, 6:26 AM ET / 10:26 UTC. ClawSweeper reviewWhat this changesThe desktop resize test waits for the former controller’s replacement viewer to render before resizing, reusing its existing pixel sampler. Merge readiness✅ Ready for maintainer review This remains a useful, focused test repair: current main lacks the readiness wait, and no introduced correctness or security defect was found. The related merged diagnostics work does not fix this ordering gap. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI desktop viewer connects through the Gateway to a remote desktop. This end-to-end test exercises controller handoff, display resizing, and read-only input filtering over node and SSH transports. flowchart LR
A[Real desktop fixture] --> B[Gateway transport]
B --> C[Two browser viewers]
C --> D[Control handoff]
D --> E[Replacement viewer renders]
E --> F[Resize and ownership assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +14. Total +14 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep readiness synchronization in the existing end-to-end test while preserving its real transport, framebuffer, and ownership checks. Do we have a high-confidence way to reproduce the issue? No deterministic reproduction was established in this review. The reported hosted failure and inspected lifecycle support the ordering gap, but do not independently prove the precise upstream disconnect mechanism. Is this the best way to solve the issue? Yes. Waiting for the replacement canvas and rendered pixels directly synchronizes the existing scenario without weakening assertions or changing runtime behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2ef2537cd039. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…enclaw#149975) Port the self-contained handoff readiness wait from openclaw#143817. Wait for the former controller canvas to detach and for its replacement to render before starting the resize matrix on both transports.
Related: #143817, #149919, #148354
What Problem This Solves
Fixes intermittent desktop resize CI failures when the resize matrix starts before the former controller's replacement viewer has received its first frame.
User Impact
No product behavior changes. This stabilizes the existing real-Gateway desktop resize test for both SSH and node transports while preserving its framebuffer, input-filtering, and controller-ownership assertions.
Why This Change Was Made
Extract the self-contained readiness wait from #143817 at
6a443c9edf23d85652a9432f5a79a29a086865df. After control changes hands, wait for the former controller's canvas to detach, then assert the replacement framebuffer's dimensions and rendered pixels before enabling Match and resizing. Reuse the test's existing pixel sampler. No feature or viewer-lifecycle changes, sleeps, retries, timeout increases, or weakened assertions are included.Evidence
Hosted failure: run 35077445638, job 104733359756. The missing-canvas failure also recurred on later merge-refs of #149919. The preserved artifact shows the replacement viewer connecting and then closing upstream, leaving zero canvases instead of the expected 900×500 framebuffer. The SSH tunnel-exit evidence was empty; the terminal endpoint event was upstream closure.
Source hunk in #143817. Only this wait and its small, local pixel-sampling extraction were ported.
Local proof used a task-owned Debian Docker fixture with the built Gateway, isolated OpenClaw state, free Gateway ports, real TigerVNC, and Chromium. The tested file exactly matched the committed candidate.
Iteration 7 retained the completed resize proof: 390×900 and 900×500 framebuffers, 271 sampled colors, and zero observer input/resize bytes forwarded. Its failure was
AggregateError: Desktop resize proof cleanup failed. Follow-up: nested cleanup error not preserved by the harness; separate evidence gap, in the evidence-preservation area addressed by #148354. The final container inspection did not identify the nested cleanup error; proxyEPIPEmessages do not establish which cleanup operation failed. No tests were rerun around this failure, and the owned proof containers have been removed. Hosted CI remains the authority for this lane.node scripts/check-changed.mjspassed before and after committing.git diff --checkpassed. P1 autoreview of the committed branch (--mode branch --base origin/main) was scoped-clean with no actionable findings.Production LOC: unchanged. Test LOC: +25 / −11 in one file.