Drive-In event ideas: an idea withdrawn for a rule change shows again when re-proposed
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 2m19s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m42s

The box's third run proposed the Ant-Man double again under rules 4, but its
history entry from rules 3 was marked withdrawn, so it was recorded as known
and left off the Chair. A re-proposed idea now replaces its withdrawn entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-05 18:34:20 +00:00
co-authored by Claude Opus 5.5
parent 2c13978c2c
commit 3a7ae53f9e
2 changed files with 18 additions and 2 deletions
@@ -79,4 +79,17 @@ class EventIdeasTest {
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
}
@Test fun anIdeaWithdrawnOnlyForARuleChangeComesBackWhenProposedAgain() {
val file = java.io.File.createTempFile("history", ".json").apply { deleteOnExit(); writeText("[]") }
val idea = EventIdea("franchise:X|FridayDouble", "X Night", "franchise", IdeaFormat.FridayDouble, java.time.LocalDateTime.of(2026, 12, 4, 20, 0),
listOf(film("1", "X", setOf("Action")), film("2", "X II", setOf("Action"))), listOf("why"), 7.0)
EventIdeaHistory.record(file, listOf(idea), 1)
file.writeText(file.readText().replace("\"rules\":$EVENT_IDEA_RULES", "\"rules\":1"))
EventIdeaHistory.withdrawOld(file)
assertEquals("withdrawn: rules changed", EventIdeaHistory.load(file).single().optString("decision"))
EventIdeaHistory.record(file, listOf(idea), 2)
assertEquals("proposed", EventIdeaHistory.load(file).single().optString("decision"))
assertEquals(2L, EventIdeaHistory.load(file).single().optLong("shownMs"))
}
}