Leave chunks that were never replayed out of score-outcomes' medians and rank correlations

This commit is contained in:
2026-10-21 17:56:38 +02:00
parent 6b6b82803d
commit 92f8204702
4 changed files with 36 additions and 13 deletions
+5 -5
View File
@@ -43,9 +43,9 @@ level named twice leaves the anchors out, saying why.
Then the median of the outcome R and S each predict at each value they were guessed at: R against
🔴 findings, S against lines changed. And how well L, E and I each order chunks by review rounds
past each pass's first and by 🔴 findings: Spearman's rank correlation, from -1 to +1, where +1
orders them exactly; none where every chunk held the same level, or the same outcome. It counts only chunks that shipped one
item, since a chunk measures all its items at once, and reports a score only once 10 such chunks
hold it and its outcomes.
orders them exactly; none where every chunk held the same level, or the same outcome. It counts only chunks that
shipped one item, since a chunk measures all its items at once. It leaves out the chunks never replayed, which may
hold only part of a pull request. It reports a score only once 10 such chunks hold it and its outcomes.
Exit 1, saying why, on bad arguments, when git cannot start, finds no checkout or reads a shallow
clone, or the default branch cannot be read; or, after the rest of the report, when the anchors are
@@ -71,7 +71,7 @@ UNMERGED = [
"",
"- Each is the run of commits on the default branch that share one commit time, since a rebase merge replays a pull request's commits at once. Its guesses come from the todo.md before its first commit.",
"- Two pull requests merged in the same second read as one chunk, so a pull request that shipped nothing adds its lines, files and rounds to the chunk it shares a time with.",
"- A run whose commits all kept their author time was never replayed: pushed or fast-forwarded as committed, it may hold only part of its pull request.",
"- A run whose commits all kept their author time was never replayed: pushed or fast-forwarded as committed. It may hold only part of its pull request, so the medians and the rank correlations leave it out.",
"- Rebase drops a round's commit that changed no file, so their rounds and findings are at least what history shows, and the medians count them as shown.",
]
@@ -106,7 +106,7 @@ def report_text(outcomes: list[Outcome], anchored: Anchors | Failure, given: dic
near = [render(outcome) for outcome in nearest(outcomes, given | {"R": r})] or ["- None: no chunk on the default branch shipped an item from todo.md."]
sections.append([f"Finished items nearest L {given['L']}, E {given['E']}, I {given['I']}, so R {r}, and S {given['S']}, closest first:", "", *near])
sections.append([f"Anchors in {ANCHORS_PATH}, each level's shipped items:", "", *anchor_lines(anchored, outcomes)])
sections.append(["Median outcome at each guessed score, among chunks that shipped one item:", "", *report(outcomes)])
sections.append(["Median outcome at each guessed score, among chunks that shipped one item, never-replayed ones left out:", "", *report(outcomes)])
if any(outcome.landed != "merge" for outcome in outcomes):
sections.append(UNMERGED)
return "\n\n".join("\n".join(section) for section in sections)