Answer architecture round 2: split record into its two commands, accept a dated first line only with a Mean line alone, read a default branch without a plan table as empty, and fetch where an answer needs origin as it is
This commit is contained in:
@@ -75,13 +75,13 @@ def first_ruling(history: str) -> Entry | None:
|
||||
return rulings[0] if rulings else None
|
||||
|
||||
|
||||
def base(changes: list[HistoryChange], history: str, merge_base: str, default: str) -> tuple[str, str]:
|
||||
"""The commit a paired ruling reads against, and how it was found: the last measured commit, else the base the history's first paired ruling names, else the merge base of HEAD and the default branch. history is the default branch's."""
|
||||
def base(changes: list[HistoryChange], history: str, default: str) -> tuple[str, str] | None:
|
||||
"""The commit a paired ruling reads against, and how it was found: the last measured commit, else the base the history's first paired ruling names; None when neither exists, so the base is the merge base of HEAD and the default branch. history is the default branch's."""
|
||||
if found := measured_commit(changes):
|
||||
return found, f"The newest merged change on {default} that adds a scoring run to the history, or whose last added paired ruling is better."
|
||||
if (first := first_ruling(history)) and first.against:
|
||||
return first.against, f"No merged change on {default} adds a scoring run or a better ruling; the base its first paired ruling names."
|
||||
return merge_base, f"No merged change on {default} adds a scoring run or a paired ruling; the merge base of HEAD and {default}."
|
||||
return None
|
||||
|
||||
|
||||
def plan_items(todo: str) -> list[Item] | Failure:
|
||||
|
||||
Reference in New Issue
Block a user