Answer stability round 1: 0 🔴, 3 🟡 (0 misread); drop the trials' patch of authored_by, test names that sort against times
This commit is contained in:
@@ -93,7 +93,7 @@ def lost_inputs(prompt: str, reports: str, held: typing.Callable[[str], bool]) -
|
||||
|
||||
|
||||
def authored_by(log: list[tuple[str, float]], seconds: float) -> str | None:
|
||||
"""The commit in log with the newest author time at or before seconds; the first in log order breaks a tie. A rebase keeps author times, so a merged branch's commits still say what it held. Log order alone would not do: a commit authored early but merged late, such as a dependency bump, sits high in it."""
|
||||
"""The commit in log with the newest author time at or before seconds; the first in log order breaks a tie. The log lists commits newest first by when they were merged, so taking the first one authored by seconds would pick a commit authored early but merged late, such as a dependency bump, over the commits a round reviewed. A rebase keeps author times, so a merged branch's commits keep the times their author wrote them."""
|
||||
return max(((commit, authored) for commit, authored in log if authored <= seconds), key=lambda listed: listed[1], default=(None, 0))[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user