Answer stability round 1: 0 🔴, 8 🟡 (0 misread); check a reference patch as a build is checked, test the rule at the head, split the bench's setup by kind
This commit is contained in:
@@ -47,13 +47,14 @@ def digest(sides: dict[Side, str], table: list[str], tasks: list[TaskRuns], is_f
|
||||
which the digest calls by noun. is_file says whether a path in the project names a file."""
|
||||
line = " A bug's name gives its line at the base." if noun == "bug" else ""
|
||||
code = f"Base {sides['base']}, head {sides['head']}.{line} Each side's code without the {noun}s is in `trees/base` and `trees/head` in the bench's folder."
|
||||
return "\n".join(["# task-bench digest", "", code, "", *table, *(line for task in tasks for line in ["", *told(task, is_file, noun)])]) + "\n"
|
||||
return "\n".join(["# task-bench digest", "", code, "", *table, *(line for task in tasks for line in ["", *told(task, is_file)])]) + "\n"
|
||||
|
||||
|
||||
def told(task: TaskRuns, is_file: typing.Callable[[str], bool], noun: str) -> list[str]:
|
||||
def told(task: TaskRuns, is_file: typing.Callable[[str], bool]) -> list[str]:
|
||||
"""The digest's section on task, a bug where it names the bug's file and a feature otherwise."""
|
||||
passing, failing = [run for run in task.runs if run.passed], [run for run in task.runs if not run.passed]
|
||||
passed = f"{len(passing)} of the {len(task.runs)} runs passed." if failing else f"The {counted(len(task.runs), 'run')} passed."
|
||||
# A feature is in no one file, so no file it read is beside the point.
|
||||
# Only a bug has a file of its own. A feature has none, so no file a run read counts as a decoy.
|
||||
misled = decoys([run.entries for run in failing], task.file, is_file) if task.file else []
|
||||
if not task.file:
|
||||
found = ""
|
||||
@@ -75,7 +76,7 @@ def told(task: TaskRuns, is_file: typing.Callable[[str], bool], noun: str) -> li
|
||||
median = finished[(len(finished) - 1) // 2]
|
||||
shown.append((median, f"the passing run with the median tokens, {median.tokens} tokens"))
|
||||
return [
|
||||
f"## {noun.capitalize()} {task.named}",
|
||||
f"## {'Bug' if task.file else 'Feature'} {task.named}",
|
||||
"",
|
||||
"The failing test printed, at the base:" if task.file else "The spec Haiku was told:",
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user