Research source · python

build-release.py

site/public/evidence/dehn-filled-quantum-trace/peripheral-projection-attack/build-release.py

38 lines. Source is displayed for inspection; it is not executed by this page.

File fingerprint

SHA-256: 7e33727306e285db59cf1fddfb6eef998cd89657731e78ba6e553c96ab947e94

#!/usr/bin/env python3
"""Run exact certificates and package this supporting research note."""
from pathlib import Path
import hashlib
import json
import subprocess
import sys
import zipfile

root = Path(__file__).resolve().parent
run = subprocess.run([sys.executable, str(root/'verify-peripheral-projection.py')],
                     capture_output=True, text=True, check=True, cwd=root)
(root/'verification-output.txt').write_text(run.stdout)
result = json.loads((root/'exact-results.json').read_text())
assert result['status'] == 'passed'
archive = 'peripheral-projection-attack.zip'
excluded = {archive, 'SHA256SUMS.txt', 'ARCHIVE-SHA256.txt', 'archive-validation.txt'}
payload = sorted(p for p in root.iterdir() if p.is_file() and p.name not in excluded)
digest = lambda data: hashlib.sha256(data).hexdigest()
(root/'SHA256SUMS.txt').write_text(''.join(f'{digest(p.read_bytes())}  {p.name}\n' for p in payload))
with zipfile.ZipFile(root/archive, 'w') as z:
    for p in sorted(payload + [root/'SHA256SUMS.txt']):
        info = zipfile.ZipInfo(p.name, (2026, 9, 8, 0, 0, 0))
        info.external_attr = 0o100644 << 16
        z.writestr(info, p.read_bytes(), compress_type=zipfile.ZIP_DEFLATED, compresslevel=9)
sha = digest((root/archive).read_bytes())
(root/'ARCHIVE-SHA256.txt').write_text(f'{sha}  {archive}\n')
with zipfile.ZipFile(root/archive) as z:
    assert z.testzip() is None
    for p in payload + [root/'SHA256SUMS.txt']:
        assert z.read(p.name) == p.read_bytes()
(root/'archive-validation.txt').write_text(
    f"PASS: {result['check_count']} exact algebra certificates.\n"
    f"PASS: {len(payload)} payload files hashed and matched after extraction.\n"
    f"Archive SHA-256: {sha}\n"
    'Boundary: integral normal homology, convergence, and sourced inversion remain proof dependencies.\n'
    'No actual separate-cusp value or conjecture resolution established.\n')
print((root/'archive-validation.txt').read_text(), end='')