Skip to content

ci(docs): gate the benchmark-number age rule on the docs lane, and only for quotable runs - #2115

Merged
lmeyerov merged 2 commits into
masterfrom
fix/docs-age-rule-placement
Oct 2, 2026
Merged

lmeyerov merged 2 commits into
masterfrom
fix/docs-age-rule-placement

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • (added after review of my own claim) --ignore=docs alone would have left docs/test_bench_numbers.py
    running in NO lane: the docs container copied and ran only test_doc_examples.py. The pytest half of
    the gate (contract re-verification, the quotable-run age rule, obligation wording, the synthetic pins)
    now runs in docs/docker/build-docs.sh beside 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-docs runs 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

lmeyerov and others added 2 commits October 2, 2026 01:22
…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
@lmeyerov
lmeyerov merged commit 7c35572 into master Oct 2, 2026
78 of 80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant