Reconcile all83 observed Semrush URLs and make complete CI verification independent of PyPI
Rebuild V2 candidate verification / candidate (push) Failing after 1m27s

This commit is contained in:
huncode committed 2026-10-26 19:08:48 +03:00
1 parent 44c5797144
commit e8cef39175
89 files changed
+110413 -1374

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
"""Check exact vendored pure-Python source hashes before importing them."""
from pathlib import Path
import hashlib
import json
ROOT = Path(__file__).resolve().parent / 'vendor'
manifest = json.loads((ROOT / 'manifest.json').read_text())
expected = set()
for item in manifest['files']:
path = ROOT / item['path']
path.resolve().relative_to(ROOT.resolve())
assert path.is_file(), f"Missing vendored file: {item['path']}"
assert hashlib.sha256(path.read_bytes()).hexdigest() == item['sha256'], f"Vendor hash mismatch: {item['path']}"
expected.add(item['path'])
actual = {p.relative_to(ROOT).as_posix() for p in ROOT.rglob('*')
if p.is_file() and p.name != 'manifest.json' and '__pycache__' not in p.parts and p.suffix != '.pyc'}
assert actual == expected, f'Unmanifested vendor files: {actual ^ expected}'
print(json.dumps(dict(status='verified', files=len(expected),
packages=[dict(name=p['distribution'], version=p['version']) for p in manifest['packages']]), indent=2))