fr26-readonly-probe.py
import sys,json,socket
from unittest.mock import patch
sys.path.insert(0,'.')
attempts=[]
def deny(*a,**k):attempts.append('network');raise AssertionError('offline')
with patch.object(socket.socket,'connect',deny),patch.object(socket,'getaddrinfo',deny):
from src.cells.cell24.app import app
from fastapi.testclient import TestClient
with TestClient(app) as client:
res=client.post('/api/v1/correlation/analyze',json={'variables':['fixture-a','fixture-b']})
print(json.dumps({'source':'4c218e4fc','scope':'actual Docker app ASGI offline','path':'/api/v1/correlation/analyze','status':res.status_code,'response':res.json(),'network_attempts':attempts,'mounted_correlation_paths':[r.path for r in app.routes if 'correlation' in r.path]}))
assert not attempts