Drive-In event ideas, phase 1: read-only proposals in the Director's Chair

Approved by Paul on 5 November 2026: Drive-In only, at most two a week across
it, none when nothing is worthwhile, nothing booked. Seeds come from
franchise collections, event studios (Amicus, Toho, Cannon, Full Moon, AIP,
Ealing, Aardman...), and directors and leading performers with three or more
read films; a seed touching an existing event's films is left out. A bill
needs a coherent theme: one shared genre, one audience (adult horror late,
family on a Saturday, the rest a Friday double), the best films (in story
order for a franchise) clearing a 6.4 average rating. Low-budget cult films
stay eligible for The Late Show. On the box, once a day: missing evidence
read for candidates (bounded), the strongest bills verified film by film
(item, IMDb ID, playable copy), films booked within four weeks or shown on
the Drive-In in the last four left out, evenings free of events, committed
bookings and competing headlines. Every idea shown is kept as history;
dismissed themes stay dismissed unless their films change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-05 17:56:08 +00:00
co-authored by Claude Opus 5.5
parent bc55e51195
commit 569c7549d5
8 changed files with 384 additions and 8 deletions
@@ -0,0 +1,72 @@
package tv.orbit.classic
import org.junit.Assert.*
import org.junit.Test
import java.time.DayOfWeek
import java.time.LocalDate
import java.time.ZoneId
/** Drive-In event ideas (phase 1): coherent themes, the right evening for the audience, a bar to clear, and no repeats. */
class EventIdeasTest {
private val london = ZoneId.of("Europe/London")
private fun film(id: String, title: String, genres: Set<String>, rating: String = "R", community: Double? = 7.0, year: Int = 1985, minutes: Long = 95, imdb: String? = "tt$id") =
IdeaFilm(id, title, year, imdb, minutes * 60_000, rating, genres, emptyList(), community = community)
private val none = { _: IdeaFilm -> null as String? }
@Test fun aFranchiseOfAdultHorrorIsALateShowInStoryOrder() {
val films = listOf(film("1", "Haunt III", setOf("Horror"), year = 1990, community = 6.6), film("2", "Haunt", setOf("Horror"), year = 1979, community = 7.4),
film("3", "Haunt II", setOf("Horror"), year = 1982, community = 6.9)).associateBy { it.id }
val (idea, _) = billFor(IdeaSeed("franchise:Haunt Collection", "Haunt Night", "franchise", films.keys.toList(), chronological = true), films, none)
assertEquals(IdeaFormat.LateShow, idea!!.format) // adult horror stays late
assertEquals(listOf("Haunt", "Haunt II"), idea.films.map { it.title }) // the best two, in story order
assertTrue(idea.reasons.any { "every film is Horror" in it })
}
@Test fun aFamilyFranchiseGetsAFamilyEveningAndLowBudgetCultIsWelcomeLate() {
val family = listOf(film("4", "Clay Pals", setOf("Animation", "Family"), "U", 7.6), film("5", "Clay Pals 2", setOf("Animation", "Family"), "U", 7.3),
film("6", "Clay Pals 3", setOf("Animation", "Family"), "PG", 7.1)).associateBy { it.id }
assertEquals(IdeaFormat.SaturdayTriple, billFor(IdeaSeed("studio:Clay", "Clay Saturday", "studio", family.keys.toList(), "Animation"), family, none).first!!.format)
val cult = listOf(film("7", "Puppet Terror", setOf("Horror"), "R", 6.5), film("8", "Puppet Terror 2", setOf("Horror"), "R", 6.6)).associateBy { it.id }
assertNotNull(billFor(IdeaSeed("studio:Full Moon Features", "Full Moon After Midnight", "studio", cult.keys.toList(), "Horror"), cult, none).first)
}
@Test fun noCoherentThemeOrTooWeakMeansNoBill() {
val mixed = listOf(film("9", "A", setOf("Comedy"), "PG-13"), film("10", "B", setOf("Western"), "PG-13")).associateBy { it.id }
assertNull(billFor(IdeaSeed("director:X", "A X Night", "director", mixed.keys.toList()), mixed, none).first)
val weak = listOf(film("11", "C", setOf("Action"), "PG-13", 5.2), film("12", "D", setOf("Action"), "PG-13", 5.5)).associateBy { it.id }
assertTrue(billFor(IdeaSeed("performer:Y", "Y Night", "performer", weak.keys.toList()), weak, none).second.contains("under the bar"))
val unrated = listOf(film("13", "E", setOf("Action"), "PG-13", null), film("14", "F", setOf("Action"), "PG-13", null)).associateBy { it.id }
assertTrue(billFor(IdeaSeed("performer:Z", "Z Night", "performer", unrated.keys.toList()), unrated, none).second.contains("ratings"))
// Unverifiable or unsuitable films don't count: no IMDb ID, a short, a TV movie.
assertEquals("no IMDb ID to verify it by", ideaSuitable(film("15", "G", setOf("Action"), imdb = null)))
assertEquals("not a feature length", ideaSuitable(film("16", "H", setOf("Action"), minutes = 40)))
}
@Test fun atMostTwoAWeekNoneWhenNothingIsWorthItAndDismissedThemesStayDismissed() {
val films = (1..12).map { film("$it", "Film $it", setOf("Action"), "PG-13", 7.0 + it / 20.0) }.associateBy { it.id }
val seeds = (0 until 4).map { k -> IdeaSeed("director:D$k", "A D$k Night", "director", (1..12).filter { it % 4 == k }.map { "$it" }) }
var day = LocalDate.of(2026, 12, 1)
val evening = { _: IdeaFormat, taken: Set<java.time.LocalDateTime> -> generateSequence(day.atTime(20, 0)) { it.plusDays(1) }.first { it !in taken } }
val week = weeklyEventIdeas(seeds, films, none, evening, emptySet())
assertEquals(2, week.size); assertNotEquals(week[0].evening, week[1].evening)
assertTrue(weeklyEventIdeas(seeds, films, none, evening, emptySet(), limit = 0).isEmpty())
val weak = films.mapValues { (_, f) -> IdeaFilm(f.id, f.title, f.year, f.imdb, f.runtimeMs, f.rating, f.genres, f.studios, community = 5.0) }
assertTrue(weeklyEventIdeas(seeds, weak, none, evening, emptySet()).isEmpty()) // no filler
val dismissed = setOf(week[0].signature)
assertTrue(weeklyEventIdeas(seeds, films, none, evening, dismissed).none { it.signature == week[0].signature })
}
@Test fun seedsSkipCuratedListsAndThemesAlreadyHad() {
val seeds = ideaSeeds(listOf("Godzilla Collection" to listOf("a", "b"), "IMDB Top 250 Movies" to listOf("a", "b"), "Rambo Collection" to listOf("5642223", "x")),
emptyMap(), emptyList(), DriveInEvents.flatMap { e -> e.films.map { it.itemId } }.toSet())
assertEquals(listOf("franchise:Godzilla Collection"), seeds.map { it.key })
}
@Test fun anEveningSuitsItsFormatAndCompetesWithNothing() {
val late = ideaEvening(IdeaFormat.LateShow, LocalDate.of(2026, 11, 16), 0L, emptySet(), 4 * 3_600_000L, london)!!
assertTrue(late.dayOfWeek in setOf(DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY)); assertEquals(23, late.hour)
assertNotEquals(LocalDate.of(2026, 11, 17), late.toLocalDate()) // Amicus has Tuesday 17 November
val sat = ideaEvening(IdeaFormat.SaturdayTriple, LocalDate.of(2026, 11, 14), 0L, emptySet(), 6 * 3_600_000L, london)!!
assertEquals(LocalDate.of(2026, 11, 21), sat.toLocalDate()) // Universal Monsters has the 14th
}
}