Integrate exact user-authorized correct03 720 debug assets with isolated admission
This commit is contained in:
@@ -11,6 +11,7 @@ fun main() {
|
||||
reportedActionClockCheck()
|
||||
playbackDiagnosticCheck()
|
||||
boundedRuntimeDiagnosticCheck()
|
||||
userCandidateAdmissionCheck()
|
||||
dynamicBodyCheck()
|
||||
actionCheck()
|
||||
emotionActionCheck()
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
package com.gorios.lanvoice
|
||||
object BuildConfig { const val AVATAR_USER_ASSET_CANDIDATE=false }
|
||||
@@ -1,2 +1,2 @@
|
||||
package com.gorios.lanvoice
|
||||
object R { object drawable { const val startup_poster=1 } }
|
||||
object R { object drawable { const val startup_poster=1;const val startup_black_tulle_poster=2 } }
|
||||
|
||||
@@ -26,6 +26,13 @@ fun startupCacheCheck() {
|
||||
receipt.complete(key(install=2));check(!receipt.contains(key()) && receipt.contains(key(install=2)))
|
||||
} finally { folder.deleteRecursively() }
|
||||
} finally { worker.shutdownNow() }
|
||||
val userPin="208f703ed92bf795bfeb78a1cef89b67bed2e45da80038a56157fd1ecd4cfa93"
|
||||
val userKey=StartupAssetKey(31,1,userPin,"avatar/a01-black-tulle-roomy720-correct03/",3)
|
||||
check(userKey.fingerprint!=key(pin=userPin,validator=3).fingerprint)
|
||||
for((root,pin,version) in listOf(Triple("avatar/unknown/",userPin,3),
|
||||
Triple(userKey.root,"b".repeat(64),3),Triple(userKey.root,userPin,2))) {
|
||||
check(runCatching { StartupAssetKey(31,1,pin,root,version) }.isFailure)
|
||||
}
|
||||
println("PASS: production startup shared-future concurrency/cancel/cache/failure-retry and atomic immutable APK receipt corruption/install/pin/version/validator invalidation")
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import com.gorios.lanvoice.avatar.*
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun userCandidateAdmissionCheck() {
|
||||
val hash="c".repeat(64);val root=dynamicRuntimeFixture(97,24,1,hash,720,1280)
|
||||
val rows=root["patches"] as List<Map<String,Any?>>
|
||||
val compact=root+("patches" to rows.map { it-"path"-"sha256" })
|
||||
fun read(m: Map<String,Any?>,user: Boolean=false,debug: Boolean=true,expected: String=hash)=
|
||||
ContinuousAvatarManifest.read(m,hash,expected,debug,"fixture/",userAuthorizedDebug=user)
|
||||
val admitted=checkNotNull(read(compact));check(admitted.textureImages.size==485 && admitted.patches.first().path.endsWith("l4.png"))
|
||||
val candidate=compact+("runtimeReady" to false)
|
||||
check(read(candidate)==null);checkNotNull(read(candidate,true))
|
||||
check(read(candidate,true,false)==null);check(read(candidate,true,true,"b".repeat(64))==null)
|
||||
check(read(candidate+("publishApproval" to true),true)==null)
|
||||
check(read(candidate-"runtimeReady",true)==null)
|
||||
check(read(continuousFixture()+("runtimeReady" to false),true)==null)
|
||||
check(read(compact+("patches" to listOf(rows[0]+("path" to "patches/wrong.png"))+rows.drop(1)))==null)
|
||||
check(read(compact+("patches" to listOf(rows[0]-"sha256")+rows.drop(1)))==null)
|
||||
check(read(compact+("patches" to listOf(rows[0]-"path")+rows.drop(1)))==null)
|
||||
val levels=rows[0]["levels"] as List<Map<String,Any?>>
|
||||
check(read(compact+("patches" to listOf((rows[0]-"path"-"sha256")+("levels" to levels.dropLast(1)))+rows.drop(1)))==null)
|
||||
check(read(candidate+("body" to (root["body"] as Map<String,Any?>)+("width" to 480)),true)==null)
|
||||
println("PASS: user-authorized debug-only candidate admission; default/release/hash/self-approval/legacy fences retained; schema2 level-only tracks and explicit-alias consistency, malformed levels rejected")
|
||||
}
|
||||
Reference in New Issue
Block a user