Keep the no-overlap rule when a film pool is too small for its rest (0.64.0)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m41s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m26s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-02 11:08:19 +00:00
co-authored by Claude Opus 5.5
parent a534aed53c
commit 93fe749b63
7 changed files with 18 additions and 7 deletions
@@ -538,4 +538,11 @@ class ChannelScheduleTest {
assertFalse(SmartChannels.first { it.number == 103 }.englishAudio)
assertTrue(SmartChannels.first { it.number == 123 }.englishAudio)
}
@Test fun aSmallFilmPoolStillAvoidsClashesWhileItsRestIsBroken() {
val small = (1..6).map { film("s$it") }
val other = extendSchedule(small, ScheduleCursor(), now, now + 7 * day, 7 * day)
val mine = extendSchedule(small, ScheduleCursor(), now, now + 7 * day, 7 * day, avoid = clashesWith(listOf(other)))
assertEquals(0, programmeOverlaps(other.entries, mine.entries))
}
}