feat: add aperture mouth candidate and early foreground permissions

Route runtime04 curve values to five source-frame lip geometries with level0 body bypass and spatial opacity1 for all other levels. Preserve the continuous decoded body clock and clean home. Request normal permissions after foreground host layout independently of network; support offline manual consent without capture or connection. Add strict 97x5 parsing, renderer and permission regressions, offline EGL shader pixel goldens and exact debug-candidate packaging. Naturalness, visible talk, device colors and perceived response remain pending.
This commit is contained in:
zenord
2026-10-12 22:55:20 +08:00
parent 9ea5eb31c1
commit 7d8ea95f07
22 changed files with 677 additions and 155 deletions
+13 -3
View File
@@ -40,21 +40,31 @@ for name, main, real in suites:
with tempfile.TemporaryDirectory(prefix=f'lan-voice-{name}-') as out:
files = list((ROOT/'tests'/name).glob('*.kt')) + real
if name == 'avatar' and args.runtime_manifest:
definitions=[]
def kotlin(value):
if value is None: return 'null'
if isinstance(value,bool): return str(value).lower()
if isinstance(value,str): return json.dumps(value,ensure_ascii=False).replace('$','\\$')
if isinstance(value,int): return str(value)+'L'
if isinstance(value,float): return repr(value)
if isinstance(value,list): return 'listOf<Any?>('+','.join(map(kotlin,value))+')'
if isinstance(value,dict): return 'mapOf<String,Any?>('+','.join(kotlin(k)+' to '+kotlin(v) for k,v in value.items())+')'
if isinstance(value,(list,dict)):
result=('listOf<Any?>('+','.join(map(kotlin,value))+')' if isinstance(value,list) else
'mapOf<String,Any?>('+','.join(kotlin(k)+' to '+kotlin(v) for k,v in value.items())+')')
# Actual97x5 metadata exceeds a single JVM method. Preserve every
# field while splitting literal construction into bounded helpers.
method='metadata'+str(len(definitions))
kind='List<Any?>' if isinstance(value,list) else 'Map<String,Any?>'
definitions.append('private fun '+method+'(): '+kind+' = '+result+'\n')
return method+'()'
raise TypeError(type(value))
import hashlib
raw=args.runtime_manifest.read_bytes();digest=hashlib.sha256(raw).hexdigest()
extra=Path(out)/'ActualRuntimeCheck.kt'
extra.write_text('import com.gorios.lanvoice.avatar.*\nfun main() {\nval root='+kotlin(json.loads(raw))+'\n'+
literal=kotlin(json.loads(raw))
extra.write_text('import com.gorios.lanvoice.avatar.*\n'+''.join(definitions)+'fun main() {\nval root='+literal+'\n'+
'val pack=checkNotNull(ContinuousAvatarManifest.read(root,"'+digest+'","'+digest+'",true,"runtime/"))\n'+
'check(pack.patches.size==97 && pack.body.frameCount==97 && pack.curves.size==5)\n'+
('check(pack.apertureMode && pack.textureImages.size==485 && pack.patches.all { it.levels.size==5 })\n' if json.loads(raw)['packId'].endswith('runtime-04') else 'check(!pack.apertureMode && pack.textureImages.size==97)\n')+
'println("PASS: actual exported runtime manifest parsed by production Kotlin, exact hash '+digest+'; 97 body/patch frames and five authored curves/routing")\n}\n')
files.append(extra)
subprocess.run([JAVA,'-cp',compiler,'org.jetbrains.kotlin.cli.jvm.K2JVMCompiler','-no-stdlib',