0.108.8: read-only Premiere evidence and proposals in the Chair; booking off (built, not installed)
Evidence reader covers the last 12 months' films. The Chair weighs Orbit Premiere candidates and shows at most three a week, view-only, apart from its picks. No debut slots, windows or list changes on this line. Scoring matches main (horror-comedy refinement included). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,10 @@ class DirectorChairTest {
|
||||
assertEquals(305, placed.top.number)
|
||||
assertTrue(placed.why.any { "horror-comedy" in it })
|
||||
assertNotEquals(305, placeTitle(straight, text).top.number) // straight horror isn't moved
|
||||
// A family-friendly or mainstream-rated horror-comedy keeps its usual channels.
|
||||
val family = TitleEvidence.of(line("fh", "Spooky Sleepover", "Movie", listOf("Horror", "Comedy", "Family"), "Kids at a sleepover meet a friendly ghost.", rating = "PG"))
|
||||
val pg13 = TitleEvidence.of(line("p13", "Haunted Mansion Party", "Movie", listOf("Horror", "Comedy"), "A family moves into a haunted mansion full of ghosts.", rating = "PG-13"))
|
||||
listOf(family, pg13).forEach { t -> assertTrue(channelScore(t, Briefs.first { it.number == 305 }, text).second.none { "horror-comedy" in it }) }
|
||||
}
|
||||
|
||||
@Test fun aReportReadsBackAsItWasSaved() {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.time.Instant
|
||||
import java.time.ZoneId
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
/** Premiere as a broadcast stage: two recommendations, a debut that only appends, a window, then the film's genre home. */
|
||||
/** Orbit Premiere in the Chair's report (0.108 line, booking off): proposals apart from the picks, and never a second first run. */
|
||||
class DirectorPremiereTest {
|
||||
private val london = ZoneId.of("Europe/London")
|
||||
private val minute = 60_000L
|
||||
@@ -46,47 +46,4 @@ class DirectorPremiereTest {
|
||||
// No studio in the library data, not trending... still weighed: here its event-film description and recency carry it.
|
||||
assertNotNull(report(OrbitStatus.Never, studios = listOf("CAPCOM")).premieres.singleOrNull())
|
||||
}
|
||||
|
||||
@Test fun theDebutIsAFridayOrSaturdayNightAfterTheCommittedPlan() {
|
||||
val debut = debutSlot(at(11, 12, 6), at(11, 5, 12), emptyList(), london)!!
|
||||
val t = Instant.ofEpochMilli(debut).atZone(london)
|
||||
assertEquals(DayOfWeek.FRIDAY, t.dayOfWeek); assertEquals(13, t.dayOfMonth); assertEquals(20, t.hour)
|
||||
// Kept clear of another fixed slot that night: Saturday instead.
|
||||
assertEquals(at(11, 14, 20), debutSlot(at(11, 12, 6), at(11, 5, 12), listOf(at(11, 13, 18)), london))
|
||||
// Never inside the committed plan, even on a Friday.
|
||||
assertEquals(at(11, 14, 20), debutSlot(at(11, 13, 21), at(11, 5, 12), emptyList(), london))
|
||||
}
|
||||
|
||||
@Test fun placingSetsADebutAndTheWindowMovesItHome() {
|
||||
val store = store()
|
||||
val debut = placePremiereFromChair(store, user, "8100001", "Street Brawlers", 2026, 302, at(11, 5, 12), london)!!
|
||||
assertEquals(listOf("8100001"), store.loadChoices(user, PREMIERE_NUMBER).accepted.map { it.id })
|
||||
assertTrue(store.loadChoices(user, 302).accepted.isEmpty())
|
||||
assertEquals(debut, placePremiereFromChair(store, user, "8100001", "Street Brawlers", 2026, 302, at(11, 5, 13), london)) // once only
|
||||
assertTrue(loadDecisions(store.decisionsFile()).single().premiere)
|
||||
// The debut is a fixed slot, booked only after the committed plan, branded as a first airing on Orbit.
|
||||
val film = PoolSeries("8100001", "Street Brawlers", listOf(PoolEpisode("8100001", "s1", EpisodeMark(1, 1), "Street Brawlers", 110 * minute)))
|
||||
val pool = (1..40).map { PoolSeries("f$it", "Film $it", listOf(PoolEpisode("f$it", "sf$it", EpisodeMark(1, 1), "Film $it", (90L + it % 30) * minute))) } + film
|
||||
val slots = premiereSlots(loadPremiereRuns(store.premiereRunsFile()), pool.associateBy { it.id })
|
||||
val plan = extendFilmSchedule(pool, ScheduleCursor(), at(11, 5, 6), debut + 2 * day, 7 * day, zone = london, fixed = slots)
|
||||
val first = plan.entries.first { it.seriesId == "8100001" }
|
||||
assertTrue(first.startMs in debut..debut + 20 * minute)
|
||||
assertTrue(first.why.startsWith(PREMIERE_WHY)); assertFalse("first airing on Orbit" in first.why) // apart from FIRST ON ORBIT
|
||||
assertEquals("ORBIT PREMIERE", whatsOnPage(mapOf(PREMIERE_NUMBER to plan), null, debut - 6 * 60 * minute, london).let { p -> (listOfNotNull(p.pick) + p.tonight + p.comingUp).first { it.title.contains("Street Brawlers") }.tag })
|
||||
// Before its window ends nothing moves; after, it leaves Premiere's list for Action's. Its bookings aren't touched here.
|
||||
assertTrue(graduatePremieres(store, user, debut + PREMIERE_WINDOW_MS - 1).isEmpty())
|
||||
assertEquals(setOf(PREMIERE_NUMBER, 302), graduatePremieres(store, user, debut + PREMIERE_WINDOW_MS))
|
||||
assertTrue(store.loadChoices(user, PREMIERE_NUMBER).accepted.isEmpty())
|
||||
assertEquals(listOf("8100001"), store.loadChoices(user, 302).accepted.map { it.id })
|
||||
assertTrue(premiereSlots(loadPremiereRuns(store.premiereRunsFile()), pool.associateBy { it.id }).isEmpty())
|
||||
assertTrue(graduatePremieres(store, user, debut + PREMIERE_WINDOW_MS + day).isEmpty()) // once only
|
||||
}
|
||||
|
||||
@Test fun aFilmAlreadyBookedOnOrbitGetsNoPremiere() {
|
||||
val store = store()
|
||||
store.saveBooked(user, setOf("8100001"))
|
||||
assertNull(placePremiereFromChair(store, user, "8100001", "Street Brawlers", 2026, 302, at(11, 5, 12), london))
|
||||
assertTrue(store.loadChoices(user, PREMIERE_NUMBER).accepted.isEmpty())
|
||||
assertThrows(IllegalArgumentException::class.java) { placePremiereFromChair(store, user, "8100002", "Another", 2026, PREMIERE_NUMBER, at(11, 5, 12), london) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user