verify_readback.py

back to table · edit · history · where entries came from · files · download

875 bytes, as of the version from 2026-11-17 12:35 (current). Recorded here, not run.

import hashlib
import json
from pathlib import Path
import sys

import numberdb.sage as numberdb
from generate import HeatTrace


folder = Path(__file__).parent
numberdb.configure(api_key=sys.stdin.read().strip())
report = HeatTrace().verify(sample=None)
assert report.checked == report.matched == 69
assert not report.differing and not report.missing
result = {
    'table': 'T733', 'sample': None, 'checked': report.checked,
    'matched': report.matched, 'differing': report.differing,
    'missing': report.missing, 'refined': report.refined,
    'coarser': report.coarser,
    'generator_sha256': hashlib.sha256((folder / 'generate.py').read_bytes()).hexdigest(),
    'scope': 'Authenticated live readback; reproduction, not an independent mathematical check',
}
(folder / 'verify-results.json').write_text(json.dumps(result, indent=2) + '\n')
print(json.dumps(result))