Repository navigation
ci: build the book in a docs job, failing on the errors mdbook build lets through - #206
Merged
Merged
Conversation
…d lets through
The book (docs/, mdBook) was not built in CI. A broken {{#include}}, a
mistyped book.toml key or a page SUMMARY.md does not list reached main
unseen. `mdbook build` exits 0 on all three.
- scripts/check-book.sh builds the book into a temporary directory.
It fails on any line of the log starting ERROR, and on a page under
docs/src/ that SUMMARY.md does not list.
- Its --self-test breaks a copy of what the book reads (docs/,
AGENTS.md, .config/branding/) four ways, and each must be refused:
- a broken include;
- a mistyped [output.html] key;
- the mermaid preprocessor missing;
- a page not in SUMMARY.md.
The restored copy must then pass again.
- ci.yml: a `docs` job runs both. mdBook 0.5.4 and mdbook-mermaid
0.17.1 (which targets mdBook 0.5) come from taiki-e/install-action,
already pinned for nextest and cargo-deny; its manifest carries
SHA-256 hashes for both versions.
- The gate needs the job.
- plan-ci.py and assert-gate.sh know a tenth job, `docs`. docs/,
AGENTS.md (the book includes its testing rules), .config/branding/
(its palette) and the check itself run it. Nothing else does, and
everything that runs everything runs it too.
- Docs: cicd.md, running.md, standards.md (the book's gate now runs in
CI, with its controls), book-theme.md.
Tests:
- The book as it is: no ERROR, 36 of 36 pages listed. Run locally with
a pass-through stand-in for mdbook-mermaid, which is not installed
here; the real one runs in CI.
- The self-test, locally: all four broken copies refused, the restored
copy passes.
- 5 hand mutants of check-book.sh, each caught by its self-test.
- test_plan_ci.py: 4898 checks, with the new rules and the book's
cases.
- test-ci-scripts.sh: 109 checks, the gate over ten jobs.
- The 34 mutants of the planner and the gate, each still caught.
- Every ci-scripts test and deps guard under dash: 37/37.
Refs: #49
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # .github/scripts/plan-ci.py
# Conflicts: # .github/scripts/plan-ci.py
# Conflicts: # docs/src/architecture/cicd.md
# Conflicts: # .github/scripts/plan-ci.py # .github/scripts/tests/test_plan_ci.py
aRustyDev
added a commit
that referenced
this pull request
Nov 16, 2026
…it (stage 0.5) (#230) * docs(plans): record the owner's answers on Phase 0 of the CI split The callee's final job is `verdict`; the mutant driver runs in ci-scripts; actionlint is added as a pinned check; Prof is in the Low group. PLAN.md and phases/0001-foundation.md say so where each applies (stages 0.1, 0.3 and 0.4, invariant 6, the status table) and no question is left open. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * docs(plans): measure what ci costs today, the baseline for the CI split Stage 0.5 of Phase 0: scripts/ci-baseline.py reads GitHub's run and job records of ci.yml and prints the cost per job and per run; research/0017-ci-baseline.md holds the result (18 full and 5 affected-only runs since the job set last changed, in #206) and how it was measured. A full run takes a median 766 s of wall clock and 4552 runner-seconds, 70% of them in the 25 contract cells. Probing the API changed the method three times, each recorded in the script's header and covered by its self-test (38 checks; 11 planted bugs, all caught): - GitHub lists a job that passed in attempt 1 again under each later attempt, with a new id and its original timestamps, so an execution is a job name and its start time; counting entries double-counted the carried-over jobs. - A push to main queues behind the previous main run, so a run's wall clock is split into the wait before its first job and the execution span. It matches GitHub's run_duration_ms within a second on three runs. - A run with three attempts (108 jobs) makes the jobs endpoint answer 502 at per_page=100, so the pages are 30. Docs and a plan script only: plan-ci.py plans no job for this diff. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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 fourth of the review's smaller CI fixes (
.agents/plans/cicd-review/PLAN.md): build the book in CI.Why
The book (
docs/, mdBook) wasn't built in CI.mdbook buildexits 0 on a broken{{#include}}and on a mistypedbook.tomlkey, and it silently leaves out a page thatSUMMARY.mddoesn't list. So a green build alone proves little.What
scripts/check-book.shbuilds the book into a temp directory. It fails on any log line startingERROR, and on any page underdocs/src/thatSUMMARY.mddoesn't list.--self-testis the check's own control. It copies everything the book reads (docs/,AGENTS.md,.config/branding/) and breaks the copy four ways; each must be refused:[output.html]key;SUMMARY.md.The restored copy must then pass again.
A new
docsjob inci.ymlruns both.taiki-e/install-action. The workflow already uses it, pinned, for nextest and cargo-deny, and its manifest has SHA-256 hashes for both versions.optional: an optional one would let the build go green with the diagrams shipped as raw code blocks.The gate:
plan-ci.pyandassert-gate.shgain a tenth job,docs, and the gate now needs it.What runs the job: changes to
docs/,AGENTS.md(the book includes its testing rules),.config/branding/(its palette) or the check itself, plus every full run. Nothing else does.Docs:
cicd.md,running.md,standards.md(the book's gate now runs in CI, with its controls),book-theme.md.Tests
ERRORlines; 36 of 36 pages are listed inSUMMARY.md.check-book.sh, each caught by its own self-test.test_plan_ci.py: 4,898 checks, with the new rules and the book's cases.test-ci-scripts.sh: 109 checks, covering the gate over ten jobs.ci-scriptstest anddepsguard passes under dash (37/37).Not verified until CI runs it
The real mdbook-mermaid (0.17.1) against this book, and the install-action download. This PR changes
ci.yml, so its own run is a full one and includesdocs.Overlap
This PR touches the same files as #202, #204 and #205:
ci.yml,plan-ci.py,test_plan_ci.pyandcicd.md. Whichever merges later will need main merged in, and I'll do that.Refs: #49
🤖 Generated with Claude Code