0.102.0: Vortex Prime, Afterburn and Afterburn premiere idents
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,10 +18,9 @@ class PresentationTest {
|
||||
|
||||
@Test fun everyApprovedBlockKeyHasItsIdent() {
|
||||
val keys = SmartChannels.flatMap { it.dayParts }.map { it.key }.filter { it.isNotEmpty() }.toSet()
|
||||
// Riot 3, After Dark 3, Horror, Gold, Three, Vortex, Orbit 2 2, Ring X 7 (six nights and PPV), Terra, and the Vortex Afterburn premiere.
|
||||
assertEquals(21, keys.size)
|
||||
// The premiere's own ident isn't made yet: until it is, the standard Vortex ident plays (Stage D1).
|
||||
assertEquals(setOf("vortex.afterburn.premiere"), keys - BlockIdents.keys)
|
||||
// Riot 3, After Dark 3, Horror, Gold, Three, Vortex 4 (Movie Night, Prime, Afterburn and its premiere), Orbit 2 2, Ring X 7 (six nights and PPV), Terra.
|
||||
assertEquals(23, keys.size)
|
||||
assertEquals(emptySet<String>(), keys - BlockIdents.keys)
|
||||
assertTrue(keys.all { PRESENTATION_KEY.matches(it) })
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ import java.io.File
|
||||
* Four weeks of top-ups on every channel from copies of the box's committed plans and pools, run by hand:
|
||||
* ORBIT_REPLAY_DIR=<copies of the box's files> ./gradlew :app:testDebugUnitTest --tests '*ReplayFingerprintTest*'
|
||||
* Writes replay-fingerprints.txt there, one line per channel: a fingerprint of every programme booked and why. Run it
|
||||
* on two versions of the app to show which channels a change touches. Needs 0.97.0 or later (weighted rotation).
|
||||
* on two versions of the app to show which channels a change touches. ORBIT_FINGERPRINT_DUMP=<name> also writes each
|
||||
* channel's full list, to see exactly what changed. Needs 0.97.0 or later (weighted rotation).
|
||||
*/
|
||||
class ReplayFingerprintTest {
|
||||
private val dir = System.getenv("ORBIT_REPLAY_DIR")?.let(::File)
|
||||
@@ -56,6 +57,7 @@ class ReplayFingerprintTest {
|
||||
now += 6 * 60 * 60_000L
|
||||
}
|
||||
val text = all.joinToString("\n") { "${it.startMs} ${it.seriesId} ${it.mark} ${it.media.item.id} ${it.why} ${it.presentation}" }
|
||||
System.getenv("ORBIT_FINGERPRINT_DUMP")?.let { File(dir, "$it-${programming.number}.txt").writeText(text) }
|
||||
val digest = java.security.MessageDigest.getInstance("SHA-256").digest(text.toByteArray()).joinToString("") { "%02x".format(it) }.take(16)
|
||||
val committedDigest = java.security.MessageDigest.getInstance("SHA-256").digest(all.take(committed.entries.size).joinToString("\n") { "${it.startMs} ${it.seriesId} ${it.mark} ${it.media.item.id} ${it.why} ${it.presentation}" }.toByteArray()).joinToString("") { "%02x".format(it) }.take(16)
|
||||
out.appendLine("${programming.number} committed=$committedDigest kept=${all.take(committed.entries.size) == committed.entries} fourWeeks=$digest programmes=${all.size}")
|
||||
|
||||
Reference in New Issue
Block a user