"""Verify all local model files against the recorded fixed-revision manifest.""" import hashlib,json,pathlib root=pathlib.Path(__file__).resolve().parents[1] manifest=json.loads((root/'models/manifest.json').read_text()) assert manifest['repo']=='Xenova/all-MiniLM-L6-v2' assert manifest['revision']=='751bff37182d3f1213fa05d7196b954e230abad9' for item in manifest['files']: data=(root/'models'/manifest['repo']/item['path']).read_bytes() assert len(data)==item['bytes'],f"Size mismatch: {item['path']}" assert hashlib.sha256(data).hexdigest()==item['sha256'],f"Hash mismatch: {item['path']}" print('Verified',len(manifest['files']),'pinned local model artifacts.')