sandbox: fix supervisor (double probe, real spawn), retry+log in run_code, route tool requests to native :48005 (shim drops streamed tool_calls), e2e proof
This commit is contained in:
+9
-1
@@ -73,7 +73,10 @@ def main():
|
||||
else:
|
||||
kill_matching("exec_broker.py")
|
||||
time.sleep(1)
|
||||
spawn([PY311, os.path.join(HOME_DIR, "exec_broker.py")], out="broker.log")
|
||||
with open(os.path.join(HOME_DIR, "broker.log"), "ab") as fh:
|
||||
subprocess.Popen([PY311, os.path.join(HOME_DIR, "exec_broker.py")], cwd=HOME_DIR,
|
||||
stdout=fh, stderr=subprocess.STDOUT, creationflags=DETACHED,
|
||||
stdin=subprocess.DEVNULL, close_fds=True)
|
||||
time.sleep(6)
|
||||
log("broker " + ("started" if http_ok(LOCAL_HEALTH) else "START FAILED"))
|
||||
|
||||
@@ -82,6 +85,11 @@ def main():
|
||||
if ok:
|
||||
log("tunnel ok")
|
||||
return
|
||||
time.sleep(5)
|
||||
ok, _ = vps_probe()
|
||||
if ok:
|
||||
log("tunnel ok (2nd probe)")
|
||||
return
|
||||
kill_matching(VPS_FWD)
|
||||
time.sleep(1)
|
||||
spawn_detached_cmd("ssh %s -N -R %s %s" % (SSH_OPTS, VPS_FWD, VPS))
|
||||
|
||||
Reference in New Issue
Block a user