python /workspace/scratch/verify_final.py > /workspace/scratch/verify_final.log
chmod 644 /workspace/output/catalogue.sla /workspace/output/catalogue_press.pdf /workspace/output/handoff.json /workspace/output/assets/*.png
chmod 755 /workspace/output /workspace/output/assets
python - <<'PY'
import json,os
from PIL import Image
h=json.load(open('/workspace/output/handoff.json'));assert h['version']=='ultimate-v13' and len(h['skus'])==24
for x in h['skus']:
 assert os.path.exists('/workspace/input/'+x['source_frame']);p='/workspace/output/'+x['asset'];im=Image.open(p);assert im.mode=='RGBA' and 'icc_profile' in im.info
 x0,y0=x['crop_origin_px'];assert x0>=0 and y0>=0 and x0+im.width<=2400 and y0+im.height<=1600
print('Handoff: 24 linked, profiled, crop-only RGBA masters; all source-frame mappings and crop bounds verified.')
PY
grep -E 'PDF/X-4|ICC bytes|All copy|Native image' /workspace/scratch/verify_final.log
cat /workspace/scratch/reopen_errors.json
find /workspace/output -maxdepth 1 -type f -printf '%f\n'