From f191d3a607bce8818334219ed914a729c32f7f8c Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Sat, 31 Oct 2026 17:35:08 +0800 Subject: [PATCH] diag(ui): report the create-to-js gap in the node timeout refs #144 When the preload checkpoint carries a start time the failure line now also prints how long after CreateProcess Node reached its first JS line. --- research/ui/test_raster_style_reference.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/research/ui/test_raster_style_reference.py b/research/ui/test_raster_style_reference.py index fb0eaa11..b6273063 100644 --- a/research/ui/test_raster_style_reference.py +++ b/research/ui/test_raster_style_reference.py @@ -103,8 +103,17 @@ def test_production_js_native_contract(self): # The child state at the deadline separates a process that never # started from one that started and then stalled (#144). state=checkpoint.read_text(encoding="utf-8") if checkpoint.exists() else "preload checkpoint never written" + started_at=None + try: + started_at=json.loads(state).get("started") + except (ValueError,AttributeError): + started_at=None + # A written checkpoint means Node reached its first JS line, so the + # gap from CreateProcess to that point is the number #144 is about. + delay="" if not isinstance(started_at,(int,float)) else ( + f" js_start_after_create_ms={round(time.time()*1000-started_at-spawn_seconds*1000)}") self.fail(f"node fixture exceeded its ten second limit; {state}; " - f"pid={process.pid} spawn_seconds={spawn_seconds} " + f"pid={process.pid} spawn_seconds={spawn_seconds}{delay} " f"exit_at_timeout={process.poll()} " f"partial_stdout_bytes={len(expired.output or '')}") result=subprocess.CompletedProcess(process.args,process.returncode,stdout,stderr)