Answer product-owner round 1: 0 🔴, 0 🟡; write R into a blank cell, a task that changes no file is L 1, and say where the judge runs

This commit is contained in:
2026-10-16 13:08:13 +02:00
parent c1b6380f0f
commit 9d68fd79f6
5 changed files with 14 additions and 7 deletions
+5 -3
View File
@@ -29,6 +29,8 @@ class Shape:
optional: tuple[str, ...]
# The columns rank_todo.py needs to rank a row, so no chunk starts on an item whose risk is unscored.
risk_columns: tuple[str, ...]
# The scores rank_todo.py works out and writes, so a blank cell reads as no score yet.
derived: tuple[str, ...]
# The column naming the goals an item serves; read_goals reads it, given the item's ID to name in a failure, and write_goals writes it back.
goals_column: str
read_goals: typing.Callable[[str, str], Moves | Failure]
@@ -73,9 +75,9 @@ def write_cited(moves: Moves) -> str:
# L, E and I are optional, since score_outcomes reads tables from before they replaced C out of history; R too, since rank_todo.py writes it from them.
SHAPE = Shape(("L", "E", "I", "R", "S"), (BLOCKED_BY, "L", "E", "I", "R", "Score"), ("L", "E", "I"), MOVES, parse_moves, write_moves)
SHAPE = Shape(("L", "E", "I", "R", "S"), (BLOCKED_BY, "L", "E", "I", "R", "Score"), ("L", "E", "I"), ("R",), MOVES, parse_moves, write_moves)
# The shape from before MOVES replaced A, G and Goals, and L, E and I replaced C, which older todo.md files hold; one from before C joined lacks it.
OLD_SHAPE = Shape(("R", "S", "C", "A", "G"), (BLOCKED_BY, "C", "Score"), (), "Goals", parse_cited, write_cited)
OLD_SHAPE = Shape(("R", "S", "C", "A", "G"), (BLOCKED_BY, "C", "Score"), (), (), "Goals", parse_cited, write_cited)
@dataclasses.dataclass(frozen=True)
@@ -188,7 +190,7 @@ def parse_row(row: str, table: Table) -> Item | Failure:
if misformed := check_cells(row, named):
return misformed
shape = shape_of(table.columns)
scores = parse_scores(named["ID"], named, shape.score_columns)
scores = parse_scores(named["ID"], {name: cell for name, cell in named.items() if cell or name not in shape.derived}, shape.score_columns)
if isinstance(scores, Failure):
return scores
blocked_by = parse_blockers(named["ID"], named.get(BLOCKED_BY, ""))