ci(docs): gate the benchmark-number age rule on the docs lane, and only for quotable runs - #2115
Merged
Merged
Conversation
…ly for quotable runs `docs/test_bench_numbers.py` fails once any vendored benchmark run is older than `policy.max_age_days` (60). It ran in every lane that invokes pytest from the repo root -- the minimal sentinel gates and the core matrix -- so on 2026-09-25 every PR touching a `.py` file went red on a calendar date, for a GraphBench run that pyg-bench had already re-measured and republished eight days earlier. The rule is right; its placement made it a time bomb for unrelated work. Two changes: * Root-collecting test runners pass `--ignore=docs`. The docs publication checks belong to the docs lane, where the Sphinx extension already enforces age per cited number at build time and fails the build. Runners that pass explicit test files were never affected and are untouched. Collected items from docs/test_bench_numbers.py in a root run: 26 -> 0. * The whole-artifact age test skips runs with no board-quotable cell. A run no board can quote and no page cites cannot mislead anyone; its age is the publisher's concern. A page that does cite one of its cells is still age-checked per citation by the extension. The IS3 diagnostic probe that tripped the rule on 2026-09-26 was exactly this case. The two new tests use a synthetic run so they cannot stop being able to fail when the live artifact changes -- mutation-checked: dropping the exemption fails one, treating nothing as quotable fails the other. Evidence the rule itself earns its keep: pyg-bench republished on Sep 4, 5, 7, 14, 17 and 21 for release reasons; the age rule never forced one of those. Its only two firings were calendar artifacts. The publication contract (quotability, comparison_allowed, provenance, withdrawals) is what caught real problems, and it is unchanged. The docs lane on master stays red until #2017 re-vendors the current artifact; that is the intended behaviour of the rule in the lane where it belongs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ropeBMLJUuy6ViYwy15ud
…d to `--ignore=docs` took the publication checks out of the Python lanes, but the docs container only ran test_doc_examples.py, so the pytest half of the gate (contract re-verification, the quotable-run age rule, obligation wording) ran nowhere. It now runs in build-docs.sh beside the doc-example audit, and the module docstring states the placement it actually has. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ropeBMLJUuy6ViYwy15ud
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.
docs/test_bench_numbers.pyfails once any vendored benchmark run is older thanpolicy.max_age_days(60). It ran in every lane that invokes pytest from the repo root --the minimal sentinel gates and the core matrix -- so on 2026-09-25 every PR touching a
.pyfile went red on a calendar date, for a GraphBench run that pyg-bench had already re-measured
and republished eight days earlier. The rule is right; its placement made it a time bomb for
unrelated work.
Two changes:
Root-collecting test runners pass
--ignore=docs. The docs publication checks belong to thedocs lane, where the Sphinx extension already enforces age per cited number at build time and
fails the build. Runners that pass explicit test files were never affected and are untouched.
Collected items from docs/test_bench_numbers.py in a root run: 26 -> 0.
The whole-artifact age test skips runs with no board-quotable cell. A run no board can quote
and no page cites cannot mislead anyone; its age is the publisher's concern. A page that does
cite one of its cells is still age-checked per citation by the extension. The IS3 diagnostic
probe that tripped the rule on 2026-09-26 was exactly this case. The two new tests use a
synthetic run so they cannot stop being able to fail when the live artifact changes --
mutation-checked: dropping the exemption fails one, treating nothing as quotable fails the
other.
Evidence the rule itself earns its keep: pyg-bench republished on Sep 4, 5, 7, 14, 17 and 21
for release reasons; the age rule never forced one of those. Its only two firings were calendar
artifacts. The publication contract (quotability, comparison_allowed, provenance, withdrawals)
is what caught real problems, and it is unchanged.
--ignore=docsalone would have leftdocs/test_bench_numbers.pyrunning in NO lane: the docs container copied and ran only
test_doc_examples.py. The pytest half ofthe gate (contract re-verification, the quotable-run age rule, obligation wording, the synthetic pins)
now runs in
docs/docker/build-docs.shbeside the doc-example audit, the Dockerfile copies the file,and the module docstring states the placement it actually has instead of arguing for the old one.
test-docsruns for every PR touching docs, Python or infra, so this is still on the PR path.The docs lane on master stays red until #2017 re-vendors the current artifact; that is the
intended behaviour of the rule in the lane where it belongs.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017ropeBMLJUuy6ViYwy15ud
🤖 Generated with Claude Code
https://claude.ai/code/session_017ropeBMLJUuy6ViYwy15ud