Wire legal idle variants and validate dance media offline

This commit is contained in:
zenord
2026-10-13 05:33:27 +08:00
parent 04d73b4361
commit a113bd4bb3
8 changed files with 283 additions and 11 deletions
+19
View File
@@ -138,6 +138,25 @@ fun actualMediaViewCheck() {
check(statuses.size==before);cases++
actionView.dispose();TestScheduler.advanceBy(100)
}
// New idle rows use the actual view/renderer/codec path and reviewed graph.
reset()
val idleIndex=mediaFixtureIndex().let { it.copy(actionPack=null,visuals=it.visuals.map { p->p.copy(emotion=RoleEmotion.NEUTRAL) }) }
val (idleView,idleBinding,idleTrace)=rig(idleIndex)
TestScheduler.advanceBy(3000)
check(idleTrace.all { it.actual=="body_neutral" });cases++
TestScheduler.until { idleBinding.currentPackageId in setOf("happy","sad") }
val firstIdle=idleBinding.currentPackageId
check(idleTrace.any { it.actual=="bridge" } && idleBinding.visualStatus=="neutral_idle_variant");cases++
TestScheduler.until { idleBinding.currentPackageId=="neutral" }
TestScheduler.until { idleBinding.currentPackageId in setOf("happy","sad") }
check(idleBinding.currentPackageId!=firstIdle && idleTrace.none { it.actual=="media_failed" });cases++
idleBinding.intent(mediaReply(RoleEmotion.NEUTRAL),true)
TestScheduler.until { idleBinding.currentPackageId=="neutral" }
val speechStart=idleTrace.size;TestScheduler.advanceBy(9000)
check(idleTrace.drop(speechStart).all { it.actual=="body_neutral" });cases++
val beforeDispose=idleTrace.size;idleView.dispose();TestScheduler.advanceBy(1000)
check(idleTrace.size==beforeDispose && driverField.get(idleView)==null && CodecFixture.releases>=7);cases++
// Real renderer path over a25-frame own-mouth bridge, no loop or endpoint patches.
reset()
val ownBridge=dynamicPack(25,24,"f".repeat(64)).copy(root="bridge25/")