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
@@ -168,3 +168,55 @@ class CharacterProfilesTests(unittest.TestCase):
self.assertIn('-PcharacterMediaBundle=char-expressions-r02',flags)
self.assertTrue(select.catalog()['mediaBundles']['char-expressions-r02']['networkActionsAllowed'])
self.assertIn('Network dance requires separate reviewed media registration',(ROOT/'app/build.gradle').read_text())
class WaitingPackTests(unittest.TestCase):
def selected(self,profile='liam-test'):
row=select.catalog()['mediaBundles']['char-waiting-poses-r01']
return select.selection(ASSETS,profile,emotion_sha=row['indexSha256'],user_assets=True,mouth=True,startup=True,media_bundle='char-waiting-poses-r01')
def test_new_pack_is_liam_only_with_two_real_body_only_poses(self):
row=select.catalog()['mediaBundles']['char-waiting-poses-r01']
selected=self.selected();root=ASSETS/row['assetRoot']
index=json.loads((root/'manifest.json').read_bytes())
self.assertEqual(selected['persona'],'liam')
self.assertEqual(index['waiting']['talkPackageId'],'neutral')
self.assertEqual([p['id'] for p in index['waiting']['poses']],['suit-adjust','knuckle-check'])
for pose in index['waiting']['poses']:
self.assertIn(row['assetRoot']+pose['clip']['path'],selected['files'])
self.assertIs(pose['clip']['hasAudio'],False)
self.assertNotIn('mouthRuntimeManifest',pose)
self.assertFalse(any('char-expressions-r02/' in p or 'black-tulle' in p for p in selected['files']))
for profile in ('main','lvbu-test'):
with self.assertRaises(ValueError):self.selected(profile)
def test_frozen_media_and_candidate_flags_are_preserved(self):
new=select.catalog()['mediaBundles']['char-waiting-poses-r01']
old=select.catalog()['mediaBundles']['char-expressions-r02']
a=ASSETS/new['assetRoot'];b=ASSETS/old['assetRoot']
m=json.loads((a/'manifest.json').read_bytes())
for action in m['actions']:
name=action['clip']['path']
self.assertEqual((a/name).read_bytes(),(b/name).read_bytes())
for r in m['conversationPackages']:
runtime=json.loads((a/r['runtimeManifest']['path']).read_bytes())
self.assertIs(runtime['runtimeReady'],False)
self.assertFalse(new['networkActionsAllowed'])
self.assertTrue(old['networkActionsAllowed'])
self.assertEqual(new['minimumVersionCode'],40)
def test_pose_corruption_is_rejected(self):
row=select.catalog()['mediaBundles']['char-waiting-poses-r01']
target=ASSETS/row['assetRoot']/'waiting-poses/suit-adjust.mp4';original=Path.read_bytes
with patch.object(Path,'read_bytes',lambda p:b'bad' if p==target else original(p)),self.assertRaises(ValueError):self.selected()
def test_inventory_receipt_records_actual_source_gaps(self):
row=select.catalog()['mediaBundles']['char-waiting-poses-r01']
root=ASSETS/row['assetRoot'];m=json.loads((root/'manifest.json').read_bytes())
table={r['path']:r for r in m['files']}
refs=[r['runtimeManifest'] for r in m['conversationPackages']]+[r['mouthRuntimeManifest'] for r in m['edges'] if 'mouthRuntimeManifest' in r]
self.assertTrue(all(ref['path'] in table and table[ref['path']]['sha256']==ref['sha256'] for ref in refs))
provenance=json.loads((ROOT/'manifests/liam-waiting-poses-r01-provenance.json').read_bytes())
self.assertEqual(provenance['sourceInventoryMismatches'],['HANDOFF.md'])
self.assertEqual(len(provenance['sourceInventoryOmissions']),7)
self.assertFalse(provenance['runtimeReadyOverridden'])