Add railiance deploy manifests, mas.coulomb.social statute example, probe JSONL log + bind option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 1370019@bnt-lap001
Assistant-Session: d462dd63-16de-4189-ae70-b9cd6566bf87
This commit is contained in:
tegwick 2026-10-11 20:22:37 +02:00
parent edfbb49022
commit e517f2b81a
5 changed files with 216 additions and 2 deletions

View file

@ -8,6 +8,8 @@ import urllib.request
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
UPSTREAM = sys.argv[1]
LOG = sys.argv[2] if len(sys.argv) > 2 else None # optional JSONL evidence file
BIND = sys.argv[3] if len(sys.argv) > 3 else "0.0.0.0"
EVENTS = []
@ -20,7 +22,11 @@ class H(BaseHTTPRequestHandler):
status, resp = r.status, r.read()
except urllib.error.HTTPError as e:
status, resp = e.code, e.read()
EVENTS.append({"event": json.loads(body), "app_status": status, "app": json.loads(resp or b"null")})
rec = {"event": json.loads(body), "app_status": status, "app": json.loads(resp or b"null")}
EVENTS.append(rec)
if LOG:
with open(LOG, "a") as f:
f.write(json.dumps(rec) + "\n")
self._send(status, resp)
def do_GET(self):
@ -37,4 +43,4 @@ class H(BaseHTTPRequestHandler):
pass
ThreadingHTTPServer(("0.0.0.0", 8024), H).serve_forever()
ThreadingHTTPServer((BIND, 8024), H).serve_forever()