# Offline transformation for the bundled synthetic fixture only. import hashlib from pathlib import Path import sys source = Path(__file__).with_name("synthetic-raw.log").read_text() if hashlib.sha256(source.encode()).hexdigest() != "5fed748badd05d428a1e56db0a121ccb8cbf3f3c2212084ac3b34a25b04166cf": raise SystemExit("Refusing input: use only the unchanged bundled synthetic fixture.") replacements = {'SYNTHETIC_REQ_004': '[REQUEST_1]', 'SYNTHETIC_ORDER_071': '[ORDER_1]', 'person@example.invalid': '[EMAIL_1]', 'SYNTHETIC_AUTH_D08': '[AUTH_REMOVED]', 'SYNTHETIC_COOKIE_D08': '[COOKIE_REMOVED]'} for old, new in replacements.items(): source = source.replace(old, new) sys.stdout.write(source)