probe.py

import sys,socket,json,datetime
from pathlib import Path
root=sys.argv[1];sys.path.insert(0,root)
attempts=[]
def deny(*a,**k):attempts.append('network');raise AssertionError('Network prohibited')
socket.socket.connect=deny;socket.create_connection=deny;socket.getaddrinfo=deny
from fastapi.testclient import TestClient
from src.cells.cell24.app import app
results=[]
with TestClient(app) as client:
 for suffix in ['metrics','agents','interventions','journey_flow']:
  r=client.get('/api/v1/composition/'+suffix);results.append({'path':suffix,'status':r.status_code,'body':r.json()})
print(json.dumps({'observed_at':datetime.datetime.now(datetime.timezone.utc).isoformat(),'source_checkout':'33686c9fc605b5498119aa8e18435280bcd458b8','method':'Actual app ASGI via TestClient; socket/DNS guard; no production calls','network_attempts':attempts,'results':results},indent=2))
← All docsView source on GitHub →