Weighted rotation rollout proposal for Tots, ToonZ, Odyssey, Wild and Orbit X (read-only replay, nothing in the app)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m53s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m34s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-04 00:12:55 +00:00
co-authored by Claude Opus 5.5
parent 8ee32b86f8
commit 039bd71805
3 changed files with 358 additions and 0 deletions
@@ -0,0 +1,144 @@
package tv.orbit.classic
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assume.assumeTrue
import org.junit.Test
import java.io.File
/**
* The rollout proposal after Orbit Three (4 November 2026): read-only, nothing here is used by the app. For Tots, ToonZ,
* Odyssey, Wild and Orbit X, four weeks of new bookings after each committed plan, from copies of the box's files, both
* the rule each channel has today and weighted rotation with the tiers proposed from its own brief:
* ORBIT_REPLAY_DIR=<copies of the box's files> ./gradlew :app:testDebugUnitTest --tests '*RolloutProposalReplayTest*'
* Writes rollout-proposal-replay.txt there.
*/
class RolloutProposalReplayTest {
private val dir = System.getenv("ORBIT_REPLAY_DIR")?.let(::File)
private val zone = java.time.ZoneId.of("Europe/London")
private val day = 24 * 60 * 60_000L
private val hour = 60 * 60_000L
private class Proposal(val number: Int, val name: String, val tiers: Map<String, Double>, val note: String, val alternatives: List<Pair<String, Map<String, Double>>> = emptyList())
private fun tiers(core: List<String>, surprise: List<String> = emptyList(), other: Map<String, Double> = emptyMap()) =
core.associate { seriesKey(it) to TIER_CORE } + surprise.associate { seriesKey(it) to TIER_SURPRISE } + other.mapKeys { seriesKey(it.key) }
// Each channel's tiers, from its own brief in docs/channels. Anything not named is supporting (2).
private val proposals = listOf(
Proposal(614, "Tots", emptyMap(), "No tiers in the brief: every show equal (2), so airtime is shared by minutes, not by episode count.",
listOf("Night Garden anchors bedtime (3), Clangers and BeddyByes light (1)" to tiers(listOf("In The Night Garden"), surprise = listOf("Clangers", "BeddyByes")))),
Proposal(605, "ToonZ", tiers(listOf("Looney Tunes", "Tom and Jerry", "Scooby-Doo, Where Are You!", "The Flintstones", "The Jetsons", "The Yogi Bear Show", "Popeye the Sailor", "Popeye")),
"Core 3 and supporting 2 from the brief. The British teatime trio counts as supporting (2), not surprise: teatime is their block.",
listOf("teatime trio at 3, level with the core" to tiers(listOf("Looney Tunes", "Tom and Jerry", "Scooby-Doo, Where Are You!", "The Flintstones", "The Jetsons", "The Yogi Bear Show",
"Popeye the Sailor", "Popeye", "Danger Mouse", "Count Duckula", "Bananaman")))),
Proposal(202, "Odyssey", tiers(listOf("The Universe", "How the Universe Works", "Cosmos", "Cosmos: A Spacetime Odyssey", "Wonders of the Universe", "Wonders of the Solar System",
"Horizon", "Through the Wormhole", "The Sky at Night", "The Planets (2019)", "Wonders of Life", "Human Universe", "Forces of Nature with Brian Cox",
"Brian Cox's Adventures in Space and Time", "When We Left Earth: The NASA Missions", "Impossible Engineering", "Extreme Engineering", "Megastructures")),
"Core 3 and supporting 2 from the brief. The Journeys titles are equal (2) within their weekend block."),
Proposal(203, "Wild", tiers(listOf("Man vs. Wild", "Running Wild with Bear Grylls", "Survivorman", "Dual Survival", "Naked and Afraid", "Alone", "Survival with Ray Mears",
"Bear Grylls: Mission Survive", "The Crocodile Hunter", "River Monsters"), surprise = listOf("Dirty Jobs")),
"Core 3, supporting 2 and Dirty Jobs as the surprise (1), all from the brief."),
Proposal(603, "Orbit X", tiers(listOf("Biker Mice from Mars", "Digimon: Digital Monsters", "Teenage Mutant Ninja Turtles", "The Transformers", "He-Man and the Masters of the Universe",
"ThunderCats", "Gargoyles", "The Real Ghostbusters", "Power Rangers", "G.I. Joe", "Digimon Adventure", "Mighty Morphin Power Rangers", "G.I. Joe: A Real American Hero")),
"Core 3 (with the earlier names of the same shows) and supporting 2 from the brief, X-Men and Spider-Man included as the brief lists them."))
private fun plan(file: File): ChannelPlan {
val root = JSONObject(file.readText()); val rows = root.getJSONArray("entries"); val t = root.getJSONObject("tail"); val marks = t.getJSONObject("marks")
val entries = (0 until rows.length()).map { i ->
val o = rows.getJSONObject(i); val d = o.getLong("d"); val n = o.getJSONArray("n")
ScheduleEntry(o.getString("s"), EpisodeMark(n.getInt(0), n.getInt(1)), ScheduledMedia(SampleItem(o.getString("t"), o.optString("k", "Episode"), d / 60_000, "", o.getString("i"), d), o.getString("c"), d),
o.getLong("a"), o.optString("w"), o.optString("p"))
}
return ChannelPlan(entries, ScheduleCursor(if (t.isNull("last")) null else t.getString("last"),
marks.keys().asSequence().associateWith { id -> marks.getJSONArray(id).let { EpisodeMark(it.getInt(0), it.getInt(1)) } },
t.optJSONObject("shown")?.let { s -> s.keys().asSequence().associateWith { s.getLong(it) } }.orEmpty(),
t.optJSONObject("blocks")?.let { b -> b.keys().asSequence().associateWith { b.getString(it) } }.orEmpty()))
}
private fun pool(file: File): List<PoolSeries> {
val rows = JSONObject(file.readText()).getJSONArray("series")
return (0 until rows.length()).map { i ->
val o = rows.getJSONObject(i); val eps = o.getJSONArray("episodes")
PoolSeries(o.getString("id"), o.getString("title"), (0 until eps.length()).map { j ->
val e = eps.getJSONArray(j); PoolEpisode(e.getString(0), e.getString(1), EpisodeMark(e.getInt(2), e.getInt(3)), e.getString(4), e.getLong(5))
}, o.optString("group"))
}
}
private fun replay(committed: ChannelPlan, series: List<PoolSeries>, programming: ChannelProgramming, weightOf: ((PoolSeries) -> Double)?): List<ScheduleEntry> {
var current = committed
var now = committed.entries.first().startMs + SCHEDULE_KEEP_PAST_MS
val end = committed.endMs + 28 * day
val all = committed.entries.toMutableList()
while (now < end) {
current = topUpPlan(current, current.tail, series, now, programming.filmRestMs, programming.finishTogether, programming.dayParts, zone,
shuffle = programming.shuffleEpisodes, mixed = programming::mixes, weightOf = weightOf) ?: break
current.entries.filter { e -> all.none { it.startMs == e.startMs } }.forEach { all += it }
now += 6 * hour
}
all.sortBy { it.startMs }
assertEquals("${programming.name}: committed programmes kept", committed.entries, all.take(committed.entries.size))
return all.filter { it.startMs >= committed.endMs && it.startMs < end }
}
private fun pct(x: Double) = "%.0f%%".format(100 * x)
private fun report(label: String, entries: List<ScheduleEntry>, series: List<PoolSeries>, programming: ChannelProgramming, weightOf: (PoolSeries) -> Double, out: StringBuilder) {
val byId = series.associateBy { it.id }
fun tier(id: String) = when (weightOf(byId.getValue(id))) { TIER_CORE -> "core"; TIER_SURPRISE -> "surprise"; else -> "supporting" }
fun minutes(es: List<ScheduleEntry>) = es.groupBy { it.seriesId }.mapValues { (_, x) -> x.sumOf { it.media.durationMs } / 60_000.0 }
val m = minutes(entries); val total = m.values.sum()
val inBlocks = series.filter { s -> programming.dayParts.any { p -> p.titles.any { seriesKey(it) == seriesKey(s.title) } } }
out.appendLine(" $label: ${entries.size} programmes")
out.appendLine(" airtime by tier: " + listOf("core", "supporting", "surprise").joinToString { t -> "$t ${pct(m.filterKeys { tier(it) == t }.values.sum() / total)}" })
entries.groupBy { dayPartFor(series, programming.dayParts, it.startMs, zone).second }.toSortedMap().forEach { (b, es) ->
val bm = minutes(es); val bt = bm.values.sum()
val effective = 1 / bm.values.sumOf { (it / bt) * (it / bt) }
out.appendLine(" $b: core ${pct(bm.filterKeys { tier(it) == "core" }.values.sum() / bt)}, ${bm.size} shows, effectively ${"%.1f".format(effective)} equal shows; top " +
bm.entries.sortedByDescending { it.value }.take(3).joinToString { "${byId.getValue(it.key).title} ${pct(it.value / bt)}" })
}
// Repeats: the same file again, within a day and within a week.
val gapsByFile = entries.groupBy { it.media.item.id }.values.flatMap { es -> es.zipWithNext().map { (a, b) -> b.startMs - a.startMs } }
val sameDay = gapsByFile.count { it < day }; val sameWeek = gapsByFile.count { it < 7 * day }
out.appendLine(" repeats: ${entries.map { it.media.item.id }.distinct().size} different episodes; same file again within 24 h $sameDay, within 7 days $sameWeek" +
(if (gapsByFile.isNotEmpty()) ", median ${"%.1f".format(gapsByFile.sorted()[gapsByFile.size / 2] / day.toDouble())} days between repeats" else ""))
val first = entries.first().startMs; val last = entries.last().endMs
val waits = inBlocks.associate { s -> s.title to (listOf(first) + entries.filter { it.seriesId == s.id }.map { it.startMs } + listOf(last)).zipWithNext().maxOf { (a, b) -> b - a } / day.toDouble() }
val never = inBlocks.filter { s -> entries.none { it.seriesId == s.id } }.map { it.title }
out.appendLine(" starvation: never aired ${never.ifEmpty { listOf("none") }.joinToString()}; longest waits " + waits.entries.sortedByDescending { it.value }.take(4).joinToString { "${it.key} ${"%.1f".format(it.value)} d" })
val twice = entries.zipWithNext().count { (a, b) -> a.seriesId == b.seriesId }
val ordered = series.filter { !(programming.shuffleEpisodes || programming.mixes(it)) }.associateBy { it.id }
val back = entries.filter { it.seriesId in ordered }.groupBy { it.seriesId }.values.sumOf { es -> es.zipWithNext().count { (a, b) -> b.mark <= a.mark && b.mark != ordered.getValue(a.seriesId).episodes.first().mark } }
val decks = series.filter { programming.shuffleEpisodes || programming.mixes(it) }.associate { s -> s.id to shuffledEpisodes(s).map { it.mark } }
val offDeck = entries.filter { it.seriesId in decks }.groupBy { it.seriesId }.entries.sumOf { (id, es) -> val d = decks.getValue(id); es.zipWithNext().count { (a, b) -> d[(d.indexOf(a.mark) + 1) % d.size] != b.mark } }
val gaps = entries.zipWithNext().count { (a, b) -> a.endMs != b.startMs }
val outside = entries.count { e -> dayPartFor(series, programming.dayParts, e.startMs, zone).first.none { it.id == e.seriesId } }
val bursts = entries.indices.count { i -> val w = entries.drop(i).takeWhile { it.startMs < entries[i].startMs + 3 * hour }; w.size >= 4 && w.count { it.seriesId == entries[i].seriesId } * 2 > w.size }
out.appendLine(" rules: same show twice running $twice; three-hour stretches over half one show $bursts; in-order stepping back $back; shuffled off its deck $offDeck; gaps $gaps; outside its block $outside")
}
@Test fun rolloutChannels() {
assumeTrue(dir != null && dir.isDirectory)
val out = StringBuilder("Rollout proposal replays: four weeks of new bookings after each committed plan, today's rule against weighted rotation with the proposed tiers.\n" +
"Read-only: the tiers below are proposals, defined only in this test.\n\n")
for (p in proposals) {
val programming = SmartChannels.first { it.number == p.number }
val committedFile = File(dir, "schedule-${p.number}.json"); val poolFile = File(dir, "episodes-${p.number}.json")
if (!committedFile.exists() || !poolFile.exists()) { out.appendLine("== ${p.name}: no files"); continue }
val committed = plan(committedFile); val series = pool(poolFile)
val weightOf = { s: PoolSeries -> p.tiers[seriesKey(s.title)] ?: TIER_SUPPORTING }
out.appendLine("== ${p.name} (${p.number}), committed plan ends ${java.time.Instant.ofEpochMilli(committed.endMs).atZone(zone).toLocalDateTime().withNano(0)}")
out.appendLine(" ${p.note}")
if (p.tiers.isNotEmpty()) out.appendLine(" in the pool: ${series.size} shows; core ${series.count { weightOf(it) == TIER_CORE }}, supporting ${series.count { weightOf(it) == TIER_SUPPORTING }}, surprise ${series.count { weightOf(it) == TIER_SURPRISE }}")
report("Today", replay(committed, series, programming, null), series, programming, weightOf, out)
report("Weighted", replay(committed, series, programming, weightOf), series, programming, weightOf, out)
for ((label, alt) in p.alternatives) {
val altWeight = { s: PoolSeries -> alt[seriesKey(s.title)] ?: TIER_SUPPORTING }
report("Alternative, $label", replay(committed, series, programming, altWeight), series, programming, altWeight, out)
}
out.appendLine()
}
File(dir, "rollout-proposal-replay.txt").writeText(out.toString())
println(out)
}
}
@@ -0,0 +1,135 @@
Rollout proposal replays: four weeks of new bookings after each committed plan, today's rule against weighted rotation with the proposed tiers.
Read-only: the tiers below are proposals, defined only in this test.
== Tots (614), committed plan ends 2026-11-10T00:40:57
No tiers in the brief: every show equal (2), so airtime is shared by minutes, not by episode count.
Today: 2865 programmes
airtime by tier: core 0%, supporting 100%, surprise 0%
block 17-21: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 76%, CBeebies Bedtime Stories 10%, Clangers 9%
block 21-6: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 74%, CBeebies Bedtime Stories 10%, Clangers 9%
block 6-9: core 0%, 7 shows, effectively 3.3 equal shows; top Teletubbies 49%, Clifford the Big Red Dog 15%, Bluey (2018) 15%
block 9-17: core 0%, 29 shows, effectively 22.5 equal shows; top Rusty Rivets 8%, Nella the Princess Knight 6%, Shimmer and Shine 6%
repeats: 1872 different episodes; same file again within 24 h 5, within 7 days 435, median 7.1 days between repeats
starvation: never aired Balamory (2026), Andy's Dinosaur Adventures; longest waits Balamory (2026) 28.0 d, Andy's Dinosaur Adventures 28.0 d, Andy's Baby Animals 27.7 d, Andy's Wild Adventures 24.8 d
rules: same show twice running 25; three-hour stretches over half one show 510; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Weighted: 3781 programmes
airtime by tier: core 0%, supporting 100%, surprise 0%
block 17-21: core 0%, 4 shows, effectively 3.3 equal shows; top In The Night Garden 42%, BeddyByes 26%, CBeebies Bedtime Stories 22%
block 21-6: core 0%, 4 shows, effectively 3.4 equal shows; top In The Night Garden 41%, BeddyByes 25%, CBeebies Bedtime Stories 23%
block 6-9: core 0%, 9 shows, effectively 9.0 equal shows; top Something Special 11%, Balamory (2026) 11%, Andy's Dinosaur Adventures 11%
block 9-17: core 0%, 32 shows, effectively 32.0 equal shows; top Rusty Rivets 3%, Something Special 3%, Clifford the Big Red Dog 3%
repeats: 1770 different episodes; same file again within 24 h 0, within 7 days 1702, median 5.9 days between repeats
starvation: never aired none; longest waits Angelina Ballerina 1.9 d, Paw Patrol 1.9 d, Peter Rabbit (2013) 1.9 d, Clangers 1.9 d
rules: same show twice running 0; three-hour stretches over half one show 257; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Alternative, Night Garden anchors bedtime (3), Clangers and BeddyByes light (1): 3623 programmes
airtime by tier: core 28%, supporting 57%, surprise 15%
block 17-21: core 51%, 4 shows, effectively 2.9 equal shows; top In The Night Garden 51%, CBeebies Bedtime Stories 21%, BeddyByes 17%
block 21-6: core 52%, 4 shows, effectively 2.9 equal shows; top In The Night Garden 52%, CBeebies Bedtime Stories 21%, BeddyByes 17%
block 6-9: core 0%, 9 shows, effectively 9.0 equal shows; top Andy's Wild Adventures 11%, Something Special 11%, Balamory (2026) 11%
block 9-17: core 0%, 32 shows, effectively 32.0 equal shows; top Nella the Princess Knight 3%, Rusty Rivets 3%, Teletubbies 3%
repeats: 1769 different episodes; same file again within 24 h 0, within 7 days 1462, median 6.2 days between repeats
starvation: never aired none; longest waits Angelina Ballerina 1.9 d, Paw Patrol 1.9 d, Peter Rabbit (2013) 1.9 d, Rusty Rivets 1.9 d
rules: same show twice running 0; three-hour stretches over half one show 137; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
== ToonZ (605), committed plan ends 2026-11-10T10:17:11
Core 3 and supporting 2 from the brief. The British teatime trio counts as supporting (2), not surprise: teatime is their block.
in the pool: 17 shows; core 7, supporting 10, surprise 0
Today: 3852 programmes
airtime by tier: core 72%, supporting 28%, surprise 0%
block 0-6: core 61%, 17 shows, effectively 8.7 equal shows; top Looney Tunes 21%, Tom and Jerry 18%, Count Duckula 10%
block 10-16: core 76%, 14 shows, effectively 7.2 equal shows; top Looney Tunes 25%, Tom and Jerry 21%, The Flintstones 12%
block 16-18: core 72%, 10 shows, effectively 6.9 equal shows; top Looney Tunes 23%, Tom and Jerry 18%, Count Duckula 13%
block 18-0: core 76%, 14 shows, effectively 6.8 equal shows; top Looney Tunes 28%, Tom and Jerry 19%, The Flintstones 11%
block 6-10: core 76%, 14 shows, effectively 6.7 equal shows; top Looney Tunes 28%, Tom and Jerry 20%, The Flintstones 12%
repeats: 2213 different episodes; same file again within 24 h 1, within 7 days 898, median 2.4 days between repeats
starvation: never aired none; longest waits Wacky Races 16.3 d, Scooby-Doo, Where Are You! 16.0 d, Dastardly & Muttley in Their Flying Machines 14.4 d, Bananaman 13.9 d
rules: same show twice running 40; three-hour stretches over half one show 836; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Weighted: 3643 programmes
airtime by tier: core 59%, supporting 41%, surprise 0%
block 0-6: core 51%, 17 shows, effectively 16.3 equal shows; top The Jetsons 7%, The Flintstones 7%, The Yogi Bear Show 7%
block 10-16: core 60%, 14 shows, effectively 13.5 equal shows; top The Flintstones 9%, The Jetsons 9%, Looney Tunes 9%
block 16-18: core 78%, 10 shows, effectively 9.7 equal shows; top The Jetsons 11%, The Flintstones 11%, The Yogi Bear Show 11%
block 18-0: core 60%, 14 shows, effectively 13.5 equal shows; top The Flintstones 9%, Scooby-Doo, Where Are You! 9%, The Jetsons 9%
block 6-10: core 60%, 14 shows, effectively 13.5 equal shows; top Scooby-Doo, Where Are You! 9%, The Jetsons 9%, Looney Tunes 9%
repeats: 1582 different episodes; same file again within 24 h 0, within 7 days 941, median 7.3 days between repeats
starvation: never aired none; longest waits Danger Mouse 1.9 d, Count Duckula 1.8 d, Top Cat 1.1 d, The Looney Tunes Show 0.8 d
rules: same show twice running 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Alternative, teatime trio at 3, level with the core: 3657 programmes
airtime by tier: core 65%, supporting 35%, surprise 0%
block 0-6: core 68%, 17 shows, effectively 16.4 equal shows; top Count Duckula 7%, Danger Mouse 7%, Scooby-Doo, Where Are You! 7%
block 10-16: core 60%, 14 shows, effectively 13.5 equal shows; top The Jetsons 9%, Scooby-Doo, Where Are You! 9%, The Flintstones 9%
block 16-18: core 100%, 10 shows, effectively 10.0 equal shows; top Scooby-Doo, Where Are You! 11%, Looney Tunes 10%, Count Duckula 10%
block 18-0: core 60%, 14 shows, effectively 13.5 equal shows; top The Jetsons 9%, Tom and Jerry 9%, Popeye the Sailor 9%
block 6-10: core 60%, 14 shows, effectively 13.5 equal shows; top The Jetsons 9%, The Flintstones 9%, Looney Tunes 9%
repeats: 1596 different episodes; same file again within 24 h 0, within 7 days 973, median 7.3 days between repeats
starvation: never aired none; longest waits Top Cat 1.2 d, Count Duckula 1.0 d, The Looney Tunes Show 1.0 d, Danger Mouse 1.0 d
rules: same show twice running 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
== Odyssey (202), committed plan ends 2026-11-10T12:30:42
Core 3 and supporting 2 from the brief. The Journeys titles are equal (2) within their weekend block.
in the pool: 36 shows; core 17, supporting 19, surprise 0
Today: 981 programmes
airtime by tier: core 66%, supporting 34%, surprise 0%
block 18-23: core 99%, 13 shows, effectively 4.9 equal shows; top Horizon 28%, Through the Wormhole 22%, The Universe 22%
block 23-6: core 44%, 4 shows, effectively 2.8 equal shows; top Mayday 43%, The Universe 39%, Seconds From Disaster 13%
block all: core 72%, 15 shows, effectively 4.4 equal shows; top The Universe 39%, How Do They Do It? 20%, Impossible Engineering 14%
event 14-18: core 0%, 8 shows, effectively 3.7 equal shows; top The World at War 38%, Long Way Down 29%, An Idiot Abroad 18%
repeats: 759 different episodes; same file again within 24 h 0, within 7 days 153, median 5.6 days between repeats
starvation: never aired Cosmos, Wonders of the Universe, Wonders of the Solar System, James May's Man Lab, The Ascent of Man, The Story of Maths, Walking with Dinosaurs; longest waits Cosmos 28.0 d, Wonders of the Universe 28.0 d, Wonders of the Solar System 28.0 d, James May's Man Lab 28.0 d
rules: same show twice running 12; three-hour stretches over half one show 101; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Weighted: 874 programmes
airtime by tier: core 69%, supporting 31%, surprise 0%
block 18-23: core 93%, 16 shows, effectively 15.5 equal shows; top Human Universe 7%, Wonders of the Solar System 7%, Forces of Nature with Brian Cox 7%
block 23-6: core 54%, 5 shows, effectively 4.5 equal shows; top How the Universe Works 27%, The Universe 27%, Mayday 18%
block all: core 75%, 22 shows, effectively 20.8 equal shows; top Wonders of the Solar System 5%, Wonders of the Universe 5%, Forces of Nature with Brian Cox 5%
event 14-18: core 0%, 8 shows, effectively 8.0 equal shows; top The World at War 14%, Long Way Down 13%, An Idiot Abroad 13%
repeats: 551 different episodes; same file again within 24 h 0, within 7 days 248, median 5.1 days between repeats
starvation: never aired none; longest waits The Civil War 13.9 d, The Story of India 7.9 d, The World at War 7.1 d, Civilisation 7.0 d
rules: same show twice running 0; three-hour stretches over half one show 2; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
== Wild (203), committed plan ends 2026-11-10T12:10:59
Core 3, supporting 2 and Dirty Jobs as the surprise (1), all from the brief.
in the pool: 25 shows; core 10, supporting 14, surprise 1
Today: 846 programmes
airtime by tier: core 50%, supporting 50%, surprise 0%
block 18-22: core 100%, 10 shows, effectively 3.8 equal shows; top Alone 36%, Naked and Afraid 33%, Man vs. Wild 13%
block 22-6: core 0%, 7 shows, effectively 7.0 equal shows; top Swamp People 15%, Mountain Men 15%, Life Below Zero 14%
block 6-18: core 66%, 17 shows, effectively 7.0 equal shows; top Alone 24%, Naked and Afraid 23%, Whale Wars 12%
event 22-6: core 0%, 8 shows, effectively 7.9 equal shows; top Mountain Men 15%, Deadliest Catch 14%, Swamp People 14%
repeats: 830 different episodes; same file again within 24 h 0, within 7 days 0, median 25.3 days between repeats
starvation: never aired none; longest waits Dual Survival 26.8 d, Running Wild with Bear Grylls 26.2 d, Survival with Ray Mears 24.6 d, Expedition Tiger 23.4 d
rules: same show twice running 9; three-hour stretches over half one show 14; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Weighted: 896 programmes
airtime by tier: core 50%, supporting 49%, surprise 0%
block 18-22: core 100%, 10 shows, effectively 9.9 equal shows; top Naked and Afraid 11%, The Crocodile Hunter 11%, Running Wild with Bear Grylls 10%
block 22-6: core 0%, 7 shows, effectively 7.0 equal shows; top Ax Men 14%, Ice Road Truckers 14%, Life Below Zero 14%
block 6-18: core 67%, 17 shows, effectively 16.4 equal shows; top River Monsters 7%, Running Wild with Bear Grylls 7%, Man vs. Wild 7%
event 22-6: core 0%, 8 shows, effectively 7.8 equal shows; top Ax Men 14%, Ice Road Truckers 14%, Deadliest Catch 14%
repeats: 797 different episodes; same file again within 24 h 0, within 7 days 60, median 6.7 days between repeats
starvation: never aired none; longest waits Dirty Jobs 13.8 d, Shark Week 2.2 d, Whale Wars 2.2 d, Survival with Ray Mears 2.1 d
rules: same show twice running 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
== Orbit X (603), committed plan ends 2026-11-10T09:25:30
Core 3 (with the earlier names of the same shows) and supporting 2 from the brief, X-Men and Spider-Man included as the brief lists them.
in the pool: 21 shows; core 10, supporting 11, surprise 0
Today: 1838 programmes
airtime by tier: core 80%, supporting 20%, surprise 0%
block 18-23: core 67%, 19 shows, effectively 8.6 equal shows; top G.I. Joe 21%, Power Rangers 19%, X-Men: The Animated Series 12%
block 23-6: core 86%, 17 shows, effectively 6.0 equal shows; top G.I. Joe 28%, Power Rangers 26%, Teenage Mutant Ninja Turtles 8%
block 6-18: core 84%, 17 shows, effectively 6.3 equal shows; top G.I. Joe 27%, Power Rangers 25%, Teenage Mutant Ninja Turtles 8%
event 15-18: core 76%, 12 shows, effectively 8.4 equal shows; top G.I. Joe 19%, Power Rangers 18%, X-Men: The Animated Series 13%
event 7-12: core 78%, 12 shows, effectively 6.3 equal shows; top G.I. Joe 26%, Power Rangers 24%, X-Men: The Animated Series 12%
repeats: 1526 different episodes; same file again within 24 h 0, within 7 days 239, median 4.9 days between repeats
starvation: never aired Bucky O'Hare and the Toad Wars!, Visionaries: Knights of the Magical Light; longest waits Bucky O'Hare and the Toad Wars! 28.0 d, Visionaries: Knights of the Magical Light 28.0 d, She-Ra: Princess of Power 26.1 d, Street Sharks 25.9 d
rules: same show twice running 19; three-hour stretches over half one show 470; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
Weighted: 1828 programmes
airtime by tier: core 64%, supporting 36%, surprise 0%
block 18-23: core 57%, 21 shows, effectively 20.2 equal shows; top Biker Mice from Mars 6%, He-Man and the Masters of the Universe 6%, Digimon: Digital Monsters 6%
block 23-6: core 62%, 19 shows, effectively 18.3 equal shows; top G.I. Joe 6%, The Real Ghostbusters 6%, Biker Mice from Mars 6%
block 6-18: core 63%, 19 shows, effectively 18.3 equal shows; top G.I. Joe 6%, Teenage Mutant Ninja Turtles 6%, The Transformers 6%
event 15-18: core 88%, 12 shows, effectively 11.8 equal shows; top Digimon: Digital Monsters 9%, The Transformers 9%, Teenage Mutant Ninja Turtles 9%
event 7-12: core 88%, 12 shows, effectively 11.7 equal shows; top Gargoyles 9%, The Real Ghostbusters 9%, G.I. Joe 9%
repeats: 1535 different episodes; same file again within 24 h 0, within 7 days 108, median 10.2 days between repeats
starvation: never aired none; longest waits X-Men: The Animated Series 2.0 d, Spider-Man: The Animated Series 1.9 d, Bucky O'Hare and the Toad Wars! 1.3 d, M.A.S.K. 1.2 d
rules: same show twice running 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
@@ -0,0 +1,79 @@
# Weighted rotation rollout proposal: Tots, ToonZ, Odyssey, Wild, Orbit X
Read-only proposal, 4 November 2026, after 0.97.0 put weighted rotation on Orbit Three. Nothing here is implemented or installed. The tiers are defined only in the replay test (`RolloutProposalReplayTest`).
## How the figures were made
- **Inputs:** copies of the box's committed plans and real pools from 3 November.
- **Period:** for each channel, four weeks of new bookings after its committed plan ends, around 10 November.
- **Today:** the rule each channel has now (equal turns with finish-together).
- **Weighted:** the 0.97.0 rule with tiers taken from the channel's own brief in docs/channels.
- **What doesn't change:** every block, event, day, shuffle setting and committed booking stays as it is. Only how often each show is picked changes.
- **Integrity:** in every run, committed programmes are kept exactly, and there are no gaps, no programmes outside their block, no in-order show stepping back and no shuffled show leaving its deck.
- **Full figures:** docs/replays/rollout-proposal-replay-2026-11-04.txt.
"Effectively N shows" is how many equally shared shows a block's spread is worth: higher means more variety.
## The tiers proposed
- **ToonZ:** the brief's core (Looney Tunes, Tom and Jerry, Scooby-Doo, Flintstones, Jetsons, Yogi Bear, Popeye) is 3 and supporting is 2. **Recommended:** the British teatime trio (Danger Mouse, Count Duckula, Bananaman) is 3 as well, level with the core, because teatime is their block. At 2, they'd get less of teatime than they do today.
- **Odyssey:** the brief's core is 3 (the space series, Horizon, Through the Wormhole, The Sky at Night, Impossible and Extreme Engineering, Megastructures) and supporting is 2. The Journeys titles are equal within their weekend block.
- **Wild:** the brief's core is 3 (the survival shows, The Crocodile Hunter, River Monsters), supporting is 2, and Dirty Jobs is the surprise at 1.
- **Orbit X:** the brief's core is 3, including the earlier names of the same shows, and supporting is 2. X-Men and Spider-Man are supporting, as the brief lists them.
- **Tots:** the brief names no tiers, so every show is equal. One alternative was also tried: Night Garden at 3 to anchor bedtime, with Clangers and BeddyByes at 1.
## Before and after, by channel
| | Core airtime | Variety, main block | Same file within 7 days | Never aired / longest wait | Same show twice running |
|---|---|---|---|---|---|
| **Wild** today | 50% | evening ≈3.8 shows (Alone 36%, Naked and Afraid 33%) | 0 | none / 26.8 d | 9 |
| **Wild** weighted | 50% | evening ≈9.9 of 10 | 60 | none / 2.2 d (Dirty Jobs 13.8 d, Saturdays only) | 0 |
| **Orbit X** today | 80% (G.I. Joe and Power Rangers ≈50%) | evening ≈8.6 shows | 239 | Bucky O'Hare, Visionaries / 28 d | 19 |
| **Orbit X** weighted | 64%; Saturday morning and after school 88% | evening ≈20.2 of 21 | 108 | none / 2.0 d | 0 |
| **Odyssey** today | 66% | evening ≈4.9 shows (Horizon 28%) | 153 | 7 shows including Cosmos and both Wonders series / 28 d | 12 |
| **Odyssey** weighted | 69% | evening ≈15.5 of 16 | 248 | none / 13.9 d (The Civil War, weekends only) | 0 |
| **ToonZ** today | 72% (Looney Tunes and Tom and Jerry ≈45%) | daytime ≈7 shows | 898; median repeat 2.4 d | none / 16.3 d | 40 |
| **ToonZ** weighted, trio at 3 | 65%; teatime 100% core-level, trio ≈30% | daytime ≈13.5 of 14 | 973; median repeat 7.3 d | none / 1.2 d | 0 |
| **Tots** today | (no tiers) | bedtime ≈1.7 shows (Night Garden 76%); morning Teletubbies 49% | 435 | Balamory, Andy's Dinosaur / 28 d | 25 |
| **Tots** equal | (no tiers) | bedtime ≈3.3 (Night Garden 42%); morning ≈9 of 9 | 1,702 | none / 1.9 d | 0 |
| **Tots** Night Garden anchor | (no tiers) | bedtime ≈2.9 (Night Garden 51%) | 1,462 | none / 1.9 d | 0 |
Across every weighted run, no file aired again within 24 hours.
Three-hour stretches where one show takes more than half fell sharply:
| Channel | Today | Weighted |
|---|---|---|
| ToonZ | 836 | 0 |
| Orbit X | 470 | 0 |
| Wild | 14 | 0 |
| Odyssey | 101 | 2 |
| Tots | 510 | 257 (all at bedtime, explained below) |
## What the figures say
- **Wild, Orbit X and Odyssey are clear wins.**
- Starvation ends: Bucky O'Hare, Visionaries, Cosmos and the Wonders series all air.
- The dominant shows are levelled out: Alone, Naked and Afraid, G.I. Joe, Power Rangers and Horizon.
- Every block keeps its identity.
- Orbit X's core share falls overall because G.I. Joe and Power Rangers were taking half the channel. Its Saturday morning and after-school blocks rise to 88% core.
- **The cost is repeats of small shows.** Short catalogues now get their fair share, so some of their episodes come round within a week: Wild 0 to 60, Odyssey 153 to 248. The 24-hour and 3-day rules still hold everywhere.
- **ToonZ:** Looney Tunes' 985 shorts no longer crowd the channel, which is the known limit in the brief. The median gap before an episode repeats goes from 2.4 to 7.3 days, but short-catalogue repeats within a week rise slightly (898 to 973).
- **Tots needs your decision before anything changes.** Its Wind Down and Night blocks run 13 hours a day on four shows, and Clangers has only 26 short episodes. Any fair share means the small bedtime shows run out within a day and Night Garden fills the gaps. Episodes coming round within a week roughly triple or quadruple. The morning and playtime gains are large: Teletubbies drops from 49%, and Balamory and Andy's Dinosaur Adventures finally air. The real fix for bedtime is editorial: more bedtime titles, or a deliberate overnight loop.
## Recommendation
1. **Wild, Orbit X and Odyssey:** with the brief's tiers, in one scheduler release (0.98.0), after your approval.
2. **ToonZ:** in the same release, with the teatime trio at 3.
3. **Tots:** hold. Choose one of these:
- Keep today's rule.
- Weighted for Morning and Playtime only, with bedtime unchanged. This needs a small per-block switch.
- Add bedtime titles first.
The same checks as 0.97.0 apply before install:
- Committed fingerprints identical.
- Untouched channels' fingerprints identical.
- A restart replay.
- The full suite.
Living Network and What's On stay deferred.