from pathlib import Path import hashlib, json, shutil, subprocess root = Path(__file__).resolve().parents[1] source = 'd0896ced75fea73bcda6bd14f259a34503840704' assert subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=root, text=True).strip() == source subprocess.run(['git', 'diff', '--exit-code', source, '--', 'crates', 'Cargo.toml', 'Cargo.lock'], cwd=root, check=True) sha = lambda path: hashlib.sha256(path.read_bytes()).hexdigest() target = Path('C:/Users/User/Documents/Git/ARCADIA-Studio/.local/target-gnullvm/debug/arcadia-studio.exe') runtime = Path('C:/ar-save-01a0d717/.local/native46/bin/libunwind.dll') fixture = root/'harness/experiments/wrapped-label-20261001/fixture/eight-card.json' assert sha(runtime) == 'f45604a12e8bcd839fd86f667c1be1cc7c4f9da2b3c69ff381ac708f0e1ae7d4' assert sha(fixture) == '9db1015369f450d5810c96a01fddb8a009d57f6aafbda5182703f15ded23d9c8' for profile in ['F', 'E']: run = root/('.local/native-wrapped-'+profile) run.mkdir(exist_ok=False) (run/'bin').mkdir(); (run/'working').mkdir(); (run/'captures').mkdir() for original, destination in [(target, run/'bin/arcadia-studio.exe'), (runtime, run/'bin/libunwind.dll'), (fixture, run/'working/eight-card.json')]: shutil.copyfile(original, destination) assert sha(original) == sha(destination) record = {'source': source, 'experiment': 'bounded measured multiline labels; not production acceptance', 'label_profile': profile, 'compiler_profile': 'dev/unoptimized', 'target': 'x86_64-pc-windows-gnullvm', 'files': {p.relative_to(run).as_posix(): {'bytes': p.stat().st_size, 'sha256': sha(p)} for p in [run/'bin/arcadia-studio.exe', run/'bin/libunwind.dll', run/'working/eight-card.json']}} (run/'baseline.json').write_text(json.dumps(record, indent=2)+'\n', encoding='utf-8') print(json.dumps(record, indent=2))