Add Liam waiting poses with capture and playback fences
This commit is contained in:
@@ -266,6 +266,34 @@ if args.user_asset_candidate:
|
||||
startup_main=startup_main.replace('packages.size==5','packages.size=='+str(len(index['conversationPackages'])))
|
||||
startup_main=startup_main.replace('packages=5|bridge_mouths=8','packages='+str(len(index['conversationPackages']))+
|
||||
'|bridge_mouths='+str(sum('mouthRuntimeManifest' in e for e in index['edges'])))
|
||||
if args.user_asset_candidate and index.get('waiting'):
|
||||
# Use the actual APK's local waiting contract, not the old emotion-idle policy.
|
||||
header=main[:main.index(' run {')]
|
||||
dance=main[main.index(' for(initial in listOf('):main.index(' println("HOST_REPLAY|')]
|
||||
main=header+r'''
|
||||
for(pose in index.waiting!!.poses) {
|
||||
val(view,binding,trace)=rig();var finished=0;var failed=0
|
||||
binding.waitingListener { binding.waitingEligible(false);binding.playWaitingPose(it,{finished++},{failed++}) }
|
||||
binding.waitingEligible(true)
|
||||
val driver=view.javaClass.getDeclaredField("driver").apply { isAccessible=true }.get(view) as ConversationMediaDriver
|
||||
driver.javaClass.getDeclaredField("queuedPose").apply { isAccessible=true }.set(driver,pose)
|
||||
TestScheduler.until(15_000) { trace.lastOrNull()?.second?.actual=="pose_${pose.id}" }
|
||||
TestScheduler.until(15_000) { finished==1 || failed>0 }
|
||||
check(failed==0 && finished==1 && trace.none { it.second.actual=="media_failed" })
|
||||
val frames=trace.count { it.second.actual=="pose_${pose.id}" }
|
||||
check(frames==pose.clip.frameCount && MediaPlayer.created.isEmpty() && binding.currentPackageId==index.waiting!!.idlePackage)
|
||||
println("WAITING_POSE|id=${pose.id}|actual_composed_frames=$frames|music_players=0|return=${binding.currentPackageId}|owner=${driver.layerOwner}|device=false")
|
||||
var ready=0;binding.prepareTalk({ready++},{failed++});TestScheduler.advanceBy(50)
|
||||
check(ready==1 && failed==0)
|
||||
binding.intent(mediaReply(RoleEmotion.HAPPY),true);TestScheduler.advanceBy(1500)
|
||||
check(binding.currentPackageId==index.waiting!!.talkPackage && binding.selection?.selectedEmotion==RoleEmotion.HAPPY)
|
||||
binding.intent(null,false);binding.finishTalk();TestScheduler.advanceBy(1000)
|
||||
check(binding.currentPackageId==index.waiting!!.idlePackage)
|
||||
println("TALK_IDLE|requested=happy|actual=${binding.currentPackageId}|own_mouth=true|closed_to_wait=true|device=false")
|
||||
view.dispose();TestScheduler.advanceBy(100)
|
||||
}
|
||||
'''+dance+' println("HOST_REPLAY|waiting_contract=true|both_poses=true|actual_apk_bytes=true|native_device=false|record_stop_mock=true")\n}\n'
|
||||
main=main.replace(' index.actionPack?.assets?', ' index.waiting?.poses?.forEach { CodecFixture.timelines[index.root+it.clip.path]=it.clip.ptsUs }\n index.actionPack?.assets?')
|
||||
with tempfile.TemporaryDirectory(prefix='baji-runtime-audit-') as td:
|
||||
tmp=Path(td);files=[]
|
||||
for path in (ROOT/'tests/avatar').glob('*.kt'):
|
||||
|
||||
@@ -27,7 +27,7 @@ source = ROOT/'app/src/main/java/com/gorios/lanvoice'
|
||||
suites = [
|
||||
('session','ConnectionCheckKt', [source/'diag/DiagnosticLog.kt',source/'audio/PlaybackActivity.kt', source/'audio/VoiceSession.kt', source/'avatar/ActionController.kt', source/'dialogue/ReplyEmotion.kt', source/'net/DialogueClient.kt', source/'expression/FaceCueRules.kt', source/'expression/ExpressionRules.kt', source/'expression/FaceDiagnostics.kt']),
|
||||
('playback','PlaybackCheckKt', [source/'audio/AudioPlayback.kt', source/'audio/PlaybackActivity.kt']),
|
||||
('avatar','AvatarCheckKt', [source/'diag/DiagnosticLog.kt',source/'avatar/ConversationMediaDriver.kt',source/'avatar/AvatarMediaBinding.kt',source/'avatar/OfflineDancePreview.kt',source/'avatar/EmotionActionAvatarView.kt',source/'avatar/ContinuousAvatarView.kt',source/'avatar/ConversationPackagePlanner.kt', source/'avatar/EmotionActionManifest.kt', source/'avatar/ActionController.kt', source/'avatar/RoleVisualSelection.kt', source/'avatar/ContinuousAvatarManifest.kt', source/'avatar/ContinuousMouth.kt', source/'avatar/ContinuousFramePresenter.kt', source/'avatar/ContinuousBodyRenderer.kt', source/'avatar/EngineeringGraphAdmission.kt', source/'avatar/OfflineAvatarTrace.kt', source/'avatar/NeutralGraphContract.kt', source/'avatar/SafeVideoDriver.kt', source/'avatar/CodecAnchorVideoPort.kt', source/'avatar/AutoConversation.kt', source/'avatar/SafeAvatarGraph.kt', source/'avatar/SafeTransitionPlanner.kt', source/'avatar/SafeAvatarManifest.kt', source/'avatar/TransitionDiagnostics.kt', source/'avatar/AvatarController.kt', source/'avatar/CallIntent.kt', source/'avatar/AvatarVideoView.kt', source/'audio/PlaybackActivity.kt', source/'dialogue/ReplyEmotion.kt']),
|
||||
('avatar','AvatarCheckKt', [source/'avatar/WaitingPose.kt',source/'diag/DiagnosticLog.kt',source/'avatar/ConversationMediaDriver.kt',source/'avatar/AvatarMediaBinding.kt',source/'avatar/OfflineDancePreview.kt',source/'avatar/EmotionActionAvatarView.kt',source/'avatar/ContinuousAvatarView.kt',source/'avatar/ConversationPackagePlanner.kt', source/'avatar/EmotionActionManifest.kt', source/'avatar/ActionController.kt', source/'avatar/RoleVisualSelection.kt', source/'avatar/ContinuousAvatarManifest.kt', source/'avatar/ContinuousMouth.kt', source/'avatar/ContinuousFramePresenter.kt', source/'avatar/ContinuousBodyRenderer.kt', source/'avatar/EngineeringGraphAdmission.kt', source/'avatar/OfflineAvatarTrace.kt', source/'avatar/NeutralGraphContract.kt', source/'avatar/SafeVideoDriver.kt', source/'avatar/CodecAnchorVideoPort.kt', source/'avatar/AutoConversation.kt', source/'avatar/SafeAvatarGraph.kt', source/'avatar/SafeTransitionPlanner.kt', source/'avatar/SafeAvatarManifest.kt', source/'avatar/TransitionDiagnostics.kt', source/'avatar/AvatarController.kt', source/'avatar/CallIntent.kt', source/'avatar/AvatarVideoView.kt', source/'audio/PlaybackActivity.kt', source/'dialogue/ReplyEmotion.kt']),
|
||||
('capture','CaptureCheckKt', [source/'audio/AudioCapture.kt']),
|
||||
('protocol','ProtocolCheckKt', [source/'avatar/ActionController.kt', source/'net/DialogueProtocol.kt', source/'dialogue/ReplyEmotion.kt', source/'expression/FaceCueRules.kt', source/'expression/ExpressionRules.kt']),
|
||||
]
|
||||
@@ -50,7 +50,7 @@ for name, main, real in suites:
|
||||
if args.suite and name != args.suite: continue
|
||||
with tempfile.TemporaryDirectory(prefix=f'lan-voice-{name}-') as out:
|
||||
files = list((ROOT/'tests'/name).glob('*.kt')) + real
|
||||
if name in ('session','avatar'): files.append(source/'diag/StartupTrace.kt')
|
||||
if name in ('session','avatar'): files += [source/'diag/StartupTrace.kt',source/'avatar/WaitingPose.kt',source/'avatar/ContinuousAvatarManifest.kt',source/'avatar/ContinuousMouth.kt'] if name=='session' else [source/'diag/StartupTrace.kt']
|
||||
if name in ('session','protocol'): files.append(source/'expression/PresenceRules.kt')
|
||||
if name=='avatar': files += [source/'avatar/StartupAvatarView.kt',source/'avatar/StartupLoadCache.kt']
|
||||
if name == 'avatar' and (args.runtime_manifest or args.index_manifest):
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Real offscreen production GLES fragment shader, decoded silent pose frames.
|
||||
OES is replaced with a 2D decoded surrogate; no Android GPU/performance claim.
|
||||
The one-pixel test texture verifies opacity=0 body bypass, not a runtime mouth pack.
|
||||
"""
|
||||
import argparse
|
||||
import importlib.util
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
import numpy as np
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
|
||||
def check(index,output):
|
||||
m=json.loads(index.read_bytes());source=(ROOT/'app/src/main/java/com/gorios/lanvoice/avatar/ContinuousBodyRenderer.kt').read_text()
|
||||
vertex=re.search(r'const val VERTEX="""([\s\S]*?)"""',source)[1]
|
||||
fragment=re.search(r'const val FRAGMENT="""([\s\S]*?)"""',source)[1].replace('#extension GL_OES_EGL_image_external : require','').replace('samplerExternalOES','sampler2D')
|
||||
spec=importlib.util.spec_from_file_location('golden',ROOT/'scripts/check-avatar-shader.py');module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)
|
||||
rows=[]
|
||||
with tempfile.TemporaryDirectory(prefix='waiting-pose-gles-') as td:
|
||||
tmp=Path(td);(tmp/'vertex').write_text(vertex);(tmp/'fragment').write_text(fragment)
|
||||
subprocess.run(['cc','-O2',str(ROOT/'tests/avatar-pixels/gles-golden.c'),'-lEGL','-lGLESv2','-lm','-o',str(tmp/'golden')],check=True)
|
||||
env=dict(os.environ,EGL_PLATFORM='surfaceless',LIBGL_ALWAYS_SOFTWARE='1')
|
||||
for pose in m['waiting']['poses']:
|
||||
clip=pose['clip'];w,h=clip['width'],clip['height'];frames=[0,clip['frameCount']//2,clip['frameCount']-1]
|
||||
raw=subprocess.check_output(['/home/ubuntu/gori-bin/ffmpeg','-v','error','-xerror','-i',str(index.parent/clip['path']),'-vf','select='+ '+'.join(f'eq(n\\,{i})' for i in frames),'-fps_mode','vfr','-f','rawvideo','-pix_fmt','rgba','-'],timeout=60)
|
||||
assert len(raw)==len(frames)*w*h*4
|
||||
# Deliberately opaque bright test patch: body-only must bypass even this texture.
|
||||
patch=np.array([[[255,0,255,255]]],dtype=np.uint8);(tmp/'patch.rgba').write_bytes(patch.tobytes())
|
||||
for j,i in enumerate(frames):
|
||||
body=np.frombuffer(raw[j*w*h*4:(j+1)*w*h*4],np.uint8).reshape(h,w,4);(tmp/'body.rgba').write_bytes(body.tobytes())
|
||||
for vw,vh in [(w,h),(360,800),(800,480)]:
|
||||
r=subprocess.run([str(tmp/'golden'),str(tmp/'vertex'),str(tmp/'fragment'),str(tmp/'body.rgba'),str(tmp/'patch.rgba'),str(tmp/'out.rgba'),'1','1','0','0','0',str(vw),str(vh),'0',str(w),str(h),'1','.5'],env=env,capture_output=True,text=True,check=True)
|
||||
actual=np.frombuffer((tmp/'out.rgba').read_bytes(),np.uint8).reshape(vh,vw,4)[::-1,:,:3]
|
||||
expected=module.golden(body,patch,0,0,0,vw,vh,0)
|
||||
diff=np.abs(actual.astype(int)-expected.astype(int));assert diff.max()<=2
|
||||
if (vw,vh)==(w,h):assert np.array_equal(actual,body[:,:,:3]),'native smile/body must be pixel exact'
|
||||
rows.append({'pose':pose['id'],'frame':i,'viewport':[vw,vh],'mouthOpacity':0,'maxAbsRGB':int(diff.max()),'gl':r.stdout.strip()})
|
||||
output.parent.mkdir(parents=True,exist_ok=True);output.write_text(json.dumps({'status':'passed','cases':rows,'device':'not_run','runtimeMouthTextures':0},indent=2)+'\n')
|
||||
print(f'PASS: {len(rows)} real GLES decoded pose/no-mouth/native-face/Fit pixel comparisons; Android GPU not_run')
|
||||
|
||||
if __name__=='__main__':
|
||||
p=argparse.ArgumentParser(description=__doc__);p.add_argument('--index',type=Path,required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args();check(a.index,a.output)
|
||||
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Freeze the exact authorized Liam intake as a new revision; never edit owner input.
|
||||
Only HANDOFF inventory, measured dance AAC presentation end, and local pose metadata
|
||||
are corrected. No synthesis, video re-encode, runtimeReady override or gateway admission.
|
||||
"""
|
||||
import argparse
|
||||
import hashlib
|
||||
import importlib.util
|
||||
import json
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
SOURCE_PIN='1f7b33e145e68476f3a9b1f15a3380d56cef3040fcd798a4ca19d027ea4c5ad9'
|
||||
POSES={
|
||||
'suit-adjust':('pose-source/revisions/poses-r02/media/suit-adjust.mp4',1914915,'d849ca16945d951821d315f5c76f2a6466656d8093584b2004eb0ae794bf1fb9'),
|
||||
'knuckle-check':('pose-source/revisions/poses-r01/media/knuckle-check.mp4',1525851,'c88655e370ad164cb028d1e11f4f6b5ae7aff695f26f9ecf7068349a3f25f761')}
|
||||
|
||||
def digest(p):return hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
def write(p,data):p.write_text(json.dumps(data,indent=2,ensure_ascii=False)+'\n')
|
||||
def derive(intake,output):
|
||||
source=intake/'expressions-r02';manifest=source/'manifest.json'
|
||||
assert digest(manifest)==SOURCE_PIN,'wrong intake index'
|
||||
assert not output.exists() and not output.resolve().is_relative_to(intake.resolve()),'new external revision required'
|
||||
assert not any(p.is_symlink() for p in intake.rglob('*')),'symlink input'
|
||||
m=json.loads(manifest.read_bytes());bad=[]
|
||||
for r in m['files']:
|
||||
p=source/r['path'];assert p.resolve().is_relative_to(source.resolve()) and p.is_file()
|
||||
if digest(p)!=r['sha256'] or p.stat().st_size!=r['bytes']:bad.append(r['path'])
|
||||
assert bad==['HANDOFF.md'],'unexpected inventory mismatch'
|
||||
spec=importlib.util.spec_from_file_location('gate',ROOT/'scripts/package-avatar-emotion.py')
|
||||
gate=importlib.util.module_from_spec(spec);spec.loader.exec_module(gate)
|
||||
measurements={key:gate.probe_clip(intake/row[0]) for key,row in POSES.items()}
|
||||
for key,(name,size,sha) in POSES.items():
|
||||
p=intake/name;v=measurements[key]
|
||||
assert p.stat().st_size==size and digest(p)==sha
|
||||
assert v['shape']==(720,1280) and len(v['ptsUs'])==193 and v['fps']==24 and abs(v['durationUs']-8041667)<=2
|
||||
shutil.copytree(source,output)
|
||||
corrections=[]
|
||||
for a in m['actions']:
|
||||
clip=a['clip'];actual=gate.probe_music_clip(source/clip['path'])
|
||||
if actual['audioEndUs']!=a['audioEndUs']:
|
||||
corrections.append({'field':a['id']+'.audioEndUs','source':a['audioEndUs'],'measured':actual['audioEndUs']})
|
||||
a['audioEndUs']=actual['audioEndUs']
|
||||
poses=[]
|
||||
for key,(name,size,sha) in POSES.items():
|
||||
v=measurements[key];path='waiting-poses/'+key+'.mp4';dest=output/path;dest.parent.mkdir(exist_ok=True);shutil.copyfile(intake/name,dest)
|
||||
poses.append({'id':key,'kind':'waiting_pose','mouthAllowed':False,'entryAnchor':'A','returnAnchor':'A',
|
||||
'sourcePackageId':'neutral','sourceFrame':0,'sourcePtsUs':0,'returnPackageId':'neutral','returnFrame':0,'returnPtsUs':0,
|
||||
'clip':{'path':path,'sha256':sha,'width':720,'height':1280,'frameCount':193,'durationUs':v['durationUs'],
|
||||
'fpsNumerator':24,'fpsDenominator':1,'ptsUs':v['ptsUs'],'hasAudio':False}})
|
||||
m['revision']='char-waiting-poses-r01'
|
||||
m['waiting']={'schemaVersion':1,'idlePackageId':'neutral','talkPackageId':'neutral',
|
||||
'microphoneAllowed':False,'ttsAllowed':False,'mouthAllowed':False,'poses':poses}
|
||||
provenance={'sourceIndexSha256':SOURCE_PIN,'revision':m['revision'],'authorization':'user_20261015_liam_local_waiting_poses',
|
||||
'sourceInventoryMismatches':bad,'metadataCorrections':corrections,'runtimeReadyOverridden':False,
|
||||
'talkIdle':'existing neutral145 with its own five-level patches','gatewayAdmission':'pending_new_exact_pin',
|
||||
'poseMedia':{k:{'sha256':v[2],'bytes':v[1]} for k,v in POSES.items()},'generationCalls':0}
|
||||
write(output/'PACKAGING_REVISION.json',provenance)
|
||||
(output/'HANDOFF.md').write_text('# Liam waiting poses: immutable application revision\n\n'
|
||||
'Source index: '+SOURCE_PIN+'\n\n'
|
||||
'The source HANDOFF inventory was stale. This revision corrects that row and '
|
||||
'measures AAC presentation ends without changing media bytes. All original runtimeReady '
|
||||
'flags remain unchanged; exact user-authorized debug admission requires the production checker.\n\n'
|
||||
'neutral (145 frames, own N×5 patches) is the dedicated TALK idle. During silent waiting, '
|
||||
'rotate ordinary idle and two local waiting poses. Before a pose, confirm actual AudioRecord '
|
||||
'stop. No ASR input, TTS, audio track or mouth patches during pose. Return only after actual '
|
||||
'final video frame, decoder release and actual composed neutral frame0. '
|
||||
'This is separate from transparent expression patch intervals, where TTS may continue.\n\n'
|
||||
'Both original dance videos are byte-identical. New exact index gateway registration is pending; '
|
||||
'this packaging does not authorize network dance, installation or production deployment.\n')
|
||||
table={r['path']:r for r in m['files']}
|
||||
refs=[r['runtimeManifest'] for r in m['conversationPackages']]+[e['mouthRuntimeManifest'] for e in m['edges'] if 'mouthRuntimeManifest' in e]
|
||||
omitted=[]
|
||||
for ref in refs:
|
||||
p=source/ref['path'];assert digest(p)==ref['sha256'],'runtime reference hash drift'
|
||||
if ref['path'] not in table:
|
||||
omitted.append(ref['path']);table[ref['path']]={'path':ref['path'],'sha256':digest(p),'bytes':p.stat().st_size}
|
||||
provenance['sourceInventoryOmissions']=omitted
|
||||
write(output/'PACKAGING_REVISION.json',provenance)
|
||||
for name in ['HANDOFF.md','PACKAGING_REVISION.json',*[p['clip']['path'] for p in poses]]:
|
||||
p=output/name;table[name]={'path':name,'sha256':digest(p),'bytes':p.stat().st_size}
|
||||
m['files']=[table[k] for k in sorted(table)];write(output/'manifest.json',m)
|
||||
assert 'manifest.sha256' not in table,'self-pin must be external to index files'
|
||||
(output/'manifest.sha256').write_text(digest(output/'manifest.json')+' manifest.json\n')
|
||||
return {**provenance,'indexSha256':digest(output/'manifest.json'),'files':len(m['files'])}
|
||||
|
||||
if __name__=='__main__':
|
||||
p=argparse.ArgumentParser(description=__doc__);p.add_argument('--intake',type=Path,required=True);p.add_argument('--output',type=Path,required=True)
|
||||
a=p.parse_args();print(json.dumps(derive(a.intake,a.output),indent=2))
|
||||
@@ -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')
|
||||
|
||||
@@ -99,6 +99,8 @@ def verify(apk, profile, version, media_bundle='black-correct03',frame_zoom=1,fr
|
||||
for field, value in {'AVATAR_NETWORK_ACTIONS_ALLOWED': media.get('networkActionsAllowed',False), 'AVATAR_USER_ASSET_CANDIDATE': True,
|
||||
'PERMISSION_CONNECTION_RETENTION': role['permissionConnectionRetention']}.items():
|
||||
require(dex_values.get(field) == str(value).lower(), 'APK DEX boolean mismatch: '+field)
|
||||
if 'WAITING_POSES_ENABLED' in dex_values or version>=40:
|
||||
require(dex_values.get('WAITING_POSES_ENABLED') == str(media.get('waitingContract',False)).lower(), 'APK DEX waiting gate mismatch')
|
||||
require(dex_values.get('VERSION_CODE') == str(version) and
|
||||
dex_values.get('VERSION_NAME') == '"0.7.14'+role['versionSuffix']+'"', 'APK DEX version mismatch')
|
||||
for field,value in [('AVATAR_FRAME_ZOOM',frame_zoom),('AVATAR_FRAME_CENTER_Y',frame_center_y)]:
|
||||
@@ -126,6 +128,7 @@ def verify(apk, profile, version, media_bundle='black-correct03',frame_zoom=1,fr
|
||||
'index_sha256': media['indexSha256'], 'media_bundle':media_bundle, 'asset_files_verified':len(selected['files']),
|
||||
'assets_unchanged': len(selected['files']) if media_bundle=='black-correct03' else None,
|
||||
'network_actions_allowed':media.get('networkActionsAllowed',False),
|
||||
'waiting_contract_enabled':media.get('waitingContract',False),
|
||||
'framing_zoom':frame_zoom,'framing_center_y':frame_center_y,
|
||||
'poster_resources_unchanged': 2, 'provider_authorities': authorities,
|
||||
'actual_dex_verified': True, 'device': 'not_run', 'gateway_changed': False}
|
||||
|
||||
@@ -89,6 +89,7 @@ def selection(assets, profile='main', *, emotion_sha='', user_assets=False, mout
|
||||
base = bundle['assetRoot']
|
||||
index = json.loads(add(base + 'manifest.json', emotion_sha))
|
||||
require(index['identityId'] == bundle['identityId'] and index['packId'] == bundle['packId'], 'media identity mismatch')
|
||||
require(bool(index.get('waiting')) == bundle.get('waitingContract',False), 'waiting contract/catalog mismatch')
|
||||
declared = {relative(r['path']): r for r in index['files']}
|
||||
|
||||
def payload(name, sha):
|
||||
@@ -112,6 +113,8 @@ def selection(assets, profile='main', *, emotion_sha='', user_assets=False, mout
|
||||
payload(edge['clip']['path'], edge['clip']['sha256'])
|
||||
if edge.get('mouthRuntimeManifest'):
|
||||
runtime(edge['mouthRuntimeManifest'])
|
||||
for pose in index.get('waiting',{}).get('poses',[]):
|
||||
payload(pose['clip']['path'],pose['clip']['sha256'])
|
||||
for action in index['actions']:
|
||||
payload(action['clip']['path'], action['clip']['sha256'])
|
||||
if startup:
|
||||
|
||||
Reference in New Issue
Block a user