fix(ci): build the docs gate from scratch, so a local run cannot undercount - #585
Merged
Merged
Conversation
…rcount The gate built into docs/_build/gate, which persists. Sphinx is incremental, so a second run into the same directory re-read only the changed pages and every message from an untouched page was missing from the log. Caught on a real branch: the first run reported 167 critical, the second reported 89 and printed "IMPROVED ... Lower the baseline to 89" - inviting a committed baseline that CI, which always builds a fresh checkout, would immediately exceed. The ratchet would then fail on master for a reason nobody could reproduce locally. The build now goes into a fresh temporary directory that is discarded afterwards, so a local run always measures a full build and agrees with CI. Verified: two consecutive runs on the same tree now both report 167 critical / 341 warning, where the second previously reported 89 / 62. The IMPROVED message no longer names a number to commit either: a local build can legitimately differ from CI (an offline runner cannot reach the intersphinx inventories), so it now says to take the count from a CI run. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #585 +/- ##
=======================================
Coverage 95.39% 95.39%
=======================================
Files 222 222
Lines 23387 23387
Branches 4073 4073
=======================================
Hits 22309 22309
Misses 631 631
Partials 447 447
🚀 New features to boost your workflow:
|
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 docs gate built into
docs/_build/gate, which persists. Sphinx is incremental, so a second run into the same directory re-read only the changed pages and every message from an untouched page was missing from the log.Caught on a real branch: the first run reported 167 critical, the second reported 89 and printed
— inviting a committed baseline that CI, which always builds a fresh checkout, would immediately exceed. The ratchet would then fail on
masterfor a reason nobody could reproduce locally.The fix
The build goes into a fresh temporary directory, discarded afterwards, so a local run always measures a full build and agrees with CI.
Verified: two consecutive runs on the same tree now both report
167 critical / 341 warning, where the second previously reported89 / 62.The
IMPROVEDmessage no longer names a number to commit either — a local build can legitimately differ from CI (an offline runner cannot reach the intersphinx inventories), so it now says to take the count from a CI run. A new test pins that.27 tests in
tests/unit/api_tests/test_check_docs_build.pypass.🤖 Generated with Claude Code