Run CI on code and the book on prose, not both on everything - #18
Merged
Conversation
PR #17 changed only the README, docs/, mkdocs.yml and one workflow, and still ran the collector lint and tests, compose parsing, the dashboard checks and CodeQL. None of them can say anything about a markdown file. Splitting the README into docs/ makes that the common case rather than a one-off, and checks that routinely run over changes they cannot judge are checks people learn to skim past. So the two workflows now split the repo between them: ci.yml ignores `**.md`, `docs/**` and `mkdocs.yml`, and book.yml runs on exactly those. A mixed pull request still runs both - `paths-ignore` skips a workflow only when every changed file matches, so a commit touching the collector and its README is fully checked. book.yml also lists its own path, so a change to the build steps is exercised by the pull request making it - which is what happens here. Its `**.md` is deliberately broader than the site: it catches READMEs that are not in the book, but a false positive costs one cheap build while a false negative ships a broken link. Recorded in ci.yml: main is unprotected today, so a skipped workflow costs nothing. If required status checks are ever turned on, a workflow skipped by a path filter never reports and blocks the merge button - the fix then is a same-named no-op job, not deleting the filter. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
PR #17 changed only
README.md,docs/,mkdocs.ymland one workflow — and still ran the collector lint and tests, compose parsing, the dashboard checks and CodeQL. None of them can say anything about a markdown file.Splitting the README into
docs/makes that the common case rather than a one-off, and checks that routinely run over changes they cannot judge are checks people learn to skim past.The split
The two workflows now divide the repo between them:
ci.yml**.md,docs/**,mkdocs.ymlbook.yml**.md,docs/**,mkdocs.yml— plus its own pathA mixed pull request still runs both.
paths-ignoreskips a workflow only when every changed file matches, so a commit touching the collector and its README is fully checked. That is the case that matters, and it is the default.book.ymllists its own path so a change to the build steps is exercised by the PR that makes it — which is exactly what happens on this PR. Its**.mdis deliberately broader than the site itself: it catchescollector/README.mdand the root README, neither of which is in the book, but a false positive costs one cheap 10-second build while a false negative ships a broken link.The trap, recorded in
ci.ymlmainis unprotected today (confirmed: the protection API returns 404), so a skipped workflow costs nothing. If required status checks are ever turned on, a workflow skipped by a path filter never reports at all and the merge button blocks forever. The fix then is a same-named no-op job — not deleting the filter. That is written into the workflow header rather than left to be rediscovered, since this repo grew a branch-protection metric two PRs ago and may well turn protection on.Verification
.github/workflows/*.yml, so CI should run (workflow files are not prose) and Book should run (it lists its own path). If either is missing from the checks below, the filter is wrong.🤖 Generated with Claude Code