Skip to content

[docs] Exclude doc/.claude/ from the RtD PR skip-guard - #64480

Merged
richardliaw merged 2 commits into
ray-project:masterfrom
dstrodtman:doc-1340-narrow-rtd-skip-guard
Jul 1, 2026
Merged

richardliaw merged 2 commits into
ray-project:masterfrom
dstrodtman:doc-1340-narrow-rtd-skip-guard

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

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.

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]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Jul 1, 2026
@richardliaw
richardliaw enabled auto-merge (squash) July 1, 2026 19:29
@ray-gardener ray-gardener Bot added the core Issues that should be addressed in Ray Core label Jul 1, 2026
@richardliaw
richardliaw merged commit 3f9d7f5 into ray-project:master Jul 1, 2026
6 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants