Source identity
| Field | Recorded value |
|---|---|
| Source type | archive member |
| Original record | verify_originals.py |
| Date | Not specified in source |
| Path or archive member | archives/libsrc-b5cb90ed4bd7/AI_DEEP_SCAN_2026-10-14_v2/checks/verify_originals.py |
| Original SHA-256 | b7f4523e8ddbcf02e105222d37a139c26c41e538ee70fc605ecf58c45f9e0a06 |
| Reading-copy SHA-256 | b7f4523e8ddbcf02e105222d37a139c26c41e538ee70fc605ecf58c45f9e0a06 |
| Archive source | {"sourceId": "libsrc-b5cb90ed4bd7", "member": "AI_DEEP_SCAN_2026-10-14_v2/checks/verify_originals.py"} |
Recovered source transcript
Download complete source text ↓22 lines · 1.0 KB
"""Verify the selected source bytes against recorded GitHub Git blob IDs."""
from __future__ import annotations
import hashlib
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
records = json.loads((ROOT/'manifests/local_verified_files.json').read_text())
failures = []
for record in records:
p = ROOT/'verified_source'/record['repo'].split('/',1)[1]/record['path']
if not p.is_file():
failures.append(f"Missing: {p.relative_to(ROOT)}")
continue
data = p.read_bytes()
actual = hashlib.sha1(b'blob '+str(len(data)).encode()+b'\0'+data).hexdigest()
sha256 = hashlib.sha256(data).hexdigest()
if actual != record['expected_git_blob_sha1'] or sha256 != record['sha256'] or len(data) != record['bytes']:
failures.append(f"Mismatch: {p.relative_to(ROOT)}")
if failures:
raise SystemExit('\n'.join(failures))
print(f'{len(records)}/{len(records)} selected original files match their recorded Git blob IDs, lengths, and SHA-256 checksums.')