Answer architecture round 1: 2 🔴, 8 🟡 (0 misread); split task-bench's benched into phases and its table into one column list, parse each stream once, move do-epic's parking out with pure move and news decisions, share the round summaries, rename scoring_due, and file the version question as item 517
CI / tests (pull_request) Successful in 5m2s

This commit is contained in:
2026-11-23 01:20:55 +01:00
parent 21200cb698
commit 0bf87b736e
29 changed files with 678 additions and 368 deletions
+20 -1
View File
@@ -7,7 +7,7 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from task_bench.plant import drawn, go_files, killed_mutants, line_at_head, Mutant, mutated, place_files, task_text
from task_bench.plant import bug_at_sides, drawn, go_files, killed_mutants, line_at_head, Mutant, mutated, place_files, task_text
from failure import Failure
from mutate_changes.tool_process import Ran
@@ -156,6 +156,25 @@ class LineAtHeadTest(unittest.TestCase):
self.assertEqual(line_at_head("", 12), 12)
class BugAtSidesTest(unittest.TestCase):
MUTANT = Mutant("calc.go", 3, 11, "ARITHMETIC_BASE")
BASE = b"package calc\n\n\treturn a + b\n"
# The head adds a line above the bug's.
HEAD = b"package calc\n// Add adds.\n\n\treturn a + b\n"
DIFF = "@@ -1,0 +2 @@\n+// Add adds.\n"
def test_the_bug_is_the_same_change_at_each_side_on_the_line_as_that_side_numbers_it(self):
found = bug_at_sides(self.MUTANT, self.DIFF, {"base": self.BASE, "head": self.HEAD})
self.assertEqual(found, {"base": self.BASE.replace(b"+", b"-"), "head": self.HEAD.replace(b"+", b"-")})
def test_a_line_the_head_changed_holds_no_bug(self):
self.assertIsNone(bug_at_sides(self.MUTANT, "@@ -3 +3 @@\n-\treturn a + b\n+\treturn b + a\n", {"base": self.BASE, "head": self.BASE}))
def test_a_side_without_the_file_or_without_the_token_holds_no_bug(self):
self.assertIsNone(bug_at_sides(self.MUTANT, "", {"base": self.BASE, "head": None}))
self.assertIsNone(bug_at_sides(self.MUTANT, "", {"base": self.BASE, "head": b"package calc\n\n\treturn sum(a, b)\n"}))
class KilledMutantsTest(unittest.TestCase):
def setUp(self):
folder = tempfile.TemporaryDirectory()