From fc213351764ad4ee730bf262330e72a7e31f10cc Mon Sep 17 00:00:00 2001 From: Mengye Ren Date: Fri, 23 Oct 2026 12:37:10 -0400 Subject: [PATCH 1/2] =?UTF-8?q?BENCHMARKS.md:=20a=20baseline=20row=20nothi?= =?UTF-8?q?ng=20has=20improved=20on=20shows=20=E2=80=94=20in=20the=20main-?= =?UTF-8?q?commit=20column,=20not=20provenance=20unknown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/outerloop/progress.py | 2 ++ tests/test_progress.py | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e37e654..ecc0e255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Versions follow [SemVer](https://semver.org). ## [Unreleased] +- `BENCHMARKS.md` shows `—` instead of "provenance unknown" in the main-commit column of a baseline row that nothing has improved on yet, as on a freshly seeded repository. - The advisory review covers exactly the head its triggering event named (`REVIEW_HEAD_SHA`, #462). If the PR has moved off that head, nothing is reviewed or posted. Otherwise the diff is read between fixed commits, every envelope records the reviewed `head_sha`, and the review is attached to that commit. When GitHub refuses its inline comments, the fallback is a body-only review on the same commit, never an unpinned comment (#569). The summarizer skips clean when its lenses read different heads. For a fork PR (`REVIEW_CHECKOUT_BASE=1`) the brief says the tree is the base branch and the change is only in the diff. Upgrading: envelopes without `head_sha` (from an older reviewer ref) still post; callers that do not pass REVIEW_HEAD_SHA behave as before. - When check runs cannot be read on a token deployment, the warning now says the token cannot read them (fine-grained tokens have no checks permission) instead of asking for an App permission. diff --git a/src/outerloop/progress.py b/src/outerloop/progress.py index 45f2845e..1b0dbb51 100644 --- a/src/outerloop/progress.py +++ b/src/outerloop/progress.py @@ -327,6 +327,8 @@ def render_markdown( provenance = f"[{e.main_commit[:9]}]({commit_link})" elif e.main_commit: provenance = f"`{e.main_commit[:9]}`" + elif e.best == e.baseline: + provenance = "—" # nothing has improved on the baseline yet else: provenance = "provenance unknown" if e.main_commit and not e.measured_sha: diff --git a/tests/test_progress.py b/tests/test_progress.py index 9a39eb79..d71a9ca2 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -114,6 +114,10 @@ def test_confirm_precision_provenance_and_seed_roundtrip(tmp_path): assert "main commit" in md and "[1](https://github.com/org/repo/commit/1)" in md imported = replace(e, main_commit="", measured_sha="") assert "provenance unknown" in render_markdown({"bench": imported}, "org/repo") + # a fresh repo's baseline row has no improvement to trace + fresh = replace(imported, best=imported.baseline, best_run="baseline") + row = render_markdown({"bench": fresh}, "org/repo").splitlines()[-4] + assert row.endswith("| `baseline` | — |") def test_pending_roundtrip_and_rejection(): From bbb01b0c3671c43ada96e5071ec22a0e19bff1e0 Mon Sep 17 00:00:00 2001 From: Mengye Ren Date: Fri, 23 Oct 2026 13:27:59 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Baseline=20row:=20=E2=80=94=20only=20when?= =?UTF-8?q?=20no=20run=20has=20set=20a=20best;=20imported=20rows=20keep=20?= =?UTF-8?q?provenance=20unknown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/outerloop/progress.py | 4 ++-- tests/test_progress.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/outerloop/progress.py b/src/outerloop/progress.py index 1b0dbb51..c78178ef 100644 --- a/src/outerloop/progress.py +++ b/src/outerloop/progress.py @@ -327,8 +327,8 @@ def render_markdown( provenance = f"[{e.main_commit[:9]}]({commit_link})" elif e.main_commit: provenance = f"`{e.main_commit[:9]}`" - elif e.best == e.baseline: - provenance = "—" # nothing has improved on the baseline yet + elif e.best_run == "baseline" and e.best == e.baseline: + provenance = "—" # no run has set a best, so no commit to name else: provenance = "provenance unknown" if e.main_commit and not e.measured_sha: diff --git a/tests/test_progress.py b/tests/test_progress.py index d71a9ca2..8d228277 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -114,6 +114,8 @@ def test_confirm_precision_provenance_and_seed_roundtrip(tmp_path): assert "main commit" in md and "[1](https://github.com/org/repo/commit/1)" in md imported = replace(e, main_commit="", measured_sha="") assert "provenance unknown" in render_markdown({"bench": imported}, "org/repo") + unimproved_import = replace(imported, best=imported.baseline) + assert "provenance unknown" in render_markdown({"bench": unimproved_import}, "org/repo") # a fresh repo's baseline row has no improvement to trace fresh = replace(imported, best=imported.baseline, best_run="baseline") row = render_markdown({"bench": fresh}, "org/repo").splitlines()[-4]