From 6f63cb6f70a0a19c57fcc2ee603ae62f95c76559 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 25 Jul 2026 19:30:29 +0200 Subject: [PATCH] =?UTF-8?q?fix(ui):=20agent=20driver=20honors=20SR=5FPORT?= =?UTF-8?q?=20=E2=80=94=20the=20eyeball's=20own=20finding=20(T-971)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The channel eyeball caught the committed reference driver silently relying on SimBridge's hardcoded default port, unlike every sibling real-render driver — a caller starting the server on a chosen port got 20 silent connect retries against the wrong port and a hollow session whose results had valid shapes but no data. Mirrors visual_capture.gd's convention exactly: SR_LIVE=1 without SR_PORT is a hard error; SR_PORT sets SimBridge.server_port before boot. Co-Authored-By: Claude Fable 5 --- client/tests/atlas_agent_driver.gd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/client/tests/atlas_agent_driver.gd b/client/tests/atlas_agent_driver.gd index 8b1225e06..50e3386f6 100644 --- a/client/tests/atlas_agent_driver.gd +++ b/client/tests/atlas_agent_driver.gd @@ -99,6 +99,25 @@ func _run() -> void: quit(1) return + # SR_PORT wiring (PR #209 eyeball finding) — mirror visual_capture.gd's + # live-mode convention exactly: every sibling real-render driver + # (visual_capture, atlas_standalone, locomotion_sandbox) reads SR_PORT + # rather than silently relying on SimBridge's hardcoded default port; + # without this, a caller who started the server on a chosen port (the + # run-visual --port pattern) gets 20 silent connect retries against the + # wrong port and a hollow session whose act() results still have valid + # SHAPES but no data behind them. SR_LIVE=1 without SR_PORT is a hard + # error, same as visual_capture.gd. + if OS.get_environment("SR_LIVE") == "1": + var port_env := OS.get_environment("SR_PORT") + if port_env.is_empty(): + push_error("atlas_agent_driver: SR_LIVE=1 but SR_PORT not set") + quit(1) + return + var sim_bridge := root.get_node("/root/SimBridge") + sim_bridge.server_port = int(port_env) + print("atlas_agent_driver: live mode — server port %d" % sim_bridge.server_port) + var main_scene = load("res://scenes/main.tscn") var main_node = main_scene.instantiate()