from pathlib import Path
import sys

root = Path('/opt/ai-avatar-demo/models/qwen3-tts-12hz-1b7-base')
blockers = []
for p in root.rglob('*'):
    if not p.is_file():
        continue
    try:
        head = p.read_bytes()[:200]
    except Exception as e:
        blockers.append((str(p), 'READ_FAIL', repr(e)))
        continue
    if b'version https://git-lfs.github.com/spec/v1' in head:
        blockers.append((str(p), 'LFS_POINTER', head.decode('utf-8', 'ignore')))

print('lfs_pointer_files_found', blockers)
if blockers:
    print('BLOCKED_LFS_POINTER_FILES_FOUND')
    sys.exit(1)
else:
    print('ALL_FILES_ARE_REAL_BINARIES')
