11e37ee807
gates / gates (push) Successful in 27s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
27 lines
1.4 KiB
Python
27 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""boxq.py <queue> <app>|<from>|<to>|<class> ... — run_edge.py on 9202 for each app in order; the
|
|
evidence is written on DooPlex by run_edge itself (apps/<app>/). One line per finished walk."""
|
|
import json, os, subprocess, sys, time
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
q = sys.argv[1]
|
|
out = open(os.path.join(HERE, f"boxq-{q}.txt"), "a", buffering=1)
|
|
for spec in sys.argv[2:]:
|
|
parts = spec.split("|")
|
|
app, frm, to, cls = parts[:4]
|
|
label = parts[4] if len(parts) > 4 else None
|
|
t0 = time.time()
|
|
out.write(f"{time.strftime('%H:%M:%S')} START {app} {frm} -> {to}\n")
|
|
with open(os.path.join(HERE, f"boxq-{label or app}.log"), "w") as lg:
|
|
r = subprocess.run([sys.executable, "-u", "run_edge.py", app, frm, to, "--class", cls]
|
|
+ (["--label", label] if label else []),
|
|
cwd=HERE, stdout=lg, stderr=subprocess.STDOUT, timeout=3600)
|
|
v = {}
|
|
try:
|
|
v = json.load(open(os.path.join(HERE, "apps", label or app, "verdict.json")))
|
|
except Exception:
|
|
pass
|
|
out.write(f"{time.strftime('%H:%M:%S')} DONE {app} rc={r.returncode} verdict={v.get('verdict')} "
|
|
f"before={v.get('seed_read_before')} after={v.get('seed_read_after')} phase={v.get('final_phase')} "
|
|
f"r626={v.get('r626_at_60s')!r} notes={str(v.get('notes'))[:200]} ({round(time.time()-t0)}s)\n")
|
|
out.write(f"{time.strftime('%H:%M:%S')} QUEUE {q} FINISHED\n")
|