"""Run checks for the current article without touching legacy receipts.""" from pathlib import Path import argparse,hashlib,json,subprocess,sys ROOT = Path(__file__).resolve().parent def main(): parser = argparse.ArgumentParser() parser.add_argument('--output', type=Path, default=ROOT.parent/'verification/current_checks') args = parser.parse_args(); args.output.mkdir(parents=True, exist_ok=True) results = [] for name in ['check.py','endtoend.py','check_two_state_nodes.py','check_singular_boundary.py']: source = ROOT/'unified'/name result = subprocess.run([sys.executable,str(source)],capture_output=True,text=True) log = args.output/(source.stem+'.log');log.write_text(result.stdout+result.stderr) results.append({'script':str(source.relative_to(ROOT)), 'sha256':hashlib.sha256(source.read_bytes()).hexdigest(), 'exit_code':result.returncode,'log':str(log.name)}) if result.returncode: print(result.stdout+result.stderr,file=sys.stderr) raise SystemExit(result.returncode) summary={'status':'PASS_CURRENT_FINITE_CHECKS','results':results, 'scope':'Finite identities and examples; floating spectra are diagnostic. Not full proof or novelty verification.'} (args.output/'CHECKS.json').write_text(json.dumps(summary,indent=2)+'\n') print(json.dumps(summary,indent=2)) if __name__ == '__main__':main()