feat: bind published benchmark figures to their upstream artifacts - #19
Merged
Conversation
Every claim guard in this organization checks that a page contains an attribution string. None of them compares a published number to the measurement it came from, so a figure can drift from its artifact while every guard stays green. That is how success_count 20 stayed on a public surface for five weeks after the measured artifact said 19. benchmark-claims.json pins four openadapt-flow artifacts at commit aee0941, vendors their bytes under benchmark-claims/upstream/, and binds each figure printed on README.md and profile/README.md to a JSON pointer into one of them. scripts/check_benchmark_claims.py: - re-hashes every vendored snapshot, so the snapshot cannot be edited to bless a wrong figure; - renders each registered figure out of the artifact and requires the exact published text; - cross-checks the derived comparison artifact against the two measured results files; - sweeps both surfaces for figure-shaped tokens and fails on any token no entry claims, so a new figure cannot land unregistered and a stale exemption cannot rot in place; - with --online, re-fetches each pinned path from raw.githubusercontent and compares digests. An unreachable GitHub warns, since an outage is not evidence of drift; a digest mismatch exits non-zero. profile/README.md publishes 20/20 for the OpenEMR compiled arm where the pinned artifact records 19 of 20. This repository does not own that prose, so the mismatch is recorded as a dated drift with a named owner and a 2026-09-25 expiry. The checker prints it on every run, fails by default, and fails unconditionally once the date passes. The offline half runs on every pull request. The online half runs on the daily schedule. Both are standard library only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
abrichr
force-pushed
the
guard/benchmark-claim-binding
branch
from
August 28, 2026 18:46
bae93c5 to
48b0d95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap
Every claim guard in this org checks that a file contains an attribution string. None of them checks the number. openadapt-web published
success_count: 20for the OpenEMR compiled arm for five weeks while the upstream artifact said 19, and nothing went red.scripts/check_profile.pyvalidates the org README's links, headings, and the phrase "more than 1.6k stars". It validates zero benchmark figures.What this adds
benchmark-claims.jsonpins four openadapt-flow artifacts at commitaee0941, vendors their exact bytes underbenchmark-claims/upstream/, and binds every figure printed onREADME.mdandprofile/README.mdto a JSON pointer into one of them. Fifteen figures are bound today.scripts/check_benchmark_claims.pydoes five things:39.2shas to come fromwall_s_p50, not from someone's memory.comparison.jsonagainst the two measuredresults.jsonfiles, the waypaper/check_artifacts.pydoes in flow.--online, re-fetches each pinned path from raw.githubusercontent.com and compares digests. An unreachable GitHub warns, because an outage isn't drift. A digest mismatch exits non-zero.What it found on the way in
profile/README.mdpublishes 20/20 for the OpenEMR compiled arm. The pinned artifact records 19 of 20, because the saved-row oracle adjudication on 2026-07-28 rejected compiled run 20: the note stayed in the unsaved entry form and no saved row ever contained it.This is the same defect openadapt-web had, on a page in the same family, and it is still live. This PR does not touch the prose, since front-page corrections are owned elsewhere. The mismatch is recorded as a dated drift that names an owner and expires on 2026-09-25. The checker prints it on every run, exits non-zero by default, and exits non-zero unconditionally once that date passes. Sixty days is the hard ceiling on any such record, enforced by the registry validator.
Someone still has to change that 20/20 to 19/20. The guard buys time and makes the clock visible. It does not fix the number.
Wiring
Offline half on every pull request, online half on the daily schedule. Standard library only, matching the rest of
scripts/.Proof
Each check was run failing, then passing, against the real repository. Verbatim failure output:
A vendored snapshot digit changed from 19 to 20
An unregistered
19/20added toREADME.mdA published figure moved away from its artifact (
70.4sto7.4s, registry updated to match the wrong prose)A registered figure's expected text corrupted in the registry alone
--online, pinned path repointed so upstream serves different bytes--onlinewith GitHub unreachable warns and exits 0Every file was restored after each proof. 43 new tests, 197 in the suite, all green locally.