"""컷·연결·새 버전 미디어와 실제 실행 증거를 검사한다.""" import hashlib import json from pathlib import Path import jsonschema ROOT=Path(__file__).resolve().parents[3] PROJECT=ROOT/'projects/water-hydrogen-bond-surface-tension' def read(path): return json.loads(path.read_text(encoding='utf-8')) if __name__=='__main__': a=read(PROJECT/'stages/08-scenes/r2/artifact.json') b=read(PROJECT/'stages/09-entities/r2/artifact.json') schema=read(ROOT/'contracts/artifact.schema.json') jsonschema.validate(a,schema) jsonschema.validate(b,schema) cuts=read(PROJECT/'stages/07-cuts/r1/artifact.json')['payload'] ids=[c['id'] for c in cuts['cuts']] assert len(ids)==31 and len(cuts['captions'])==38 and cuts['narration_duration_ms']==110560 assert cuts['cuts'][0]['start_ms']==0 and cuts['cuts'][-1]['end_ms']==110560 assert all(00 for change in view['mean_absolute_pixel_change']) path=ROOT/view['mobile_view_path'] assert hashlib.sha256(path.read_bytes()).hexdigest()==view['mobile_view_sha256'] assets.append(dict(path=view['mobile_view_path'],sha256=view['mobile_view_sha256'])) (PROJECT/'stages/08-scenes/r2/design-check.json').write_text(json.dumps(result,ensure_ascii=False,indent=2)+'\n',encoding='utf-8') print('DESIGN_GREEN: 31 cuts, 30 boundaries, 38 captions, 6 actual samples')