"""Verify the source-connected calculation's distributed numerical artifacts.""" from pathlib import Path import hashlib,json ROOT=Path(__file__).resolve().parents[1] v=json.loads((ROOT/'provenance/source_verification.json').read_text()) for p,h in v['distributed_derived_artifact_sha256'].items(): actual=hashlib.sha256((ROOT/p).read_bytes()).hexdigest() if actual!=h:raise ValueError(f'Checksum mismatch: {p}') print('PASS',p) print('All five independently transferred artifact hashes match the source-session receipts.')