Repository navigation
[docs] Exclude doc/.claude/ from the RtD PR skip-guard - #64480
Merged
richardliaw merged 2 commits intoJul 1, 2026
Merged
Conversation
The post_checkout skip-guard in .readthedocs.yaml keys on a coarse pathspec (doc/ python/ray/ rllib/ .readthedocs.yaml), so a PR whose only changes are under doc/.claude/ (Claude Code skills and agent files) counts as doc-affecting and runs a full Sphinx build. Those files never participate in the build, which globs from doc/source/. Add a ':(exclude)doc/.claude/' pathspec to the guard's git diff and to the doc-affecting-paths echo below it, so a PR touching only those paths skips the build. Kept on single lines with no backslash escapes so RtD's job-runner preprocessor doesn't drop the script. Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the .readthedocs.yaml configuration to exclude changes in the doc/.claude/ directory from triggering ReadTheDocs Sphinx builds, preventing unnecessary builds when only agent-related files are modified. There are no review comments, and we have no feedback to provide.
The RtD job runner strips the single quotes around the git pathspec, so the ( in :(exclude)doc/.claude/ reached /bin/sh (dash) and aborted the post_checkout script with a syntax error before Sphinx ran. Switch to git's :! exclude shorthand, which has no parentheses and parses whether or not the quotes survive. Note the quote-stripping in the comment block. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
richardliaw
approved these changes
Jul 1, 2026
richardliaw
enabled auto-merge (squash)
July 1, 2026 19:29
1 of 2 tasks
elliot-barn
pushed a commit
that referenced
this pull request
Jul 6, 2026
## Why are these changes needed? The `post_checkout` skip-guard in `.readthedocs.yaml` currently triggers a full RtD Sphinx build on any PR that changes `doc/`, `python/ray/`, or `rllib/`. Because `python/ray/` and `rllib/` are in that pathspec (autodoc renders their docstrings into the API reference), a **code-only PR that touches no doc source still runs a full RtD build**. That preview is low value: - The `docs/readthedocs.com:anyscale-ray` PR check is **not a required merge gate** (PRs merge with it pending/red), so a failing build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker. - The large majority of PR-triggered RtD builds are for PRs that touch no doc source at all, so their authors never open the preview link. This PR narrows the guard to doc-source paths (`doc/` minus `doc/.claude/`, plus `.readthedocs.yaml`), so code-only PRs skip the preview. Docstring-driven API-reference changes are still rendered post-merge: RtD builds `/en/master/` on every master push and Buildkite runs `doc_build`. Mixed PRs that touch both `doc/` and code still build, since the guard still matches `doc/`. Follow-up to #64480 (the `doc/.claude/` exclusion), same guard, same RtD-preprocessor constraints (single-line expression, `:!` exclude shorthand, no shell comments in the block). > **Draft:** holding until post-merge doc-build monitoring is in place, so a docstring change that breaks the API reference on master is caught promptly once code PRs stop rendering it premerge. ## Related issue number N/A ## Checks - [ ] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. (Config-only change; no test surface.) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
Jul 9, 2026
## Description The `post_checkout` skip-guard in `.readthedocs.yaml` (added in #64277) skips the RtD Sphinx build on PRs that touch no doc-affecting files. It keys on a coarse pathspec: ``` git diff --quiet origin/master...HEAD -- doc/ python/ray/ rllib/ .readthedocs.yaml ``` Because it matches all of `doc/`, a PR whose only changes are under `doc/.claude/` (Claude Code skills and agent files) counts as doc-affecting and runs a full Sphinx build — even though those files never participate in the build, which globs from `doc/source/`. This surfaced on #64147 (the entire diff was under `doc/.claude/skills/**` plus `.pre-commit-config.yaml`), which should have been a no-op for RtD but ran a full build. While the doc build cache was unavailable (from the Sphinx 8.2.3 upgrade until #64414), that full build was a cold clean build that repeatedly timed out the RtD check. A correctly-scoped guard skips the build entirely and sidesteps the timeouts regardless of cache health. This PR adds a `':(exclude)doc/.claude/'` git exclude pathspec to the guard's `git diff` and to the doc-affecting-paths echo just below it, so a PR touching only those paths skips the build. Both stay on single lines with no backslash escapes, so RtD's job-runner preprocessor (which silently drops scripts containing certain constructs) preserves the script. Verified locally: a staged change under only `doc/.claude/` makes `git diff --quiet ...` return true (skip), while a change under `doc/source/` still returns false (build). ## Related issues Related to #64277, #64414. ## Additional information The excluded set is intentionally conservative — `doc/.claude/` is the clear build-irrelevant case today. A false skip would publish stale output, so other non-source paths were left in scope. --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
Jul 9, 2026
## Why are these changes needed? The `post_checkout` skip-guard in `.readthedocs.yaml` currently triggers a full RtD Sphinx build on any PR that changes `doc/`, `python/ray/`, or `rllib/`. Because `python/ray/` and `rllib/` are in that pathspec (autodoc renders their docstrings into the API reference), a **code-only PR that touches no doc source still runs a full RtD build**. That preview is low value: - The `docs/readthedocs.com:anyscale-ray` PR check is **not a required merge gate** (PRs merge with it pending/red), so a failing build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker. - The large majority of PR-triggered RtD builds are for PRs that touch no doc source at all, so their authors never open the preview link. This PR narrows the guard to doc-source paths (`doc/` minus `doc/.claude/`, plus `.readthedocs.yaml`), so code-only PRs skip the preview. Docstring-driven API-reference changes are still rendered post-merge: RtD builds `/en/master/` on every master push and Buildkite runs `doc_build`. Mixed PRs that touch both `doc/` and code still build, since the guard still matches `doc/`. Follow-up to #64480 (the `doc/.claude/` exclusion), same guard, same RtD-preprocessor constraints (single-line expression, `:!` exclude shorthand, no shell comments in the block). > **Draft:** holding until post-merge doc-build monitoring is in place, so a docstring change that breaks the API reference on master is caught promptly once code PRs stop rendering it premerge. ## Related issue number N/A ## Checks - [ ] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. (Config-only change; no test surface.) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…4480) ## Description The `post_checkout` skip-guard in `.readthedocs.yaml` (added in ray-project#64277) skips the RtD Sphinx build on PRs that touch no doc-affecting files. It keys on a coarse pathspec: ``` git diff --quiet origin/master...HEAD -- doc/ python/ray/ rllib/ .readthedocs.yaml ``` Because it matches all of `doc/`, a PR whose only changes are under `doc/.claude/` (Claude Code skills and agent files) counts as doc-affecting and runs a full Sphinx build — even though those files never participate in the build, which globs from `doc/source/`. This surfaced on ray-project#64147 (the entire diff was under `doc/.claude/skills/**` plus `.pre-commit-config.yaml`), which should have been a no-op for RtD but ran a full build. While the doc build cache was unavailable (from the Sphinx 8.2.3 upgrade until ray-project#64414), that full build was a cold clean build that repeatedly timed out the RtD check. A correctly-scoped guard skips the build entirely and sidesteps the timeouts regardless of cache health. This PR adds a `':(exclude)doc/.claude/'` git exclude pathspec to the guard's `git diff` and to the doc-affecting-paths echo just below it, so a PR touching only those paths skips the build. Both stay on single lines with no backslash escapes, so RtD's job-runner preprocessor (which silently drops scripts containing certain constructs) preserves the script. Verified locally: a staged change under only `doc/.claude/` makes `git diff --quiet ...` return true (skip), while a change under `doc/source/` still returns false (build). ## Related issues Related to ray-project#64277, ray-project#64414. ## Additional information The excluded set is intentionally conservative — `doc/.claude/` is the clear build-irrelevant case today. A false skip would publish stale output, so other non-source paths were left in scope. --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: 400Ping <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
## Why are these changes needed? The `post_checkout` skip-guard in `.readthedocs.yaml` currently triggers a full RtD Sphinx build on any PR that changes `doc/`, `python/ray/`, or `rllib/`. Because `python/ray/` and `rllib/` are in that pathspec (autodoc renders their docstrings into the API reference), a **code-only PR that touches no doc source still runs a full RtD build**. That preview is low value: - The `docs/readthedocs.com:anyscale-ray` PR check is **not a required merge gate** (PRs merge with it pending/red), so a failing build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker. - The large majority of PR-triggered RtD builds are for PRs that touch no doc source at all, so their authors never open the preview link. This PR narrows the guard to doc-source paths (`doc/` minus `doc/.claude/`, plus `.readthedocs.yaml`), so code-only PRs skip the preview. Docstring-driven API-reference changes are still rendered post-merge: RtD builds `/en/master/` on every master push and Buildkite runs `doc_build`. Mixed PRs that touch both `doc/` and code still build, since the guard still matches `doc/`. Follow-up to ray-project#64480 (the `doc/.claude/` exclusion), same guard, same RtD-preprocessor constraints (single-line expression, `:!` exclude shorthand, no shell comments in the block). > **Draft:** holding until post-merge doc-build monitoring is in place, so a docstring change that breaks the API reference on master is caught promptly once code PRs stop rendering it premerge. ## Related issue number N/A ## Checks - [ ] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. (Config-only change; no test surface.) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: 400Ping <[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.
Description
The
post_checkoutskip-guard in.readthedocs.yaml(added in #64277) skips the RtD Sphinx build on PRs that touch no doc-affecting files. It keys on a coarse pathspec:Because it matches all of
doc/, a PR whose only changes are underdoc/.claude/(Claude Code skills and agent files) counts as doc-affecting and runs a full Sphinx build — even though those files never participate in the build, which globs fromdoc/source/.This surfaced on #64147 (the entire diff was under
doc/.claude/skills/**plus.pre-commit-config.yaml), which should have been a no-op for RtD but ran a full build. While the doc build cache was unavailable (from the Sphinx 8.2.3 upgrade until #64414), that full build was a cold clean build that repeatedly timed out the RtD check. A correctly-scoped guard skips the build entirely and sidesteps the timeouts regardless of cache health.This PR adds a
':(exclude)doc/.claude/'git exclude pathspec to the guard'sgit diffand to the doc-affecting-paths echo just below it, so a PR touching only those paths skips the build. Both stay on single lines with no backslash escapes, so RtD's job-runner preprocessor (which silently drops scripts containing certain constructs) preserves the script.Verified locally: a staged change under only
doc/.claude/makesgit diff --quiet ...return true (skip), while a change underdoc/source/still returns false (build).Related issues
Related to #64277, #64414.
Additional information
The excluded set is intentionally conservative —
doc/.claude/is the clear build-irrelevant case today. A false skip would publish stale output, so other non-source paths were left in scope.