Test the reference replays apart, a round one of them failed on and a reference that found nothing; drop share's dead guard
This commit is contained in:
@@ -18,16 +18,19 @@ def a_round(at, findings):
|
||||
return Round("prose-reviewer", "/code/p", "x", f"2026-10-14T10:00:0{at}Z", 0, "Review it.", tuple(findings))
|
||||
|
||||
|
||||
# Ten findings over two rounds; the project's rung found 7 and then 7, so its share is 70% and the bar 60%.
|
||||
# Ten findings over two rounds; the project's rung found 8 and then 6, so its share is 70% and the bar 60%. Both found the first round's 🔴, and only the first found the second's.
|
||||
ROUNDS = [a_round(1, ("🔴 a", "🟡 b", "🟡 c", "🟡 d", "🟡 e")), a_round(2, ("🔴 f\nmore", "🟡 g", "🟡 h", "🟡 i", "🟡 j"))]
|
||||
FIRST = [{0, 1, 2, 3}, {0, 1, 2}]
|
||||
SECOND = [{0, 1, 2}, {0, 1, 2, 4}]
|
||||
FIRST = [{0, 1, 2, 3}, {0, 1, 2, 3}]
|
||||
SECOND = [{0, 1, 2}, {1, 2, 3}]
|
||||
|
||||
|
||||
class Candidates(unittest.TestCase):
|
||||
def test_tries_the_project_models_lower_efforts_first_then_the_ladder_below_it(self):
|
||||
self.assertEqual(candidates(REFERENCE), [LOW, SONNET])
|
||||
|
||||
def test_tries_each_ladder_rung_below_highest_first(self):
|
||||
self.assertEqual(candidates(Rung("claude-fable-5-2", "low")), [REFERENCE, SONNET])
|
||||
|
||||
def test_tries_each_lower_effort_of_the_ladders_lowest_rung(self):
|
||||
self.assertEqual(candidates(SONNET), [Rung("claude-sonnet-5-5", "medium"), Rung("claude-sonnet-5-5", "low")])
|
||||
|
||||
@@ -47,6 +50,8 @@ class Tried(unittest.TestCase):
|
||||
self.assertEqual((found.share, found.missed_red, found.qualifies), (Fraction(4, 5), [(ROUNDS[0], 0)], False))
|
||||
# The first round's 🔴 is found both times; a yellow found both times, such as its b, may be missed.
|
||||
self.assertTrue(tried(LOW, ROUNDS, (FIRST, SECOND), [{0, 2, 3, 4}, {0, 2, 3, 4}]).qualifies)
|
||||
# The second round's 🔴, which only the first replay found, may be missed too.
|
||||
self.assertTrue(tried(LOW, ROUNDS, (FIRST, SECOND), [{0, 1, 2, 3}, {1, 2, 3}]).qualifies)
|
||||
|
||||
def test_fails_every_rung_where_the_project_rung_found_nothing(self):
|
||||
self.assertFalse(tried(LOW, ROUNDS, ([set(), set()], [set(), set()]), [{0}, {0}]).qualifies)
|
||||
@@ -64,7 +69,7 @@ class RecallReport(unittest.TestCase):
|
||||
self.assertEqual(lines, [
|
||||
"Replayed 8 prose rounds of claude-opus-5-5 projects, which hold 40 🔴 and 🟡 findings, twice on the project's rung, claude-opus-5-5 at medium effort.",
|
||||
"Left out 1 more, which a replay on the project's rung failed on; stderr says why.",
|
||||
"The project's rung found 28 and then 28 of them, 70%, so a rung qualifies at 60% or more and missing no 🔴 it found both times.",
|
||||
"The project's rung found 32 and then 24 of them, 70%, so a rung qualifies at 60% or more and missing no 🔴 it found both times.",
|
||||
"claude-opus-5-5 at low effort found 60% and missed no such 🔴: it qualifies.",
|
||||
"claude-sonnet-5-5 at high effort found 50% and missed 4 such 🔴:",
|
||||
*[" /code/p 2026-10-14T10:00:01Z: 🔴 a"] * 4,
|
||||
|
||||
Reference in New Issue
Block a user