From 9e20175dadc07066caadf772a1ade8ef4d0cdac2 Mon Sep 17 00:00:00 2001 From: Levi Neuwirth Date: Tue, 28 Jul 2026 14:17:43 -0400 Subject: [PATCH] Wait for required PTY output in the GPU probe Keep the real GPU/PTY acceptance probe running until the child output that its report asserts has actually reached the terminal frame. This closes the blank-last-frame race exposed by the v20-compatible handshake. --- pmacs-gpu/src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pmacs-gpu/src/main.rs b/pmacs-gpu/src/main.rs index bd961e1..a35de2d 100644 --- a/pmacs-gpu/src/main.rs +++ b/pmacs-gpu/src/main.rs @@ -857,7 +857,15 @@ fn run_headless_probe(socket: &Path, report: &Path) -> i32 { facts.observed_resized_frame = true; } } - if !quiet && facts.observed_resized_frame && facts.rendered_nonuniform_frames >= 2 { + // Do not exit merely because resize/composition happened + // first: that races the PTY child's initial output and + // produces a self-contradictory "successful" probe report + // whose later acceptance assertion must reject it. + if !quiet + && facts.observed_resized_frame + && facts.rendered_nonuniform_frames >= 2 + && facts.last_frame_text.contains("VTERMROW") + { break; } }