Files
felhom.eu/documentation/audits/night-2026-09-23/watch.py
T
admin 0030cbd1de
gates / gates (push) Successful in 26s
night 2026-09-23: evidence so far (Parts A, B, C in progress)
The records the catalog's ladder entries cite (apps/<app>/bench and
apps/<app>/verdict.json), the drill tools, the spike, R-626's run,
R-612/R-613 red-proofs, the chaos schedule (seed 20260923) drawn
BEFORE round 1. Docs and register follow at the end of the night.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-09-23 21:33:54 +02:00

27 lines
1.5 KiB
Python

"""Deploy one app (or none) and record every change of deployed/deploying/state with a timestamp."""
import sys, time, json
import walk as w
app = sys.argv[1]; cap = int(sys.argv[2]) if len(sys.argv) > 2 else 900
w.login()
if "--deploy" in sys.argv:
vals = w.deploy_values(app, app)
c, d = w.ctl("POST", f"/api/stacks/{app}/deploy", {"values": vals} if vals else {})
w.say(f"deploy {app} -> {c} {str(d)[:160]}")
last = None; t0 = time.time()
while time.time() - t0 < cap:
st = w.stack(app)
cur = (st.get("deployed"), st.get("deploying"), st.get("state"), st.get("deploy_error"))
if cur != last:
w.say(f"+{time.time()-t0:6.1f}s {app}: deployed={cur[0]} deploying={cur[1]} state={cur[2]} err={str(cur[3])[:200]!r}")
last = cur
if "--until-settled" in sys.argv and cur[1] is False and time.time() - t0 > 30 and cur[2] in ("running", "not_deployed", "error", "stopped", "exited"):
# settled: keep watching 60 s more for late flips
end = time.time() + 60
while time.time() < end:
st = w.stack(app); c2 = (st.get("deployed"), st.get("deploying"), st.get("state"), st.get("deploy_error"))
if c2 != last: w.say(f"+{time.time()-t0:6.1f}s {app}: deployed={c2[0]} deploying={c2[1]} state={c2[2]} err={str(c2[3])[:200]!r}"); last = c2
time.sleep(3)
break
time.sleep(3)
w.say("final:", json.dumps({k: w.stack(app).get(k) for k in ("deployed","deploying","state","deploy_error","containers")}, default=str)[:600])