fix(ui): agent driver honors SR_PORT — the eyeball's own finding (T-971)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user