|
|
|
@@ -269,7 +269,7 @@ def reviewed_actions(index,pin,registry):
|
|
|
|
|
|
|
|
|
|
def tested_source(full=False):
|
|
|
|
|
client=json.loads((ROOT/'logs/avatar-safe-061/client-tests.json').read_text())
|
|
|
|
|
require(client['status']=='passed' and client['jvm_entry_points']==9,'client regression evidence')
|
|
|
|
|
require(client['status']=='passed' and client['jvm_entry_points'] in (9,10),'client regression evidence')
|
|
|
|
|
for name,digest in client['hashes'].items(): require(file_sha(ROOT/name)==digest,'untested source: '+name)
|
|
|
|
|
if full:
|
|
|
|
|
evidence=read_json(ROOT/'logs/action-emotion/full-release/checks.json')
|
|
|
|
@@ -304,14 +304,19 @@ def verify_runtime_fix_assets(built,pin,startup_fix=False):
|
|
|
|
|
return len([p for p in paths(new) if p.startswith('assets/'+ASSET_ROOT)])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def publish(report,output,requested,full=False,runtime_fix=False,playback_diagnostic=False,playback_clock_fix=False,startup_fix=False,presence_candidate=False,face_diagnostics_fix=False):
|
|
|
|
|
def publish(report,output,requested,full=False,runtime_fix=False,playback_diagnostic=False,playback_clock_fix=False,startup_fix=False,presence_candidate=False,face_diagnostics_fix=False,camera_compatibility_fix=False):
|
|
|
|
|
require(all(edge.get('nativeLoop') is True or 'mouthRuntimeManifest' in edge for edge in read_json(ROOT/'app/src/main/assets'/ASSET_ROOT/'manifest.json')['edges']),
|
|
|
|
|
'live emotion release needs bridge-own TALK runtimes')
|
|
|
|
|
tested_source(full);packaging_tests_current();require(file_sha(ROLLBACK)==ROLLBACK_SHA,'rollback drift')
|
|
|
|
|
tested_source(full);packaging_tests_current();
|
|
|
|
|
if camera_compatibility_fix:
|
|
|
|
|
require(read_json(ROOT/'logs/avatar-safe-061/client-tests.json').get('camera_callback_replay') is True,
|
|
|
|
|
'camera compatibility needs production controller callback replay')
|
|
|
|
|
require(file_sha(ROLLBACK)==ROLLBACK_SHA,'rollback drift')
|
|
|
|
|
version=next_version((ROOT/'artifacts').glob('*.apk'))
|
|
|
|
|
if requested is not None:
|
|
|
|
|
require(requested>=version,'version code occupied');version=requested
|
|
|
|
|
require(not full or version>=18,'full candidate needs code >=18')
|
|
|
|
|
require(not camera_compatibility_fix or face_diagnostics_fix and version>=25,'camera compatibility needs diagnostics and fresh code >=25')
|
|
|
|
|
require(not face_diagnostics_fix or presence_candidate and version>=24,'face diagnostics needs presence and fresh code >=24')
|
|
|
|
|
require(not presence_candidate or startup_fix and version>=23,'presence candidate needs startup and fresh code >=23')
|
|
|
|
|
require(not startup_fix or full and version>=22 and report['manifest_sha256']==RUNTIME_FIX_PIN,'startup fix release shape')
|
|
|
|
@@ -322,9 +327,9 @@ def publish(report,output,requested,full=False,runtime_fix=False,playback_diagno
|
|
|
|
|
require(not runtime_fix or full and version>=19 and report['manifest_sha256']==RUNTIME_FIX_PIN,'runtime fix release shape')
|
|
|
|
|
subprocess.run([str(ROOT/'scripts/build.sh'),'assembleDebug','compileDebugAndroidTestKotlin','-PavatarActionCandidate=true',
|
|
|
|
|
'-PavatarNatural=true','-PavatarMouthCandidate=true','-PnaturalManifestSha='+LEGACY_PIN,
|
|
|
|
|
'-PemotionManifestSha='+report['manifest_sha256'],'-PactionVersionCode='+str(version),'-PavatarFullActionCandidate='+str(full).lower(),'-PavatarRuntimeFix='+str(runtime_fix).lower(),'-PavatarPlaybackDiagnostic='+str(playback_diagnostic).lower(),'-PavatarPlaybackClockFix='+str(playback_clock_fix or startup_fix).lower(),'-PavatarStartupFix='+str(startup_fix).lower(),'-PpresenceCandidate='+str(presence_candidate).lower(),'-PfaceDiagnosticsFix='+str(face_diagnostics_fix).lower()],check=True,cwd=ROOT)
|
|
|
|
|
'-PemotionManifestSha='+report['manifest_sha256'],'-PactionVersionCode='+str(version),'-PavatarFullActionCandidate='+str(full).lower(),'-PavatarRuntimeFix='+str(runtime_fix).lower(),'-PavatarPlaybackDiagnostic='+str(playback_diagnostic).lower(),'-PavatarPlaybackClockFix='+str(playback_clock_fix or startup_fix).lower(),'-PavatarStartupFix='+str(startup_fix).lower(),'-PpresenceCandidate='+str(presence_candidate).lower(),'-PfaceDiagnosticsFix='+str(face_diagnostics_fix).lower(),'-PcameraCompatibilityFix='+str(camera_compatibility_fix).lower()],check=True,cwd=ROOT)
|
|
|
|
|
built=ROOT/'app/build/outputs/apk/debug/app-debug.apk';badge=badging(built)
|
|
|
|
|
version_name='0.7.6' if face_diagnostics_fix else '0.7.5' if presence_candidate else '0.7.4' if startup_fix else '0.7.3' if playback_clock_fix else '0.7.2' if playback_diagnostic else '0.7.1' if runtime_fix else ('0.7.0' if full else '0.7.0-emotion-dev')
|
|
|
|
|
version_name='0.7.7' if camera_compatibility_fix else '0.7.6' if face_diagnostics_fix else '0.7.5' if presence_candidate else '0.7.4' if startup_fix else '0.7.3' if playback_clock_fix else '0.7.2' if playback_diagnostic else '0.7.1' if runtime_fix else ('0.7.0' if full else '0.7.0-emotion-dev')
|
|
|
|
|
for text in ("name='com.gorios.lanvoice'",f"versionCode='{version}'",f"versionName='{version_name}'","sdkVersion:'26'","targetSdkVersion:'34'"):
|
|
|
|
|
require(text in badge,'APK metadata: '+text)
|
|
|
|
|
require(re.search(r'^native-code: (.+)$',badge,re.M)[1].strip()=="'arm64-v8a'",'APK ABI')
|
|
|
|
@@ -344,8 +349,8 @@ def publish(report,output,requested,full=False,runtime_fix=False,playback_diagno
|
|
|
|
|
if startup_fix: require('AVATAR_STARTUP_FIX = true' in config.read_text(),'compiled startup flag mismatch')
|
|
|
|
|
require(version>=next_version((ROOT/'artifacts').glob('*.apk')),'version became occupied during build')
|
|
|
|
|
if startup_fix or runtime_fix or playback_diagnostic or playback_clock_fix: require(verify_runtime_fix_assets(built,report['manifest_sha256'],startup_fix)==len(report['files']),'runtime fix file count')
|
|
|
|
|
stem='face-diagnostics' if face_diagnostics_fix else 'presence' if presence_candidate else 'startup-fix' if startup_fix else 'playback-clock-fix' if playback_clock_fix else 'playback-diagnostic' if playback_diagnostic else 'runtime-fix' if runtime_fix else ('action-emotion' if full else 'emotion-candidate')
|
|
|
|
|
release='v076' if face_diagnostics_fix else 'v075' if presence_candidate else 'v074' if startup_fix else 'v073' if playback_clock_fix else 'v072' if playback_diagnostic else 'v071' if runtime_fix else 'v070'
|
|
|
|
|
stem='camera-compat' if camera_compatibility_fix else 'face-diagnostics' if face_diagnostics_fix else 'presence' if presence_candidate else 'startup-fix' if startup_fix else 'playback-clock-fix' if playback_clock_fix else 'playback-diagnostic' if playback_diagnostic else 'runtime-fix' if runtime_fix else ('action-emotion' if full else 'emotion-candidate')
|
|
|
|
|
release='v'+version_name.split('-')[0].replace('.','')
|
|
|
|
|
artifact=ROOT/f'artifacts/lan-voice-{release}-{stem}-code{version}-arm64-debug.apk'
|
|
|
|
|
with artifact.open('xb') as f,built.open('rb') as source: shutil.copyfileobj(source,f)
|
|
|
|
|
digest=file_sha(artifact);checksum=f'{digest} {artifact.name}\n'.encode()
|
|
|
|
@@ -359,7 +364,7 @@ def publish(report,output,requested,full=False,runtime_fix=False,playback_diagno
|
|
|
|
|
'certificate_sha256':CERT,'manifest_sha256':report['manifest_sha256'],'dance_available':full,'action_count':report['action_count'],
|
|
|
|
|
'http_bytes_verified':True,'device':'not_run','naturalness':'not_certified','paid_calls':0,
|
|
|
|
|
'gateway_deployed':bool(full and read_json(ROOT/'logs/action-emotion/full-release/checks.json').get('gateway_deployed',False)),
|
|
|
|
|
'gateway_deployed_by_packager':False,'runtime_fix':runtime_fix,'diagnostic_only':playback_diagnostic,'playback_clock_fix':playback_clock_fix or startup_fix,'startup_fix':startup_fix,'presence_candidate':presence_candidate,'face_diagnostics_fix':face_diagnostics_fix,'runtime_files_unchanged_from_code18':len(report['files']) if startup_fix or runtime_fix or playback_diagnostic or playback_clock_fix else None}
|
|
|
|
|
'gateway_deployed_by_packager':False,'runtime_fix':runtime_fix,'diagnostic_only':playback_diagnostic,'playback_clock_fix':playback_clock_fix or startup_fix,'startup_fix':startup_fix,'presence_candidate':presence_candidate,'face_diagnostics_fix':face_diagnostics_fix,'camera_compatibility_fix':camera_compatibility_fix,'runtime_files_unchanged_from_code18':len(report['files']) if startup_fix or runtime_fix or playback_diagnostic or playback_clock_fix else None}
|
|
|
|
|
(output/'delivery.json').write_text(json.dumps(delivery,indent=2)+'\n')
|
|
|
|
|
return delivery
|
|
|
|
|
|
|
|
|
@@ -381,8 +386,9 @@ def main():
|
|
|
|
|
parser.add_argument('--startup-fix',action='store_true',help='0.7.4 immediate shell/background strict admission, exact frozen runtime plus tiny derived bootstrap')
|
|
|
|
|
parser.add_argument('--presence-candidate',action='store_true',help='0.7.5 presence-triggered assistant turns, frozen runtime and startup assets')
|
|
|
|
|
parser.add_argument('--face-diagnostics-fix',action='store_true',help='0.7.6 local camera readiness/recovery and presence diagnostics; frozen assets')
|
|
|
|
|
parser.add_argument('--camera-compatibility-fix',action='store_true',help='0.7.7 bounded low-resolution native YUV camera session recovery; frozen assets')
|
|
|
|
|
args=parser.parse_args();
|
|
|
|
|
require(sum((args.runtime_fix,args.playback_diagnostic,args.playback_clock_fix,args.startup_fix,args.presence_candidate,args.face_diagnostics_fix))<=1,'choose one build purpose')
|
|
|
|
|
require(sum((args.runtime_fix,args.playback_diagnostic,args.playback_clock_fix,args.startup_fix,args.presence_candidate,args.face_diagnostics_fix,args.camera_compatibility_fix))<=1,'choose one build purpose')
|
|
|
|
|
manifest=args.manifest.resolve(strict=True);output=args.output.resolve()
|
|
|
|
|
require(not output.exists() and not output.is_relative_to(manifest.parent),'new evidence outside owner root required')
|
|
|
|
|
if args.import_only or args.publish: require(args.pi_pin==args.sha256 and re.fullmatch('[0-9a-f]{64}',args.pi_pin or ''),'external Pi pin required')
|
|
|
|
@@ -399,7 +405,7 @@ def main():
|
|
|
|
|
require(not args.previous_pin and not args.backup,'previous import report required')
|
|
|
|
|
import_files(manifest.parent,report['files'],target)
|
|
|
|
|
(output/'import.json').write_text(json.dumps({'externally_pinned_sha256':args.pi_pin,'files':len(report['files']),'naturalness':'not_certified'})+'\n')
|
|
|
|
|
result=publish(report,output,args.version_code,bool(report['action_count']),args.runtime_fix,args.playback_diagnostic,args.playback_clock_fix,args.startup_fix or args.presence_candidate or args.face_diagnostics_fix,args.presence_candidate or args.face_diagnostics_fix,args.face_diagnostics_fix) if args.publish else {k:v for k,v in report.items() if k!='files'}
|
|
|
|
|
result=publish(report,output,args.version_code,bool(report['action_count']),args.runtime_fix,args.playback_diagnostic,args.playback_clock_fix,args.startup_fix or args.presence_candidate or args.face_diagnostics_fix or args.camera_compatibility_fix,args.presence_candidate or args.face_diagnostics_fix or args.camera_compatibility_fix,args.face_diagnostics_fix or args.camera_compatibility_fix,args.camera_compatibility_fix) if args.publish else {k:v for k,v in report.items() if k!='files'}
|
|
|
|
|
print(json.dumps(result,indent=2))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|