Add Liam waiting poses with capture and playback fences

This commit is contained in:
zenord
2026-10-15 01:51:00 +08:00
parent 72e68a4166
commit 654630dea5
28 changed files with 1102 additions and 43 deletions
+9 -1
View File
@@ -153,6 +153,14 @@ def check_bundle(manifest,expected,output,user_authorized_debug=False):
require(len(measured['ptsUs'])==clip['frameCount'] and len(clip['ptsUs'])==clip['frameCount'],'decoded clip N mismatch: '+name)
require(all(abs(a-b)<=2 for a,b in zip(measured['ptsUs'],clip['ptsUs'])),'decoded clip PTS mismatch: '+name)
require(abs(measured['durationUs']-clip['durationUs'])<=2 and measured['fps']==Fraction(clip['fpsNumerator'],clip['fpsDenominator']),'decoded clip timing mismatch: '+name)
pose_measurements=[]
for pose in index.get('waiting',{}).get('poses',[]):
clip=pose['clip'];name=relative(clip['path']);path=add(name,clip['sha256'],64_000_000)
require(pose['kind']=='waiting_pose' and clip['hasAudio'] is False and pose['mouthAllowed'] is False,'silent waiting pose contract')
measured=probe_clip(path)
require(measured['shape']==(clip['width'],clip['height']) and len(measured['ptsUs'])==clip['frameCount']==len(clip['ptsUs']),'pose decoded shape/N')
require(all(abs(a-b)<=2 for a,b in zip(measured['ptsUs'],clip['ptsUs'])) and abs(measured['durationUs']-clip['durationUs'])<=2 and measured['fps']==Fraction(clip['fpsNumerator'],clip['fpsDenominator']),'pose decoded PTS/timing')
pose_measurements.append({'id':pose['id'],**{k:v for k,v in measured.items() if k!='fps'}})
action_measurements=[]
for action in actions:
clip=action['clip'];name=relative(clip['path']);path=add(name,clip['sha256'],128_000_000)
@@ -185,7 +193,7 @@ def check_bundle(manifest,expected,output,user_authorized_debug=False):
for name,row in files.items(): require(file_sha(locate(root,name))==row['sha256'],'bundle changed during gate')
report={'status':'passed','scope':'read_only_machine_gate_no_approval_no_activation','manifest_sha256':expected,
'user_authorized_debug':user_authorized_debug,'runtime_packages':runtimes,'combined_rgba_bytes':rgba,'referenced_files':len(files),'preview_files_not_packaged':len(table.keys()-files.keys()),
'edge_count':len(index['edges']),'action_count':len(actions),'dance_available':False,
'pose_measurements':pose_measurements,'edge_count':len(index['edges']),'action_count':len(actions),'dance_available':False,
'candidate_dance_validated':bool(actions),'action_measurements':action_measurements,'production_kotlin_index':'passed',
'naturalness':'not_certified','real_device':'not_run','files':files}
(output/'bundle-gate.json').write_text(json.dumps(report,indent=2)+'\n')