Skip to content

fix(ci): build the docs gate from scratch, so a local run cannot undercount - #585

Merged
breimanntools merged 1 commit into
masterfrom
fix/docs-gate-fresh-build
Sep 18, 2026
Merged

breimanntools merged 1 commit into
masterfrom
fix/docs-gate-fresh-build

Conversation

@breimanntools

Copy link
Copy Markdown
Owner

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

IMPROVED: 89 critical < baseline 167 (-78). 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 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 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. A new test pins that.

27 tests in tests/unit/api_tests/test_check_docs_build.py pass.

🤖 Generated with Claude Code

…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

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.39%. Comparing base (3c11c90) to head (bf44fdf).

Additional details and impacted files

Impacted file tree graph

@@           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           
Components Coverage Δ
cpp_core 95.97% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@breimanntools
breimanntools merged commit 814ac65 into master Sep 18, 2026
26 checks passed
@breimanntools
breimanntools deleted the fix/docs-gate-fresh-build branch September 18, 2026 21:04
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