0.108.11: Ring X correction included (built, not installed)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-05 16:17:07 +00:00
co-authored by Claude Opus 5.5
parent 4f4bfd3138
commit 80a37131ab
10 changed files with 6944 additions and 6 deletions
@@ -31,6 +31,19 @@ class ChairLearningTest {
assertNull(lessons.holdBackFor(401, wrestling, setOf(lesson.key)))
}
@Test fun ringXIsWrestlingAndMmaEventsHaveNoChannel() {
// Paul's correction, 5 November 2026.
val text = ChannelText(emptyMap(), mapOf("u" to ufc))
assertTrue(Briefs.all { channelScore(ufc, it, text).first == 0.0 })
assertTrue(channelScore(ufc, Briefs.first { it.number == 401 }, text).second.single().contains("MMA event"))
// A strawweight bout isn't WWE: the promotion is matched as a whole word.
val straw = ev("s", "UFC Fight Night 289", listOf("Action"), "A women's strawweight final, a mixed martial arts event.")
assertEquals(0.0, channelScore(straw, Briefs.first { it.number == 401 }, text).first, 0.0)
val wwe = ev("w", "Survivor Series: WarGames", listOf("Action", "Sport"), "Survivor Series: the WarGames pay-per-view.", listOf("WWE"))
val ringX = channelScore(wwe, Briefs.first { it.number == 401 }, ChannelText(emptyMap(), mapOf("w" to wwe)))
assertTrue(ringX.first > .45); assertTrue(ringX.second.any { "verified wrestling promotion" in it })
}
@Test fun aBroadGenreNeedsThreeAndASpecificReasonWins() {
val e = mapOf("1" to ev("1", "Wedding One", listOf("Romance", "Musical")), "2" to ev("2", "Wedding Two", listOf("Romance", "Musical")), "3" to ev("3", "Wedding Three", listOf("Romance", "Musical")))
assertTrue(chairLessons(listOf(dropped("1", "Wedding One", 307), dropped("2", "Wedding Two", 307)), e).lessons.isEmpty()) // two by genre: not enough
@@ -44,11 +57,11 @@ class ChairLearningTest {
val line = { id: String, name: String, ov: String -> JSONObject().put("id", id).put("type", "Movie").put("name", name).put("year", 2026)
.put("overview", ov).put("genres", JSONArray(listOf("Action", "Sport"))).put("studios", JSONObject.NULL)
.put("rating", JSONObject.NULL).put("countries", JSONArray(listOf("United States"))).put("taglines", JSONObject.NULL) }
val evidence = File.createTempFile("evidence", ".jsonl").apply { deleteOnExit(); writeText(listOf(line("1", "UFC 330", "A UFC mixed martial arts pay-per-view event with a title bout."),
line("2", "UFC 331", "A UFC mixed martial arts pay-per-view event with a title bout."), line("9", "UFC 334", "A UFC mixed martial arts pay-per-view event with a title bout.")).joinToString("") { "$it\n" }) }
val evidence = File.createTempFile("evidence", ".jsonl").apply { deleteOnExit(); writeText(listOf(line("1", "Fight Night 1", "A boxing pay-per-view title match between two heavyweight champions."),
line("2", "Fight Night 2", "A boxing pay-per-view title match between two heavyweight champions."), line("9", "Fight Night 9", "A boxing pay-per-view title match between two heavyweight champions.")).joinToString("") { "$it\n" }) }
val sets = File.createTempFile("collections", ".jsonl").apply { delete(); deleteOnExit() }
val history = listOf(dropped("1", "UFC 330", 401), dropped("2", "UFC 331", 401))
fun report(state: LearningState) = buildDeskReport(evidence, sets, emptyMap(), listOf(Arrival("9", "Movie", "UFC 334", 2026, "2026-10-30", "tmdb:9", 0)),
val history = listOf(dropped("1", "Fight Night 1", 401), dropped("2", "Fight Night 2", 401))
fun report(state: LearningState) = buildDeskReport(evidence, sets, emptyMap(), listOf(Arrival("9", "Movie", "Fight Night 9", 2026, "2026-10-30", "tmdb:9", 0)),
emptySet(), emptyMap(), 1, true, DirectorMode.Balanced, 1_793_800_000_000, decided = setOf("1", "2"), history = history, learning = state)
fun shown(r: DeskReport) = (r.picks.map { it.id } + r.asks.map { it.id }).contains("9")
val proposed = report(LearningState(on = true))