base-probe.py

import sys,json,socket
from pathlib import Path
root=Path(sys.argv[1]);sys.path.insert(0,str(root/'src/cells/identity_attribution'));sys.path.insert(0,str(root/'src/cells/identity_attribution/tests'))
def deny(*args,**kwargs):raise RuntimeError('network disabled for fixture probe')
socket.create_connection=deny;socket.getaddrinfo=deny
from identity_cell.config import settings
settings.kms_pepper=''
from identity_cell.crypto.hashing import hash_email
from identity_cell.pipeline.privacy_gate import PrivacyGate
from test_privacy import _clean_envelope
report=PrivacyGate().evaluate(_clean_envelope())
print(json.dumps({'fixture_only':True,'network_disabled':True,'configured_pepper':settings.kms_available,'deterministic_hash_without_pepper':hash_email('synthetic@example.invalid')==hash_email('synthetic@example.invalid'),'privacy_gate':report.model_dump()},indent=2,default=str))
← All docsView source on GitHub →