Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Raise whole-display recorder startup ACK deadline to 15s (SKY-15708) (#8525)
LawyZhengb7cf856db9df
diff --git a/skyvern/webeye/display_recorder.py b/skyvern/webeye/display_recorder.pyindex 8ac6b8e99..9b2868e03 100644--- a/skyvern/webeye/display_recorder.py+++ b/skyvern/webeye/display_recorder.py@@ -44,8 +44,8 @@ SIGINT_TIMEOUT = 5.0SIGTERM_TIMEOUT = 2.0# Deadline for the bridge's positive `READY` stdout ACK (emitted only after full X/XShm/FFmpeg/signal setup).# A miss is a startup REFUSAL (kill + fall back to Playwright), so it must cover trampoline re-exec + interpreter-# start + ctypes CDLL loads + X handshake + FFmpeg Popen on a loaded worker; the 5s is paid only when wedged.-STARTUP_ACK_TIMEOUT = 5.0+# start + ctypes CDLL loads + X handshake + FFmpeg Popen on a loaded worker; the 15s is paid only when wedged.+STARTUP_ACK_TIMEOUT = 15.0# The Xvfb screen / base window is 1920x1080; an absent/unparseable/larger-than-screen window falls back to# capturing the full screen. Output is bounded by the configured recording profile, aspect-preserved.diff --git a/tests/unit/test_display_recorder.py b/tests/unit/test_display_recorder.pyindex fe7b7ef3d..8f01aa0e0 100644--- a/tests/unit/test_display_recorder.py+++ b/tests/unit/test_display_recorder.py@@ -191,6 +191,13 @@ def test_acquired_video_artifact_advertises_mp4_before_first_artifact_creation(dr._REGISTRY.pop((":99", "wr_ext"), None)+def test_startup_ack_deadline_is_15_seconds() -> None:+ # The bridge cold start (double interpreter start + ctypes/X handshake + FFmpeg Popen) can take several+ # seconds on a loaded worker; the READY ACK deadline must be 15s so a healthy-but-slow start is not refused+ # and needlessly downgraded to Playwright. Regression guard against reverting to the old shorter default.+ assert dr.STARTUP_ACK_TIMEOUT == 15.0++def test_owner_id_is_deterministic_and_owner_exact() -> None:a = dr._safe_owner_id("wr_abc")assert a == dr._safe_owner_id("wr_abc") # deterministic