Enable reviewed Liam dances and add playback-driven voice status

This commit is contained in:
zenord
2026-10-14 21:35:51 +08:00
parent 5c4ea077ee
commit 376e4a347e
14 changed files with 278 additions and 16 deletions
+6
View File
@@ -41,6 +41,10 @@ assert text(home).count('IconButton(')==1
assert 'Alignment.BottomEnd' in text(home) and 'size(48.dp)' in text(home)
assert 'WindowInsets.safeDrawing' in text(home)
assert 'settingsOpen=true' in text(home)
assert text(home).index('avatar()') < text(home).index('VoiceStatusView(it)')
assert 'Alignment.TopEnd' in text(home) and '.padding(12.dp).size(36.dp)' in text(home)
assert 'update={it.state=voiceStatus}' in text(home)
assert 'voiceStatus: com.gorios.lanvoice.VoiceStatusView.State=com.gorios.lanvoice.VoiceStatusView.State.IDLE' in source
no_calls(home,['Text','TextButton','Button','OutlinedButton','AvatarDiagnostics','ExpressionControls','settings'])
assert 'rememberSaveable { mutableStateOf(false) }' in text(scaffold)
assert text(sheet).count('settings()')==1 and text(sheet).count('settingsOpen=false')==2
@@ -91,6 +95,8 @@ status=text(block('fun StartupStatus'))
assert 'if(stage!="preparing" && !connecting) return' in status
assert 'if(stage=="preparing")' in status and 'if(connecting)' in status
assert 'end=88.dp' in text(home) and 'StartupStatus(' in text(home)
assert 'VoiceStatusView.State.valueOf(state.voiceIndicator.name)' in text(block('fun CallScreen'))
assert 'voiceStatus=' not in text(block('fun EngineeringPreviewScreen'))
assert 'remember(mediaBinding) { StartupAvatarView' in source
assert 'LaunchedEffect(resumed,restart,override,danceActive,pack)' in source
assert 'if(!BuildConfig.AVATAR_STARTUP_FIX) avatarPack = AvatarPack.load(this)' in activity
+10 -1
View File
@@ -20,10 +20,15 @@ parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('--gateway-source',type=Path,default=ROOT/'gateway',
help='Existing canonical source or read-only snapshot; never changes/deploys the gateway')
parser.add_argument('--unreviewed-index-sha',default='',help='Also replay actual no-action Liam HELLO and ready/pending offers of this unregistered pin')
parser.add_argument('--reviewed-index-sha',default='',help='Existing registered exact pin to offer in actual production HELLO; does not change the registry')
args=parser.parse_args()
if args.unreviewed_index_sha:
import re
assert re.fullmatch('[0-9a-f]{64}',args.unreviewed_index_sha)
if args.reviewed_index_sha:
import re
assert re.fullmatch('[0-9a-f]{64}',args.reviewed_index_sha)
assert args.reviewed_index_sha in json.loads((args.gateway_source/'reviewed_action_packs.json').read_text())
gateway_root=args.gateway_source.resolve(strict=True)
snapshot=gateway_root/'SNAPSHOT.json'
if snapshot.exists():
@@ -57,6 +62,7 @@ with tempfile.TemporaryDirectory(prefix='character-handshake-') as folder:
hello_file=stage/'hello.jsonl'
subprocess.run([ns['JAVA'],'-Dcharacter.helloFile='+str(hello_file),
'-Dcharacter.unreviewedPin='+args.unreviewed_index_sha,
'-Dcharacter.reviewedPin='+args.reviewed_index_sha,
'-Dcharacter.personas='+','.join(personas),'-cp',
str(stage/'classes')+':'+ns['cp'],'HandshakeCheckKt'],check=True,timeout=30)
hellos=[json.loads(row) for row in hello_file.read_text().splitlines()]
@@ -108,6 +114,9 @@ for hello in hellos:
assert profile.call_count==(1 if persona=='default' else 0)
assert ack['action_available']==bool(negotiate(hello,configured_packs()))
assert ack['action_pending']==bool(pending_pin(hello,configured_packs()))
if REVIEWED:
assert ack['action_available']==('action_pack_sha256' in hello)
assert ack['action_pending']==('action_pending_pack_sha256' in hello)
if hello.get('action_pack_sha256')==UNREVIEWED or hello.get('action_pending_pack_sha256')==UNREVIEWED:
assert not ack['action_available'] and not ack['action_pending']
assert ack['conversation_id'] not in ids;ids.append(ack['conversation_id'])
@@ -127,5 +136,5 @@ for persona in sorted({x['persona'] for x in hellos}-{'default'}):
ws.receive_json();ids.append(ack['conversation_id'])
assert state.busy is False
print('PASS: '+str(len(ids))+' canonical ASGI WS handshakes from actual Android HELLO; personas='+','.join(sorted({x["persona"] for x in hellos}))+'; explicit persona ignores active_profile, server-locks voice/language, fresh CID, ready/pending exact pin and disconnect busy cleanup; 0 ASR/LLM/TTS calls, synthetic-only')
'''.replace('UNREVIEWED',repr(args.unreviewed_index_sha))
'''.replace('UNREVIEWED',repr(args.unreviewed_index_sha)).replace('REVIEWED',repr(args.reviewed_index_sha))
subprocess.run([sys.executable,'-c',runner],cwd=stage,check=True,timeout=30)