Files
sized/scripts/check-core.py
T
gamertan e0707447ad
Sized Linux checks / Linux AMD64 / Rust 1.88.0 (pull_request) Successful in 4m54s
Sized Linux checks / Linux AMD64 / Rust 1.88.0 (push) Successful in 4m57s
Adopt pinned public core snapshot and prepare Sized 2.0.0
2026-10-10 13:11:02 -04:00

15 lines
660 B
Python
Executable File

#!/usr/bin/env python3
"""Verify the exact public core snapshot without contacting its private forge."""
import hashlib
import json
from pathlib import Path
root = Path(__file__).resolve().parent.parent
pin = json.loads((root / 'CORE-SNAPSHOT.json').read_text())
snapshot = root / 'crates/sized-core'
actual = {str(p.relative_to(snapshot)): hashlib.sha256(p.read_bytes()).hexdigest()
for p in snapshot.rglob('*') if p.is_file()}
if actual != pin['files']:
raise SystemExit('Core snapshot differs from CORE-SNAPSHOT.json; review the upstream pin and every changed file.')
print(f"Core snapshot verified: {pin['revision']} ({len(actual)} files)")