Skip to content

[doc][core] Move Ray Core docs to doc/source/core and adopt index.md landings - #66605

Merged
edoakes merged 2 commits into
masterfrom
doc-1710-ray-core-dir-move
Oct 6, 2026
Merged

edoakes merged 2 commits into
masterfrom
doc-1710-ray-core-dir-move

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Brings the Ray Core docs paths in line with the rest of the docs tree, in one path-only change:

  1. Drop the ray- prefix: doc/source/ray-core/ becomes doc/source/core/.
  2. One landing convention: every Ray Core section lands on an index.md, matching scheduling/index.md and patterns/index.md.
  3. Hyphenated slugs: underscore filenames become hyphens.

Both steps ship together because almost all of this PR's CI cost comes from shared files (doc/BUILD.bazel, the test rules, conf.py, and the worker.py docstrings) that fan premerge out to most library suites. Splitting it would pay that cost twice.

No prose changes. Every file keeps its git history. Against master, git detects all 222 moved files as renames, with no adds or deletes.

What changed

The PR has two commits, one per step.

Commit 1: move ray-core/ to core/

  • git mv doc/source/ray-core doc/source/core.
  • Path references that move with the files: toctrees and nav (index.md, navbar.yml, _templates/index.html, apis/index.md), and inbound {doc}, button-ref, and literalinclude paths from ray-overview/, data/, ray-observability/, and ray-contribute/. conf.py exclude and API-page lists move too.
  • API reference docstrings: nine :doc: refs to /ray-core/patterns/... in python/ray/_private/worker.py. Autodoc renders them into the ray.get, ray.put, and ray.wait pages, so the build fails under fail_on_warning without them. This file is why premerge fans out beyond the doc steps.
  • CI and ownership: doc/BUILD.bazel labels and globs (buildifier re-sorted one label list), .github/CODEOWNERS, the doc routing in .buildkite/test.rules.txt with its expectations in test.rules.test.txt and always.rules.test.txt, the doc/Makefile clean target, _ext/api_sidebar.py, and the API consistency check config in ci/ray_ci/doc/cmd_check_api_discrepancy.py.
  • Not changed: ray-core as a CI image, wheel, or build step name (ray-core-build, ray-core-py*, ci/docker/ray-core.*), the @ray-project/ray-core team, .. _ray-core-* labels, and absolute docs.ray.io/.../ray-core/... URLs in source code and READMEs. The redirects keep those URLs working.

Commit 2: landings to index.md and hyphenated slugs

Old path under core/ New path
walkthrough.md index.md
actors.md, objects.md, tasks.md, fault-tolerance.md, internals.md <dir>/index.md
compiled-graph/ray-compiled-graph.md, direct-transport/direct-transport.md <dir>/index.md
examples/overview.md examples/index.md
runtime_env_auth.md runtime-env-auth.md
actors/async_api.md, actors/concurrency_group_api.md actors/async-api.md, actors/concurrency-group-api.md
tasks/dynamic_generators.md tasks/dynamic-generators.md
examples/monte_carlo_pi.md examples/monte-carlo-pi.md
fault_tolerance/ (5 pages) fault-tolerance/

Hub pages that moved one level deeper get their relative toctree entries, doc_code/ includes, and {doc} links rebased, for example actors/named-actors becoming named-actors. Inbound references move to the new landings. Out of scope: notebook slugs and the api/ pages.

Redirects

doc/redirects/current.yaml. Page rules fire only on a 404, and /en/latest/ keeps serving ray-core/ until the next release promotes this change. The rules are written so both versions resolve correctly in the meantime:

  • Renamed pages get single-hop rules. Every old /ray-core/<page>.html and /core/<page>.html of a page renamed in commit 2 has its own rule to the final /core/ path, plus fault_tolerance/* wildcards.
  • Catch-all: /ray-core/* to /core/:splat for everything else. It sits after all the specific /ray-core/ rules.
  • Trailing catch-alls: the two existing ones become /core/examples/* and /core/api/*. Left as /ray-core/..., they would send moved pages to a landing page before the splat could run.
  • Repointed: the one master-pinned rule, /placement-group.html, now targets /en/master/core/....
  • Intentionally not repointed, now or later: older rules whose target is a /ray-core/... page, such as /tutorial.html to /ray-core/walkthrough.html. Older releases still serve ray-core/, so those rules keep resolving there directly. On versions with the move, they reach the right page in a second hop through /ray-core/*. Repointing them to /core/... would send readers of every older release to a page their version doesn't have. They account for the new chain warnings from rtd-redirects validate, which reports 0 errors. apply --strict blocks only on errors, so these warnings don't stop the postmerge apply.

Duplicate check

No open PR moves or renames these paths. Searched open ray-project/ray PRs for ray-core, walkthrough, fault_tolerance, and async_api in titles, plus my own open PRs. Overlapping surface: #65951 moves doc routing out of test.rules.txt into a docs-owned fragment. Whichever PR lands second needs a rebase on the routing lines.

Testing

  • Docs build: make -C doc rtd-build, the RtD-faithful clean build on Python 3.11 with doc/requirements-doc.lock.txt. Ran on each commit. Both passed with build succeeded. and exit 0 under -W, so zero Sphinx warnings.
  • Test rules: rayci test-rules (v0.48.0 from .rayciversion, built locally) passed all 166 expectations on each commit. A deliberately broken expectation failed as expected, so the check is live.
  • Tag routing: a dry run with ci/pipeline/determine_tests_to_run.py shows all 222 moved files emit the same tags at their new paths, against the new rules, as at their old paths against master's rules.
  • API rules sync: pytest ci/pipeline/test_doc_api_rules_sync.py gave 2 passed.
  • Redirect validation: rtd-redirects validate doc/redirects/current.yaml reports 0 errors.
  • Redirect simulation: a local simulator of RtD resolution replayed 484 old URLs against master's rules and pages, then against this PR's, on /en/master/, on /en/latest/ (Ray 2.58.0 pages), and on two older releases. It modeled first-match order, fire-only-on-404, wildcards and :splat, exact rules, and version-pinned targets. Results:
    • 0 URLs that resolved before and don't now.
    • 0 URLs that land on a different page than the moved original.
    • Every old URL of a page renamed in commit 2 reaches its new page in one hop on master.
    • On older releases (releases-2.40.0 and releases-2.20.0 pages), 0 of 391 URLs change or break. Repointing the existing /ray-core/ targets instead would break 48 on each.
    • Checked against the live site for master's rules, the simulator matched docs.ray.io on all 62 sampled URLs whose pages are in git, including hop counts. The other 34 sampled URLs were build-generated /_collections/ pages, which the simulator's page sets don't include.
    • The simulator's master page set matched the built HTML exactly, and every redirect target under /core/ exists in the build.
  • pre-commit: passed.
  • Not run locally: the Bazel doctest targets for core/. Premerge core_doc and ml_doc cover them.

Prepared with AI assistance (Claude Code). Draft until the submitter has reviewed every changed line.

🤖 Generated with Claude Code

@dstrodtman dstrodtman added the docs An issue or change related to documentation label Sep 30, 2026
@dstrodtman dstrodtman changed the title [doc][core] Move doc/source/ray-core to doc/source/core [doc][core] Move Ray Core docs to doc/source/core and adopt index.md landings Sep 30, 2026
dstrodtman added a commit that referenced this pull request Oct 1, 2026
…redirect targets (#66606)

## Why are these changes needed?

`doc/redirects/README.md` explains how to add a redirect. It doesn't
explain how a rule behaves across docs versions, or what to do when
pages that existing rules point at move. Directory moves such as #66605
need that guidance. The obvious approach, repointing existing rules at
the new path, breaks older releases.

The behavior that matters: Read the Docs redirects default to `force:
false`, so a rule fires only where the requested URL would otherwise
return 404. A `type: page` rule applies to every version and resolves
`to` within that version. So one version-less rule for a move does the
right thing everywhere:

- It's inert on `/en/latest/` and older releases, where the old path
still exists.
- It fires on `/en/master/` as soon as the move merges.
- It starts firing on `/en/latest/` when the release that ships the move
goes out, with no release-day edit.

Source: the "Robust fan-out" section of the [rtd-redirects
README](https://github.com/anyscale/rtd-redirects#robust-fan-out-page--force-false--splat).

This PR adds two README sections:

- **How redirects apply across versions**: the 404-only default,
per-version resolution, and when `force: true` is appropriate.
- **Moving or renaming pages**:
  - Add a wildcard `page` rule for the old path.
- Don't repoint existing rules whose `to` points under the moved path.
Older releases still serve the old path, and on newer versions the
request lands on the moved page in a second hop.
- Move the `from` of catch-alls under the old path, so they don't catch
moved pages first.
  - Expect chain warnings from the validator. They don't block CI.

It also fixes a live regression this pattern would have prevented.
#66060 repointed six root-level rules, such as `/rllib-env.html`, from
`/rllib/rllib-*.html` to the renamed `/rllib/*.html` pages. Those pages
exist only on master, so the redirects land on 404s on `/en/latest/` and
every older release. The second commit points them back at
`/rllib/rllib-*.html`, matching the file before #66060. The
`/rllib/rllib-*.html` rules that #66060 added then carry master readers
to the renamed pages in a second hop. A third commit fixes one older
instance of the same pattern: `/rllib-models.html` pointed at
`/rllib/rl-modules.html`, which exists only from 2.43.0 on. It now
points at `/rllib/rllib-models.html`.

It also adjusts step 1 of "Adding or changing a redirect", which said to
point `to` at the final destination. That still holds for new rules, and
the step now links to the move guidance for existing ones.

This replaces the approach in #66027, which staged release-gated rules
in a separate `master.yaml` and folded them into `current.yaml` on
release day. The 404-only default already gives that version gating, and
the fold step would repoint rules in a way that breaks older releases.
I'm closing #66027 in favor of this PR.

## Related PRs

- #66027: closed in favor of this PR.
- #66605: the first directory move that follows this pattern. It adds
`/ray-core/*` -> `/core/:splat`, keeps the 58 existing rules that point
at `/ray-core/...`, and moves the two catch-alls.
- Duplicate check: I searched open PRs for "redirects README" and
"redirect". The only matches are #66027 and #66605, and neither changes
this guidance.

## Testing

- `pre-commit run --files doc/redirects/README.md
doc/redirects/current.yaml`: passes.
- `rtd-redirects validate doc/redirects/current.yaml` with 0.2.0: exit
0, no errors. Warnings go from 44 to 58, all of them chain warnings from
the seven restored two-hop paths.
- For the six restored targets:
`/rllib/rllib-{env,examples,offline,dev,algorithms}.html` return 200 on
`/en/latest/`, `/en/releases-2.40.0/`, and `/en/releases-2.10.0/`. Each
has a `/rllib/rllib-*.html` rule that fires on master.
- Checked the CI claims against the anyscale-rtd-redirects 0.2.0 source
that CI pins. `validate` and `apply --strict` exit non-zero only on
error-level findings (`cli.py`), so chain warnings don't block either
step.
- Verified the 404-only behavior on the live project with the
`/rllib/rllib-env.html` -> `/rllib/env.html` rule that #66060 added
(`curl -sL` against docs.ray.io):
- `/en/master/rllib/rllib-env.html`: 1 hop to
`/en/master/rllib/env.html`, 200. The old page is gone on master, so the
rule fires.
- `/en/latest/rllib/rllib-env.html` and
`/en/releases-2.40.0/rllib/rllib-env.html`: 0 hops, 200. The old page
still exists there, so the rule doesn't fire.
- Verified the repointing failure on the live project, before this PR's
fix. #66060 also repointed six existing rules, such as
`/rllib-env.html`, from `/rllib/rllib-*.html` to the new names. Those
URLs now 404 on `/en/latest/`, `/en/releases-2.40.0/`, and
`/en/releases-2.10.0/`, because `/rllib/env.html` doesn't exist in those
versions. They resolve only on master. They resolve on every version
again once this PR merges and the postmerge apply step runs.

## AI assistance

This PR was prepared with AI assistance (Claude Code). It stays a draft
until I've reviewed every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1710-ray-core-dir-move branch from 67d48a6 to 215f8af Compare October 1, 2026 18:21
dstrodtman added a commit to anyscale/rtd-redirects that referenced this pull request Oct 1, 2026
…-1712]

validate checks a rule set in isolation, so a page-rename change can pass
it and still send readers to a landing page, a 404, or a loop. Whether a
force: false rule fires depends on which pages exist on each version, so
the answer needs page sets, not just rules.

- resolve.py: a request-time Resolver. First match by position, force:
  false only on a 404, page vs exact matching, :splat, fragments never
  matching, /<lang>/<version>/ targets switching page sets, and loop
  detection. Kept separate so the DOC-1697 coverage guard can share it.
- pages.py: page sets from a built HTML dir, objects.inv, sitemap.xml, a
  git tree of Sphinx sources (or WORKTREE), or a path list. Local or URL.
- simulate.py: test URLs from rule sources, prefixes, and explicit URLs;
  per-URL, per-version verdicts against the expected page via a rename map
  (YAML or git renames); hop budget; text and JSON reports.
- cli: simulate subcommand, exit 6 on any failure. Notes when the matrix
  has fewer than three versions or a version mixes a git tree with a build.
- diff_file: make compose_at_ref public for reuse.

Replayed against ray-project/ray#66060, it reports the six flattened
RLlib rules as regressions on latest, releases-2.40.0, and
releases-2.10.0, which ray-project/ray#66606 later restored. Against the
Ray Core move (ray-project/ray#66605) it reports no regressions or wrong
landings on master, latest, releases-2.40.0, or releases-2.20.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit to anyscale/rtd-redirects that referenced this pull request Oct 1, 2026
… [DOC-1713]

On a versioned project, leaving an existing rule pointed at a moved page
is the documented pattern: older versions still serve the old path, and
newer versions take a second hop. The structural tiers flagged exactly
those chains as warnings and told authors to flatten them, which is the
change that 404'd older releases in ray-project/ray#66060. On Ray's
current.yaml the 7 remaining warnings were the six rules #66606 restored
plus one more of the same shape.

A force: false rule fires only where A's target 404s, which varies by
version, so validate can't judge the chain. Those findings are now info
and point at simulate. A force: true rule fires even where A's target
exists, so the chain happens everywhere and stays a warning. Preempted
splats stay info. The fixed-page catch-all special case is subsumed and
removed.

Ray's current.yaml: 0 warning, 58 info. The Ray Core move
(ray-project/ray#66605): 0 warning, 151 info.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dstrodtman
dstrodtman marked this pull request as ready for review October 2, 2026 14:42
@dstrodtman
dstrodtman requested review from a team as code owners October 2, 2026 14:42
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Oct 2, 2026

@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 renames the documentation directory ray-core to core across build rules, configuration files, source code references, and documentation files. One issue was identified in doc/redirects/current.yaml where the redirect destination for /core/api/* still points to the old /ray-core/api/index.html path instead of the new /core/api/index.html path.

Comment thread doc/redirects/current.yaml Resolved
dstrodtman added a commit that referenced this pull request Oct 2, 2026
## Description

Bumps `anyscale-rtd-redirects` from 0.2.0 to
[0.3.0](https://pypi.org/project/anyscale-rtd-redirects/0.3.0/) in both
redirect steps in `.buildkite/doc.rayci.yml`: `doc: validate redirects`
on premerge and `doc: apply redirects` on postmerge.

0.3.0 does the following:

- Removes multi-file composition and multi-version expansion
(`defaults:`, `versions:`). `doc/redirects/current.yaml` never used
either feature.
- Reports a `force: false` chain as info instead of a warning, since a
two-hop chain after a move is the pattern `doc/redirects/README.md`
documents. On `current.yaml` the result goes from 58 warnings to 0
warnings and 58 info. Neither version ever failed CI on chains, because
`--strict` gates only on errors.
- Adds a `simulate` command that replays URLs through the before and
after rules across versions. No CI step uses it yet.

The commands both steps run (`validate`, `diff-file`, `apply --yes
--strict`) are unchanged, so only the pin moves. This PR also updates
the comments that described composing multiple redirect files, and the
README paragraph that called chains warnings.

## Related issues

Related to #66606, which documented the current version-less `page` rule
pattern.

## Additional information

**Not a duplicate.** No open PR touches the rtd-redirects pin: `gh pr
list --repo ray-project/ray --state open --search "rtd-redirects"`
returns only #66605 and #66533, and neither changes
`.buildkite/doc.rayci.yml`.

**Tests run:**

- Parsed `current.yaml` with 0.2.0 and 0.3.0: 270 records each, with an
identical SHA-256 over every field.
- `rtd-redirects validate doc/redirects/current.yaml` with 0.3.0 from a
clean PyPI install: `0 error, 0 warning, 58 info`, exit 0.
- `rtd-redirects diff-file --file doc/redirects/current.yaml --base
upstream/master --head HEAD --repo .`: `0 add, 0 update, 0 delete, 0
reorder`, exit 0.
- The fail-closed single-file guard passes on this branch.
- `pre-commit run` on the two changed files: passed.
- `.buildkite/doc.rayci.yml` still parses as YAML.

The postmerge `apply` step can't run before merge, since it needs the
bot token. Its flags are the same in 0.3.0.

AI assistance (Claude Code) was used to prepare this change. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1710-ray-core-dir-move branch 2 times, most recently from bf5d324 to eba2b07 Compare October 5, 2026 19:45
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…redirect targets (ray-project#66606)

## Why are these changes needed?

`doc/redirects/README.md` explains how to add a redirect. It doesn't
explain how a rule behaves across docs versions, or what to do when
pages that existing rules point at move. Directory moves such as ray-project#66605
need that guidance. The obvious approach, repointing existing rules at
the new path, breaks older releases.

The behavior that matters: Read the Docs redirects default to `force:
false`, so a rule fires only where the requested URL would otherwise
return 404. A `type: page` rule applies to every version and resolves
`to` within that version. So one version-less rule for a move does the
right thing everywhere:

- It's inert on `/en/latest/` and older releases, where the old path
still exists.
- It fires on `/en/master/` as soon as the move merges.
- It starts firing on `/en/latest/` when the release that ships the move
goes out, with no release-day edit.

Source: the "Robust fan-out" section of the [rtd-redirects
README](https://github.com/anyscale/rtd-redirects#robust-fan-out-page--force-false--splat).

This PR adds two README sections:

- **How redirects apply across versions**: the 404-only default,
per-version resolution, and when `force: true` is appropriate.
- **Moving or renaming pages**:
  - Add a wildcard `page` rule for the old path.
- Don't repoint existing rules whose `to` points under the moved path.
Older releases still serve the old path, and on newer versions the
request lands on the moved page in a second hop.
- Move the `from` of catch-alls under the old path, so they don't catch
moved pages first.
  - Expect chain warnings from the validator. They don't block CI.

It also fixes a live regression this pattern would have prevented.
ray-project#66060 repointed six root-level rules, such as `/rllib-env.html`, from
`/rllib/rllib-*.html` to the renamed `/rllib/*.html` pages. Those pages
exist only on master, so the redirects land on 404s on `/en/latest/` and
every older release. The second commit points them back at
`/rllib/rllib-*.html`, matching the file before ray-project#66060. The
`/rllib/rllib-*.html` rules that ray-project#66060 added then carry master readers
to the renamed pages in a second hop. A third commit fixes one older
instance of the same pattern: `/rllib-models.html` pointed at
`/rllib/rl-modules.html`, which exists only from 2.43.0 on. It now
points at `/rllib/rllib-models.html`.

It also adjusts step 1 of "Adding or changing a redirect", which said to
point `to` at the final destination. That still holds for new rules, and
the step now links to the move guidance for existing ones.

This replaces the approach in ray-project#66027, which staged release-gated rules
in a separate `master.yaml` and folded them into `current.yaml` on
release day. The 404-only default already gives that version gating, and
the fold step would repoint rules in a way that breaks older releases.
I'm closing ray-project#66027 in favor of this PR.

## Related PRs

- ray-project#66027: closed in favor of this PR.
- ray-project#66605: the first directory move that follows this pattern. It adds
`/ray-core/*` -> `/core/:splat`, keeps the 58 existing rules that point
at `/ray-core/...`, and moves the two catch-alls.
- Duplicate check: I searched open PRs for "redirects README" and
"redirect". The only matches are ray-project#66027 and ray-project#66605, and neither changes
this guidance.

## Testing

- `pre-commit run --files doc/redirects/README.md
doc/redirects/current.yaml`: passes.
- `rtd-redirects validate doc/redirects/current.yaml` with 0.2.0: exit
0, no errors. Warnings go from 44 to 58, all of them chain warnings from
the seven restored two-hop paths.
- For the six restored targets:
`/rllib/rllib-{env,examples,offline,dev,algorithms}.html` return 200 on
`/en/latest/`, `/en/releases-2.40.0/`, and `/en/releases-2.10.0/`. Each
has a `/rllib/rllib-*.html` rule that fires on master.
- Checked the CI claims against the anyscale-rtd-redirects 0.2.0 source
that CI pins. `validate` and `apply --strict` exit non-zero only on
error-level findings (`cli.py`), so chain warnings don't block either
step.
- Verified the 404-only behavior on the live project with the
`/rllib/rllib-env.html` -> `/rllib/env.html` rule that ray-project#66060 added
(`curl -sL` against docs.ray.io):
- `/en/master/rllib/rllib-env.html`: 1 hop to
`/en/master/rllib/env.html`, 200. The old page is gone on master, so the
rule fires.
- `/en/latest/rllib/rllib-env.html` and
`/en/releases-2.40.0/rllib/rllib-env.html`: 0 hops, 200. The old page
still exists there, so the rule doesn't fire.
- Verified the repointing failure on the live project, before this PR's
fix. ray-project#66060 also repointed six existing rules, such as
`/rllib-env.html`, from `/rllib/rllib-*.html` to the new names. Those
URLs now 404 on `/en/latest/`, `/en/releases-2.40.0/`, and
`/en/releases-2.10.0/`, because `/rllib/env.html` doesn't exist in those
versions. They resolve only on master. They resolve on every version
again once this PR merges and the postmerge apply step runs.

## AI assistance

This PR was prepared with AI assistance (Claude Code). It stays a draft
until I've reviewed every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ct#66665)

## Description

Bumps `anyscale-rtd-redirects` from 0.2.0 to
[0.3.0](https://pypi.org/project/anyscale-rtd-redirects/0.3.0/) in both
redirect steps in `.buildkite/doc.rayci.yml`: `doc: validate redirects`
on premerge and `doc: apply redirects` on postmerge.

0.3.0 does the following:

- Removes multi-file composition and multi-version expansion
(`defaults:`, `versions:`). `doc/redirects/current.yaml` never used
either feature.
- Reports a `force: false` chain as info instead of a warning, since a
two-hop chain after a move is the pattern `doc/redirects/README.md`
documents. On `current.yaml` the result goes from 58 warnings to 0
warnings and 58 info. Neither version ever failed CI on chains, because
`--strict` gates only on errors.
- Adds a `simulate` command that replays URLs through the before and
after rules across versions. No CI step uses it yet.

The commands both steps run (`validate`, `diff-file`, `apply --yes
--strict`) are unchanged, so only the pin moves. This PR also updates
the comments that described composing multiple redirect files, and the
README paragraph that called chains warnings.

## Related issues

Related to ray-project#66606, which documented the current version-less `page` rule
pattern.

## Additional information

**Not a duplicate.** No open PR touches the rtd-redirects pin: `gh pr
list --repo ray-project/ray --state open --search "rtd-redirects"`
returns only ray-project#66605 and ray-project#66533, and neither changes
`.buildkite/doc.rayci.yml`.

**Tests run:**

- Parsed `current.yaml` with 0.2.0 and 0.3.0: 270 records each, with an
identical SHA-256 over every field.
- `rtd-redirects validate doc/redirects/current.yaml` with 0.3.0 from a
clean PyPI install: `0 error, 0 warning, 58 info`, exit 0.
- `rtd-redirects diff-file --file doc/redirects/current.yaml --base
upstream/master --head HEAD --repo .`: `0 add, 0 update, 0 delete, 0
reorder`, exit 0.
- The fail-closed single-file guard passes on this branch.
- `pre-commit run` on the two changed files: passed.
- `.buildkite/doc.rayci.yml` still parses as YAML.

The postmerge `apply` step can't run before merge, since it needs the
bot token. Its flags are the same in 0.3.0.

AI assistance (Claude Code) was used to prepare this change. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman and others added 2 commits October 6, 2026 12:26
Pure directory move with git mv. The only edits are path references that
must move with the files: toctrees, {doc} and :doc: refs, literalinclude
and image paths, doc/BUILD.bazel labels and globs, CODEOWNERS, the doc
test routing in .buildkite/*.rules*.txt, conf.py, api_sidebar.py, the API
consistency check config, and nine :doc: refs in worker.py docstrings that
autodoc renders into the API reference.

Adds a /ray-core/* -> /core/:splat page redirect. Existing rules that
target /ray-core/ pages keep their targets until the next release, since
/en/latest/ still serves ray-core/ until then; on /en/master/ they reach
the new page through the catch-all.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Pure renames under doc/source/core/, plus the path references and
redirects that must move with them:

- walkthrough.md becomes the Ray Core landing, index.md.
- Hub pages move into their directories as index.md: actors, objects,
  tasks, fault-tolerance, internals. Self-named landings do the same:
  compiled-graph/ray-compiled-graph.md, direct-transport/direct-transport.md,
  and examples/overview.md.
- Underscore slugs become hyphens: runtime-env-auth, actors/async-api,
  actors/concurrency-group-api, tasks/dynamic-generators,
  examples/monte-carlo-pi, and the fault_tolerance/ directory, which merges
  into fault-tolerance/.

Hub pages that moved one level deeper get their relative toctree,
{doc}, and literalinclude paths rebased. No prose changes.

Every old /ray-core/ and /core/ URL of a renamed page gets an explicit
single-hop page redirect, placed before the /ray-core/* catch-all.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1710-ray-core-dir-move branch from 879e1dc to f561614 Compare October 6, 2026 16:28
@dstrodtman
dstrodtman enabled auto-merge (squash) October 6, 2026 18:23
@edoakes
edoakes disabled auto-merge October 6, 2026 18:34
@edoakes
edoakes merged commit 5cf675f into master Oct 6, 2026
6 of 7 checks passed
@edoakes
edoakes deleted the doc-1710-ray-core-dir-move branch October 6, 2026 18:34
dstrodtman added a commit that referenced this pull request Oct 6, 2026
…on (#66751)

## Why are these changes needed?

Four API reference pages live outside the APIs tab, so the shared API
sidebar and the `API_PATH_PREFIXES` page set don't include them. This PR
moves them into `core/api/`:

| Old path | New path |
|---|---|
| `ray-observability/reference/api.rst` | `core/api/state.rst` |
| `cluster/running-applications/job-submission/jobs-package-ref.md` |
`core/api/job-submission.md` |
| `core/compiled-graph/compiled-graph-api.rst` |
`core/api/compiled-graph.rst` |
| `cluster/running-applications/autoscaling/reference.md` |
`core/api/autoscaler.md` |

This is a pure path change: all four files are 100% renames with no
content edits. Everything else in the diff follows from the move:

- **Navigation.** The Core API toctree (`core/api/index.md`) now lists
all four pages. The old parent toctrees point at the new paths, so the
pages stay reachable from their original sections.
- **Redirects.** `doc/redirects/current.yaml` gains one `page` rule per
moved page, plus wildcard rules for the generated per-symbol stubs,
which move from each page's old `doc/` directory to `core/api/doc/`. All
rules use the default `force: false`. Existing rules that point at the
old paths are left alone, so older doc versions keep resolving them.
- **Dead stub-directory patterns.** Only these four pages generated
stubs into `ray-observability/reference/doc/`,
`cluster/running-applications/job-submission/doc/`, and
`core/compiled-graph/doc/`. Their entries in `conf.py`
(`llms_txt_exclude`, `remove_from_toctrees`), the `doc/Makefile` `clean`
target, and `doc/.gitignore` are removed. Existing `core/api/doc/*`
patterns cover the new location. One side effect: the compiled graph
stubs were missing from `remove_from_toctrees`, so they're now pruned
like every other API stub.
- **`doc_api` routing.** The `ray-observability/reference/` directory
was in the `doc_api` rule only because the Core API toctree pulled in
its `api.rst`. Now that the page lives in `core/api/`, the exception
goes away in both `.buildkite/test.rules.txt` and
`_ALLOWED_ONLY_IN_RULE` in `ci/pipeline/test_doc_api_rules_sync.py`. The
remaining pages in that directory, `cli.rst` (`click` directives only),
`index.md`, and `system-metrics.rst`, carry no `autosummary` or
`autoclass` blocks, which are the only blocks the API consistency check
parses. The `test.rules.test.txt` expectation moves to
`core/api/state.rst`.

**Effect on the Core API consistency check.** The check walks the
toctree from `core/api/index.md`, so it now also reads the job
submission and compiled graph pages. The autoscaler page uses
`autofunction`, which the check doesn't parse. I ran the check's
Sphinx-free doc parser (`ci/ray_ci/doc/autodoc.py`) over the new walk.
It finds 188 documented APIs, and the only names documented twice are
`ray.get`, `ray.put`, `ray.method`, and `ray.remote`, all already in
Core's `intentional_duplicate_apis`. `ActorMethod.bind`, documented in
both `core.rst` and the compiled graph page, is also already exempt.
None of the newly walked classes resolves to a private module path. I
couldn't run the code-side half of the check locally because it needs a
compiled Ray, so premerge's `doc: check API doc consistency` step is the
gate for that half.

**Stacking.** This branch is stacked on #66605 (move Ray Core docs to
`doc/source/core`), which touches the same surfaces: `api_sidebar.py`,
`apis/index.md`, the redirects file, and the `doc_api` rules. Merge
#66605 first. #66744 also edits `doc/redirects/current.yaml`, so expect
a small rebase there.

## Related issue number

None. This is groundwork for moving the API reference off Sphinx
autodoc: every page the API reference generator needs to reproduce
should live under an `API_PATH_PREFIXES` directory.

## Checks

- [x] I've signed off every commit (DCO).
- [x] Duplicate-work check: `gh pr list --repo ray-project/ray --state
open --search "<area keywords>"` found no open PR moving these pages.
The overlapping PRs are #66605, which this stacks on, and #66744, which
only shares the redirects file.
- [x] `bazel test //ci/pipeline:test_doc_api_rules_sync`: PASSED.
- [x] `rtd-redirects validate doc/redirects/current.yaml`: 0 errors, 0
warnings. Chain notes went from 171 to 181, from the two-hop paths
described above.
- [x] Tag dry run (Ray's `determine_tests_to_run.py` reference parser):
`core/api/state.rst` and `core/api/job-submission.md` emit `doc_api`,
and `ray-observability/reference/{cli.rst,index.md}` hit the prose skip
rule.
- [x] `make -C doc rtd-build` (RtD-faithful, `-W --keep-going`, Python
3.11 and the docs lock): exactly one warning, `_includes/_help.rst:
document isn't included in any toctree`. That orphan is in this branch's
base (#66605) and was already deleted on master by #66750. With it
removed locally, an incremental `-W` rebuild reports `build succeeded.`
with zero warnings. The four pages render at
`core/api/{state,job-submission,compiled-graph,autoscaler}.html`, and
their 116 generated stubs render under `core/api/doc/`.
- [x] `rtd-redirects simulate` against #66605 as the base, covering
master (built HTML), latest, `releases-2.55.0`, and `releases-2.40.0`,
with `--prefix` on all three old directories, sample stub URLs, and a
stub rename map: **0 regressions and 0 new loops on every version.** It
still exits nonzero, for two reasons I checked by hand:
- On master, 35 old stub URLs are flagged as "wrong landings" only
because the before side is a git tree, which has no generated stubs. All
35 land on the identical stub under `core/api/doc/` in one hop.
- On every version, the synthetic sample stub (`__simulate-sample__`, a
name that never existed) now lands on the Core API index instead of the
observability landing page. Real stubs on older releases are still
served directly, because the rules don't force.

AI assistance (Claude Code) was used to prepare this change. I reviewed
every changed line.

Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
…enforced) (#66640)

## Why are these changes needed?

Seeds deterministic prose enforcement for Ray Core docs ahead of the
style pass, following the pattern from #65239 (KubeRay) and #66236
(RLlib). Every rule is warn-level and **not run in CI yet**. The Vale
pre-commit hook is commented out, and when it was on it covered only
`doc/source/data/`. Registering the config lets contributors run `vale
doc/source/core/` by hand during the style pass.

**Stacked on #66605**, which moves `doc/source/ray-core/` to
`doc/source/core/`. The path-scoped section is written against the final
path, so this PR targets that branch. Retarget to `master` once #66605
merges.

Ray Core defines the object vocabulary the rest of the docs reference,
so the forms settled here are the ones other libraries inherit.

## What's here

- **`.vale/styles/Core/Terms.yml` and `Core/Capitalization.yml`:**
case-sensitive `substitution` swaps at `level: warning`, seeded from a
prose-only count over `doc/source/core/`. `Terms.yml` holds the swaps
that are safe to apply blindly. `Capitalization.yml` holds the ones that
lowercase a whole phrase and would drop a heading's or sentence's
initial capital, so it has no replace action:
- `raylet` lowercase mid-sentence. The source code uses the lowercase
form about 8 to 1. The swaps carry a preceding word, such as `the
Raylet`, so a sentence that opens with "Raylet" doesn't alert.
- `Plasma store`: Plasma keeps its capital as the implementation's name,
and "store" stays lowercase.
  - `object ref` in prose, with `ObjectRef` in code style for the type.
  - `runtime env` to `runtime environment`.
- Title-cased generic nouns, mostly in headings, such as `Placement
Group`, `Fault Tolerance`, and `Head Node`. These live in
`Capitalization.yml`, with `Raylets` and `Object Ref(s)`.
`Ray/Capitalization.yml` already covers `Ray Task`, `Ray Actor`, and
similar.
- **Accept lists:**
- `Core` gains Ray Core mechanism terms (`asyncio`, `Gloo`, `GPUDirect`,
`libfabric`, `subreaper`, `retryable`, and others), and `RPC` becomes
`RPC(s)?`.
- `General` gains cross-cutting technical words and vendor names that
other libraries also hit (`backoff`, `serializer`, `protobuf`, `Cython`,
`CuPy`, `Gaudi`, `NPU(s)?`, and others).
- Casing-only fixes such as `AsyncIO` and `GLOO` rely on the accept list
driving `Vale.Terms`, not on a swap, so a token never alerts twice.
- **`.vale.ini`:** a `[doc/source/core/**/*.{md,rst}]` section with
`Vale, Google, Ray, Core`, mirroring the RLlib block. The KubeRay and
RLlib comments also get corrected enforcement steps: enforcing means
uncommenting the hook and widening both its `files` pattern and the
top-level `exclude` carve-out.
- **`writing-style.md`:** a "Writing Ray Core docs" section with a Ray
Core terms table. Both Core rules link to it through the
`ray-core-docs-style` label.
- **Replace actions on the term rules:** `Ray/`, `RLlib/`, `KubeRay/`,
and `Core/Terms.yml` set `action: {name: replace}`, so Vale's JSON
output carries each swap's replacement text. A tool can then apply the
swaps from Vale's own alerts instead of re-implementing Vale's path
scoping and code-span handling. Every swap in these four files is a
literal that's safe to apply without judgment. A swap that needs a human
decision belongs in a rule without the action.

No prose under `doc/source/core/` changes here. The style pass that
fixes the alerts follows in separate PRs stacked on this one, split by
section.

## Duplicate check

No open PR adds Ray Core Vale rules. I searched open `ray-project/ray`
PRs for `vale core` and for `writing-style.md`. #66639, my own PR, also
edits `writing-style.md`, in a different section. Whichever lands second
takes a trivial rebase.

## Testing

- **Vale 3.12.0 on `doc/source/core/`:** the two Core rules raise 85
alerts, 45 from `Core.Terms` and 40 from `Core.Capitalization`, all of
them true positives on review. No position alerts twice across
`Vale.Terms`, the Core rules, `Ray.Terms`, and `Ray.Capitalization`.
Vale.Spelling drops from 373 to 168. What's left is mostly unbackticked
code that the prose pass will fix, not vocabulary.
- **Rule check against the new guide table:** linting the table under
the Core scope fires on every "Not" form that has a swap or accept
entry, and on none of the "Use" forms.
- **Other scopes:** alert counts for `doc/source/rllib`,
`doc/source/data`, and `doc/source/cluster/kubernetes` stay the same
apart from fewer Vale.Spelling hits. `walkthrough` isn't on the accept
list, because an entry there would shadow `Google.WordList`'s
`walk-through` swap. It now alerts twice in `doc/source/core` and twice
in `doc/source/kuberay`.
- **Lookbehind check:** a `(?<=...)Raylet` swap key misreported its
position and missed the mid-sentence match in Vale 3.12, which is why
the file uses explicit preceding-word keys.
- **Replace actions don't change the alerts:** with and without the
`action` lines, Vale reports the same checks, lines, spans, and messages
on `doc/source/core`, `doc/source/rllib`, and
`doc/source/cluster/kubernetes`, compared by a stable hash of the full
alert list. Every `*.Terms` alert in those areas now carries a `replace`
action, and `Core.Capitalization` alerts carry none.
- **pre-commit:** passed on the changed files.
- **Not run locally:** the Sphinx build. The only `doc/source` change is
one new section and label in `writing-style.md`. The RtD preview covers
it.

Prepared with AI assistance (Claude Code). Draft until the submitter has
reviewed every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
)

## Why are these changes needed?

Stacked on #66744.

A Sphinx build of master logs 265 `document is referenced in multiple
toctrees` messages. They're info-level, so they don't fail the build,
but every one marks a page whose sidebar parent and breadcrumb Sphinx
has to choose arbitrarily. This PR removes 245 of them. The other 20 are
on Ray Core API pages and are left for separate follow-ups.

### Autosummary entries listed twice (240)

Most duplicates come from a hand-written API page that lists a class
with `:toctree: doc/` and then lists that class's methods in further
`:toctree:` blocks. The class stub, rendered from
`_templates/autosummary/class.rst`, already lists every documented
method in its own `:toctree:` autosummary, so each method stub ends up
with two parents. Similarly, `train/api/deprecated.rst` re-lists APIs
that the Train API pages also list, and `data/api/saving_data.rst`
re-lists `Dataset` methods that the Dataset page owns.

The fix drops `:toctree:` from the duplicated entries only. The tables
still render and link to the same stub pages, since autosummary links
entries by object reference. The stubs are still generated, because
autosummary recurses into generated stubs and the class stub's own
`:toctree:` block covers them. Where a block mixed duplicated and unique
entries, it's split into consecutive blocks in the original order, so
only the duplicated runs lose `:toctree:`. That split adds a small gap
between table rows on a few pages, for example `Learner` /
`Learner.build` / `Learner._make_module` in the RLlib Learner reference.

Files: RLlib `package_ref` (12 pages), Tune `api` (9 pages), Data
`saving_data` and `preprocessor`, Train `deprecated`.

### Hand-written navigation duplicates (3 pages)

- `cluster/vms/user-guides/community/index.md` had a hidden toctree
repeating `yarn`, `slurm`, and `lsf` from the visible toctree below it.
Removed the hidden one.
- `ray-references/faq.md`, an orphan page, listed `tune/faq` in a
toctree that competed with `tune/index`. It's now a plain `{doc}` link.
- `ray-observability/ray-distributed-debugger.md` sat in both
`ray-observability/index.md` and `user-guides/debug-apps/index.md`. Kept
it in the top-level observability toctree, which matches the file's
location, and removed it from the debug-apps toctree. The debug-apps
page still links it from its bullet list. **Reviewer call:** if the
debugger should live under Debugging Applications in the sidebar
instead, flip which toctree keeps it.

### Left for follow-ups (20)

These were deferred while #66605 (Ray Core directory move) and #66751
(API reference page moves) were in flight. Both have merged, and the
duplicates remain on the moved pages:

- 13 come from #66751 keeping each moved page in its original section's
toctree as well as in `core/api/index.md`: `core/api/job-submission.md`
and its eight `JobSubmissionClient` method stubs,
`job-submission/cli.md`, `core/api/autoscaler.md`,
`core/api/compiled-graph.rst`, and the `ActorMethod.bind` stub. Whether
those pages keep a second home in their original sections is a
navigation decision for that change, not a mechanical fix.
- 2 are `core/api/state.rst` and `ray-observability/reference/cli.rst`,
listed from both the observability reference index and the Core API
index.
- 5 are Core API stubs listed twice within `core/api/`: `ray.get`,
`ray.put`, and `ray.method` (`core` and `direct-transport`),
`ActorClass.options` (the `ActorClass` stub and `core`), and
`ray.remote` (twice in `core`).

## Related issue number

None.

## Checks

- Duplicate-work check: `gh pr list --repo ray-project/ray --state open
--search "toctree"` and a review of my open docs PRs found no other PR
addressing these messages. None of my other open PRs touch the files
changed here.
- `pre-commit run --files <changed files>` passed.
- The duplicate list comes from the RtD build log for #66744 (build
4527202). Each removed `:toctree:` entry was matched by fully qualified
name against a document that log reports as having a second parent, and
only entries on that list were changed.
- RtD preview build 4532297 succeeded and logged 18 `multiple toctrees`
messages, against 263 for #66744 before this change. It reported no
Sphinx warnings and no missing autosummary stubs. That build predates
the base branch's merge of #66605 and #66751, which brought the leftover
count to 20.
- After merging the current base, this branch's tree is identical to the
base plus the original dedupe commit, checked by applying that commit's
patch to the base tree and comparing tree hashes.

This PR was prepared with AI assistance (Claude Code).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
## Why are these changes needed?

Style and grammar pass over the top-level Ray Core pages under
`doc/source/core/`, meaning the pages directly in that directory and not
its subdirectories, against `doc/source/ray-contribute/writing-style.md`
and its "Writing Ray Core docs" terms. This is the first prose layer
stacked on #66640 (Core Vale term library), which is stacked on #66605
(the `ray-core/` to `core/` move). Later layers cover `tasks/`,
`actors/`, `objects/`, `patterns/`, `fault-tolerance/`, `scheduling/`,
and the remaining subdirectories.

The edits are wording, voice, tense, list structure, and admonitions. No
code block, `{ref}` or `{doc}` target, or existing `(label)=` anchor
changed. Where a heading's words changed, a `(old-slug)=` label keeps
the old URL fragment working.

### Corrections verified against source

These change what a sentence says, so they're called out for review:

- `starting-ray.md`: the `ray.init()` address lookup order listed
`RAY_ADDRESS` before an explicit `address` argument. `ray.init()` in
`python/ray/_private/worker.py` uses `RAY_ADDRESS` only when `address`
is unset or `"auto"`, so the list now puts the explicit address first.
- `tips-for-first-time.md`: `np.zeros((5000, 5000))` has 25 million
entries, not 2.5 million. The speedup from the page's own output (1.08 s
to 0.133 s) is about 8x, not 7x.
- `handling-dependencies.md`: the `pip` and `uv` dict forms take four
fields, not three (`python/ray/_private/runtime_env/validation.py`).
- `ray-generator.md`: a sentence that repeated the previous paragraph's
argument list and didn't parse now describes what the mixed-input
example does.
- `configure.md`: split malformed code spans that wrapped prose and file
names, and removed a stray `\#` that rendered as a literal `#`.

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `head-node-memory-management.md`: Best practices says to match memory
and GPU requests to limits, while the `important` note and the example
say memory and CPU. Which is right?
- `configure.md`: "a maximum of 10,000 workers" per node, while the
default worker port range 10002-19999 is 9,998 ports.
- `handling-dependencies.md`: "A local path must be a directory path"
and "A remote URI must link directly to a zip file" contradict the API
reference, which accepts local files and `.whl` for `py_modules` and
`.tar.gz`, `.tgz`, and `.tar.xz` remote archives.
- `type-hint.md`: the Pattern 2 code sample calls `func.remote()` on an
undecorated function and is missing imports.

`ray-dag.md` leaves the Compiled Graph note untouched, because #66464
rewrites it for the deprecation. `sandboxes.md` is held out of this PR
so it doesn't conflict with the open sandbox feature PRs #66359, #66470,
and #66471. It gets its own pass after those land.

## Related issue number

None. Not a duplicate: open PRs touching these pages are #66605 and
#66640 (this stack), #66464 (Compiled Graph deprecation) and the sandbox
feature PRs #66359, #66470, and #66471. This PR stays out of the text
those PRs change, as described above.

## Checks

- `vale doc/source/core/*.md` from the repo root: no `Core.Terms`
alerts. This PR adds the terms the pass surfaced to the `General` and
`Core` accept lists, which removes 35 alerts across `doc/source`, all on
those tokens, and adds none. Remaining alerts are passives or
"currently" kept on purpose, the Azure term "account name"
(`Google.WordList`), and a `Vale.Terms` false positive on "the rest".
Sandbox-only terms wait for the `sandboxes.md` pass.
- `codespell doc/source/core/*.md`: only the `org.testng` Java import
false positive.
- Per-file invariant check against the pre-edit files: fenced-code
count, role-target multiset, and URLs unchanged. Added labels are the
only anchor changes.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check
doc/source/core/*.md`: clean, with one pre-existing hard wrap joined and
confirmed whitespace-only by `verify.py`.
- Colon-fence directives parse and nest as before (markdown-it with the
MyST colon-fence plugin).
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
…66666)

## Why are these changes needed?

Style and grammar pass over the Ray Core pages under
`doc/source/core/tasks/`, `actors/`, and `objects/` (14 pages), against
`doc/source/ray-contribute/writing-style.md` and its "Writing Ray Core
docs" terms. This is the second prose layer of the Ray Core stack: it's
stacked on #66642 (top-level pages), which is stacked on #66640 (Core
Vale term library) and #66605 (the `ray-core/` to `core/` move). Later
layers cover `patterns/`, `fault-tolerance/`, `scheduling/`, and the
remaining subdirectories.

The edits are wording, voice, tense, list structure, and admonitions.
Leftover rST blockquote lists (`> -`, `> 1.`) are now plain lists, and
bold inline caveats such as "**Important notes:**" are now admonitions
or lead-in sentences. No code block or existing `(label)=` anchor
changed. Where a heading's words changed, a `(old-slug)=` label keeps
the old URL fragment working: four on `async-api.md`, and one each on
`terminating-actors.md` and `object-spilling.md`. The H1 and the generic
`#stats` fragment don't get one.

### Corrections verified against source

These change what a sentence says, so they're called out for review:

- `actors/concurrency-group-api.md`: the prose named the `@ray.remote`
argument `concurrency_group`. The example defines groups with
`concurrency_groups=` (plural). `concurrency_group=` is the
`@ray.method` argument that assigns a method to a group.
- `tasks/dynamic-generators.md`: "you can pass an `ObjectRefGenerator`
as a task argument" now names `DynamicObjectRefGenerator`, which is what
the matching example in `doc_code/generator.py`
(`__dynamic_generator_pass_start__`) passes after
`ray.get(dynamic_ref)`.
- `actors/index.md`: the page said Ray "invokes
`ray.get(actor_task_ref)`" on cancellation. It now says calling
`ray.get` on the cancelled task raises `TaskCancelledError`, per the
`ray.cancel` docstring in `python/ray/_private/worker.py`.
- `actors/async-api.md`: the GIL caveat's bare `{ref}` roles rendered
the section titles mid-sentence ("Neither the Threaded actors nor
`asyncio` for actors model..."). They now carry explicit link text.

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `tasks/nested-tasks.md`: the note says `g` is pickled and shipped to
the workers "as soon as you define `g`", so `f` must be defined first.
`RemoteFunction._remote()` in `python/ray/remote_function.py` pickles
and exports the function on the first `.remote()` call, not at
definition. Does the ordering limitation still hold?
- `actors/concurrency-group-api.md`: the prose says `io` has a maximum
concurrency of 2 and `compute` has 4. The Python example matches, but
the Java example sets `.setMaxConcurrency(1)` for both groups. Which
should change?
- `objects/serialization.md`: "Most Python distributions default to
pickle protocol 3." `pickle.DEFAULT_PROTOCOL` is 4 from Python 3.8 on.
Is the sentence still worth keeping?
- `actors/terminating-actors.md`: the front-matter description says
cleanup runs "when ray.shutdown is called", but the page is about the
actor's `__ray_shutdown__()` method, which runs on graceful actor
termination.
- `actors/index.md`: "When you pass `recursive=True`, Ray cancels..."
reads as opt-in, but `recursive` defaults to `True` in `ray.cancel`.
- `objects/object-spilling.md`: the CLI tab wraps a `ray start` shell
command in a `{doctest}` block.
- `actors/out-of-band-communication.md`: the Horovod-on-Ray and RayDP
examples, and the linked blog post, might be stale.

## Related issue number

None. Not a duplicate. Other open PRs touching these pages: #66605 (this
stack), #66402 (adds a section to `objects/serialization.md`), and
#65792 (edits Java and C++ code in the old `ray-core/tasks.rst`). This
PR leaves the two lines around #66402's insertion point unchanged and
touches no code blocks, so neither should conflict beyond what the move
in #66605 already causes.

## Checks

- `vale` on the 14 pages from the repo root: no `Core.Terms` alerts,
down from 520 alerts before the pass to 15. The remaining alerts are
passives on state adjectives ("is *detached*", "are read-only"),
"currently" kept where it marks a temporary limitation, and acronym
definitions such as "(GIL)". The second commit adds `aioredis`,
`autograd`, and `backport` to the `General` accept list. Across
`doc/source` that removes 6 alerts and adds none.
- `codespell` on the 14 pages: clean.
- Per-file invariant check against the pre-edit files: fenced-code
count, role-target multiset, and URLs unchanged. The only anchor changes
are the added labels. The only role-target changes are link-text edits.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check`: clean.
The two hard-wrapped list items joined during the blockquote-list
conversion are whitespace-only.
- Colon-fence directives, including the new admonitions and the note
nested in a `serialization.md` list item, parse and nest as intended
(markdown-it with the MyST colon-fence plugin).
- Meaning review: each edit was checked for changed claims against the
Ray source tree and sibling docs. Three edits that shifted a claim and
two that introduced ambiguity are restored in the third commit. The
review lists further pre-existing questions inline.
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
## Why are these changes needed?

Style and grammar pass over the 22 Ray Core design pattern pages under
`doc/source/core/patterns/`, against
`doc/source/ray-contribute/writing-style.md` and its "Writing Ray Core
docs" terms. This is the third prose layer of the Ray Core stack. It's
stacked on #66666 (tasks, actors, and objects), which is stacked on
#66642 (top-level pages), #66640 (Core Vale term library), and #66605
(the `ray-core/` to `core/` move). Later layers cover
`fault-tolerance/`, `scheduling/`, and the remaining subdirectories.

The edits are voice, person, tense, word choice, and list structure.
First-person plural is now "you" or an imperative, and prose uses of
"object references" and `ObjectRef`s are now "object ref", per the Core
terms table. Inline numbered lists and parenthetical asides are now
lists or separate sentences.

The 13 anti-pattern pages opened with a bold `**TLDR:**` line, or
`**Summary:**` on `fork-new-processes.md`. Each labeled line was already
the page's opening statement, so the label is gone and the
recommendation opens the page as plain prose, ahead of the paragraph
that explains it. On `too-fine-grained-tasks.md`, the summary's second
sentence repeated the body's first sentence without its "usually" hedge,
so the summary is merged into that paragraph. The rest of the shared
template is unchanged across all 22 pages: the
`Pattern:`/`Anti-pattern:` H1 prefix, the bold code-variant labels such
as `**Better approach:**`, and the "Code example" and "Example use case"
headings.

Two H1s changed. The section landing is now sentence case, "Design
patterns and anti-patterns", and "Anti-pattern: Serialize ray.ObjectRef
out of band" now reads "Serializing", to match the other gerund H1s. No
link in `doc/source` targets either old heading slug or quotes either
old title. No code block, `(label)=` anchor, or role target changed.

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `ray-get-too-many-objects.md`: the opening sentence says fetching too
many objects "leads to" failure, but the next paragraph says it "could"
fail. Which degree is right? The body also says that after a batch is
processed, Ray evicts its objects. Does eviction depend on the object
refs going out of scope rather than on processing alone?
- `nested-ray-get.md`: the front-matter description says this
anti-pattern "serializes execution", but the body describes CPU release,
process and memory cost, and possible deadlock. Is "serializes
execution" the intended claim?
- `out-of-band-object-ref-serialization.md`: Ray pins the object "for
the lifetime of a worker", and the next sentence says it stays pinned
"until its owner worker dies". Is "a worker" the owner worker, or the
worker that serialized the ref?
- `out-of-band-object-ref-serialization.md` front matter: the
description says out-of-band serialization "can let its value be
reclaimed early", but the body says Ray pins the object, which leaks it
instead.

## Related issue number

None. Not a duplicate. No other open PR edits these pages.

## Checks

- `vale` on the 22 pages from the repo root: 158 alerts before the pass,
10 after. The remaining alerts are intentional passives where the page
names no actor ("can't be evicted", "is lost"), `Google.OxfordComma`
false positives on "Instead, <verb> and <verb>" and "However, tasks or
actors", `Google.Spacing` on `ray.ObjectRef` in an H1, and `Vale.Terms`
on a sentence-initial "Pipelining". The second commit adds `inlining`
and `multithreading` to the `General` accept list. Across `doc/source`
that removes 4 alerts and adds none.
- `codespell` on the 22 pages: clean. Curly quotes and the one em dash
are now ASCII.
- Per-file invariant check against the pre-edit files: fenced-code
count, `(label)=` anchors, role-target multiset, and URLs unchanged. The
only line-count changes are the new two-item list in
`fork-new-processes.md` and the merged opening paragraph in
`too-fine-grained-tasks.md`.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check`: clean.
- Meaning review
([review](#66667 (review))):
of 92 changed blocks, 10 were cosmetic and 81 of the other 82 preserved
their meaning against the Ray source tree. One `tree-of-actors.md` edit
claimed Ray Tune's Tuner applies the supervisor-tree pattern on its own,
which the source doesn't support. The third commit restores the original
combined Train-and-Tune claim and also tightens two `nested-ray-get.md`
lines.
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
…es (#66672)

## Why are these changes needed?

Style and grammar pass over the 13 Ray Core pages under
`doc/source/core/fault-tolerance/` and `doc/source/core/scheduling/`,
against `doc/source/ray-contribute/writing-style.md` and its "Writing
Ray Core docs" terms. This is the fourth prose layer of the Ray Core
stack. It's stacked on #66667 (design patterns), which is stacked on
#66666 (tasks, actors, and objects), #66642 (top-level pages), #66640
(Core Vale term library), and #66605 (the `ray-core/` to `core/` move).
A later layer covers `compiled-graph/`, `direct-transport/`,
`internals/`, and the remaining pages.

The edits are voice, person, tense, word choice, and list structure.
First-person plural is now "you" or an imperative. Per the Core terms
table, "Fault Tolerance", "Placement Group", and "Object Store" are now
lowercase, prose uses of `ObjectRef` are now "object ref", and
"retriable" is now "retryable". Inline enumerations and parenthetical
asides are now lists or separate sentences, and the three bold
`**Note:**` labels on `accelerators.md` are now note admonitions. On the
fault tolerance landing page, the MyST conversion had collapsed the two
failure classes into one paragraph ("two classes: 1\. application-level
failures 2. system-level failures Bugs in..."). That's now a two-item
list.

Headings changed only in case, except two on `labels.md`: "Specify label
requirements for a local RayCluster" now says "Ray cluster", because the
section is about a local `ray.init` cluster rather than the KubeRay
custom resource, and "Using labels with autoscaler" is now "Use labels
with the autoscaler". Both keep their old URL fragments through MyST
labels named after the old slugs. No link in `doc/source` targets any
changed slug. No code block, role target, or URL changed beyond the
fixes below.

### Fixes

Each of these is checked against the source tree or the page's own
output:

- `labels.md`: the example ran `ray start --head --labels-files=...`.
The flag is `--labels-file` (`python/ray/scripts/scripts.py`), as the
prose above it already said.
- `labels.md`: the `label_selector` example used `"test-lable-key"`,
which didn't match the `test-label-key` in the sample output.
- `placement-group.md`: the inline span `{"CPU": 1, "GPU: 1"}` had a
misplaced quote. It's now `{"CPU": 1, "GPU": 1}`.
- `accelerators.md`: "never release it" in a code comment is now "never
releases it".

### Lines left for open PRs

Four open PRs edit these pages, so the lines they touch or insert next
to are unchanged here. Each PR's change still applies cleanly on top of
this branch in a 3-way merge:

- #66550 (label selector operators): the operator table in `labels.md`
and the paragraph after it. That table still has curly quotes inside its
code spans, such as `{“key”: “value”}`, which aren't valid Python, and
"Label matches anything by one value" probably means "but". Fixing
either here would conflict with #66550, so they're left for that PR or a
follow-up.
- #66449 and #66368 (Biren and Cambricon accelerators): the
supported-accelerators table rows and the tab-items they insert between.
The "Inside a task or actor" paragraph in `accelerators.md` still has an
"e.g." and a parenthetical for the same reason.
- #65974 (resource dictionary keys): the bundle paragraph and its list
in `placement-group.md`, and the "You can also explicitly specify..."
paragraph in `resources.md`, which still says "via".

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `scheduling/index.md`: the DEFAULT strategy "first favors nodes that
already have tasks or actors scheduled, for locality". The
locality-aware scheduling section describes locality as task-argument
locality that takes precedence over DEFAULT. Is "for locality" in the
DEFAULT description the same concept? The page also says "By default,
`k` is 20% of the total number of nodes", but the table above it
describes a `RAY_scheduler_top_k_absolute` floor.
- `placement-group.md`: the PACK example says "both bundles have to be
created on the same node", and the next sentences say PACK is a soft
policy that spreads bundles when they don't fit. Is "have to" right for
PACK?
- `fault-tolerance/gcs.md`: the KubeRay tab is titled "KubeRay
(officially supported)", but the note and the comparison table limit
official support to KubeRay for Ray Serve fault tolerance. Should the
title name that scope?
- `scheduling/memory-management.md`: the prose names a "Reference
Creation Site" column, but the `ray memory` sample output labels that
column "Call Site". The page also says each entry shows "the size of the
object in bytes", while the sample shows MiB.
- `scheduling/ray-oom-prevention.md`: the active-worker policy
prioritizes retryable "tasks", defined as `max_retries` or
`max_restarts` greater than 0. `max_restarts` applies to actors. Should
"tasks" be "workers"? Separately, "how to address memory issues" links
to the `addressing-memory-issues` label, which sits on a section of help
links only.
- `scheduling/resources.md`: the lead-in says Ray configures "logical
resources" with the rules that follow, but the last rule says object
store memory isn't a logical resource.
- `scheduling/labels.md`: the opening says labels control scheduling
"for KubeRay", but the page also covers `ray start` and local
`ray.init`. Are labels KubeRay-specific?

## Related issue number

None. Not a duplicate. #66550, #66449, #66368, and #65974 edit these
pages; see above.

## Checks

- `vale` on the 13 pages from the repo root: 687 alerts before the pass,
111 after. The remaining alerts are intentional passives where the page
names no actor, accelerator vendor acronyms in tab titles, "currently"
where it marks a temporary limitation or alpha feature, the "What is"
and "How do I" question headings on `ray-oom-prevention.md`, "cannot"
and "It is" inside warning admonitions, and alerts on the protected
lines above. The second commit adds `retryability` and `reconstructable`
to the `Core` accept list. Across `doc/source` that removes 3 alerts and
adds none.
- `codespell` on the 13 pages: clean. Curly quotes outside the protected
table are now ASCII.
- Per-file invariant check against the pre-edit files: fenced-code
count, role-target multiset, and URLs unchanged. The only anchor change
is the two legacy-slug labels on `labels.md`. Line-count changes come
from the new lists, the three note admonitions, and the definition-list
restructures in `memory-management.md` and `resources.md`.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check`: clean.
Two `{ref}` roles in `fault-tolerance/` were hard-wrapped and are now
joined.
- 3-way merge of each open PR's change onto this branch: clean for all
four.
- Meaning review
([review](#66672 (review))):
of 365 changed blocks, 55 were cosmetic, and 306 of the other 310
preserved their meaning against the Ray source tree. The third commit
(8b782c4) restores the four that shifted a claim.
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
## Why are these changes needed?

Style and grammar pass over the remaining Ray Core prose pages, against
`doc/source/ray-contribute/writing-style.md` and its "Writing Ray Core
docs" terms. This is the fifth and last prose layer of the Ray Core
stack: `compiled-graph/`, `direct-transport/`, `internals/`,
`accelerator-types.md`, `api/index.md`, `examples/index.md`, and
`examples/monte-carlo-pi.md`. It's stacked on #66672 (fault tolerance
and scheduling), which is stacked on #66667 (design patterns), #66666
(tasks, actors, and objects), #66642 (top-level pages), #66640 (Core
Vale term library), and #66605 (the `ray-core/` to `core/` move).

Three things are out of scope. `sandboxes.md` and `api/sandboxes.md` are
left for a follow-up, because five open PRs (#66675, #66471, #66470,
#66359, #65898) make large edits to them. The autodoc `.rst` API pages
and the example notebooks aren't prose pages.

The edits are voice, person, tense, word choice, and list structure.
First-person plural is now "you" or an imperative. Per the Core terms
table, "Raylet" mid-sentence is now "raylet", "plasma store" is now
"Plasma store", and "via" is now "through". Parenthetical asides and em
dashes are now separate sentences or lists, and ordered lists use `1.`
throughout. `internals/object-spilling.md` had 24 em dashes and now has
none. Two MyST conversion artifacts were inline pseudo-lists (`\*` and
`\-` bullets in one paragraph) in `compiled-graph/quickstart.md` and
`internals/ray-event-exporter.md`. A third was a numbered list collapsed
into one paragraph in `direct-transport/index.md`. All three are now
real lists.

Compiled Graph got a light pass, because #66464 deprecates it. The lines
where #66464 inserts its deprecation banners are byte-identical,
including each page's front matter, H1, and the paragraph after it, plus
the landing page's beta warning. #66464's doc changes still apply
cleanly on top of this branch.

Headings changed only in case, except two whose slugs changed. On
`compiled-graph/troubleshooting.md`, "Explicitly teardown before reusing
the same actors" is now "Explicitly tear down...". On
`internals/object-spilling.md`, "Primary vs. Secondary Copies" is now
"Primary versus secondary copies". Both keep their old URL fragments
through MyST labels named after the old slugs. No link in `doc/source`
targets either old slug. No code block, role target, or URL changed
beyond the fixes below.

### Fixes

Each of these is checked against the page itself:

- `compiled-graph/troubleshooting.md`: two `{ref}` links pointed at each
other's sections. The item about tearing down a Compiled Graph before
running another on the same actor linked to "Return NumPy arrays". The
item about zero-copy values blocking later executions linked to the
teardown section. Each now links to the section it describes.
- `compiled-graph/quickstart.md`: "a ActorDiedError" is now "an".
- `internals/metric-exporter.md`: the cardinality level labels were
written as `` **\`legacy\`** ``, which rendered literal backticks.
They're now bold code.
- `examples/monte-carlo-pi.md`: the `{image}` directive had no alt text.

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `compiled-graph/quickstart.md` and `troubleshooting.md`: several
roadmap sentences, such as "Ray might detect such errors in the future",
"The Ray team also plans to support custom communicators", and
"Collective communication operations are coming soon". With #66464
deprecating Compiled Graph, should these go?
- `compiled-graph/overlap.md`: "enabling `_overlap_gpu_communication`
improves latency by about 14%". Latency goes down; the sample output
shows about 13.7% less. Should this say "reduces latency"?
- `compiled-graph/profiling.md`: the heading "Nsight system profiler"
and the prose "Nsight system profiling". NVIDIA's product is Nsight
Systems.
- `direct-transport/index.md`: the NCCL section lists using
`create_collective_group` as a "main difference" from the Gloo example,
but the Gloo example also uses it.
- `direct-transport/custom-tensor-transport.md`: the "Out-of-order
actors" limitation looks like a special case of the "Actor creation and
task submission from different processes" limitation that follows it. Is
being out of order a separate trigger?
- `internals/task-lifecycle.md`: the execution steps say the executor
pulls arguments from a remote Plasma store if needed before it runs the
function. A later step says the data was already pulled during
scheduling. Which is right?
- `internals/object-spilling.md`:
- The architecture section says the raylet decides what to spill by
least recently used (LRU) order and pinning status. The batch
construction section says `TryToSpillObjects` walks `pinned_objects_` in
order. Is spill selection LRU?
- The prose says spilling starts when usage "exceeds"
`object_spilling_threshold`, but the trigger table uses `>=`.
- The configuration list calls `object_spilling_threshold` a fraction of
available object store memory, while the trigger table defines it as
primary object bytes divided by capacity.
- Is `max_io_workers` a total, or per worker type, as the worker pool
section says?
- "GCS" in the cloud storage passages means Google Cloud Storage. On a
Ray Core page, it reads as Ray's GCS. Should it be spelled out?
- `internals/ray-event-exporter.md`:
- The page says it describes Ray 2.52.1, but
`RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES` says `ALL` is
supported in Ray 2.54.0 and later.
- The Step 5 link text names `RayEventRecorder::AddEvent()`, but it
points at the line the page elsewhere calls `AddEvents()`.
  - The Step 6 aggregator link uses the same anchor as Step 4.
- `internals/metric-exporter.md`: the `DoubleGaugeCallback` link is
pinned to commit `52ed7e3`, while every other link on the page uses
`05e7efd5`. The `OpenTelemetryMetricRecorder::SetMetricValue()` link
points into `src/ray/stats/metric.cc`.
- `internals/token-authentication.md`: two notes both say that new HTTP
services must add the middleware and header injection themselves. Should
one go?
- `compiled-graph/troubleshooting.md`: the page says Compiled Graph
supports only peer-to-peer GPU transfers and that collective operations
are planned, but `ray.experimental.collective` exports `allreduce`,
`allgather`, and `reducescatter` with DAG wrappers. Is the limitation
stale?
- `internals/metric-exporter.md`: the page says C++ metrics register
lazily on first use. With OpenTelemetry enabled, registration seems to
happen when the `ray::stats` metric object is constructed
(`src/ray/stats/metric.h`), and `SetMetricValue` fails on an
unregistered name.
- `internals/object-spilling.md`: the page names `ReleaseFreedObject()`;
the function is `LocalObjectManager::ReleaseFreedLocalObject`. The two
`PopDeleteWorker` links point at different lines of `worker_pool.cc`.
- `internals/ray-event-exporter.md`: `_can_expose_event` and the event
filtering now live in `publisher/async_publisher_client.py`, not
`aggregator_agent.py`, and `ALL` bypasses the exposable-types list.
- `internals/port-service-discovery.md`: the page calls core workers C++
processes. The core worker is a C++ library inside Python, Java, or C++
worker processes.
- `examples/monte-carlo-pi.md`: the sampling task is described as
sampling "up to" `num_samples`, but the code samples exactly
`num_samples`.
- `examples/index.md`: several list-table link texts don't match the
titles of the notebooks they link to, such as "Build Batch Prediction
Using Ray" for "Batch Prediction with Ray Core".

## Related issue number

None. Not a duplicate. #66464 edits the Compiled Graph pages; see above.

## Checks

- `vale` on the 21 pages from the repo root: 1,228 alerts before the
pass, 372 after all three commits. The remaining alerts are intentional
passives where the page names no actor, "currently" and "for now" where
they mark an alpha feature or a temporary limitation, acronym alerts
that fire after the acronym is spelled out, code identifiers used as
link text, alerts on the lines protected for #66464, and Mermaid diagram
source in `object-spilling.md`.
- The third commit adds Perfetto, GDRCopy, `inlines` and `inlined`,
`unlink`, `temporality`, `misconfiguration`, and `microbenchmark` to the
`General` accept list, and `evictable` and `exposable` to the `Core`
accept list. Across `doc/source` that removes 16 alerts and adds none.
- `codespell` on the 21 pages: clean apart from `asend`, the Python
async generator method.
- Per-file invariant check against the pre-edit files: fenced-code
count, role-target multiset, and URLs unchanged. The only anchor changes
are the two legacy-slug labels. Line-count changes come from the new
lists, the repaired pseudo-lists, and blank-line cleanup.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check`: clean.
- `git apply --check` of #66464's doc hunks onto this branch, with paths
remapped to `doc/source/core/`: clean.
- Meaning review of the first commit: of 691 changed blocks, 140 were
cosmetic. The other 551 were checked against source, and 545 preserved
their meaning. The second commit restores the six that didn't: three
`request_resources` mentions on `autoscaler-v2.md` that had made the
caller "you" (Ray Data also calls it), the users-set-it framing of an
environment variable on `ray-event-exporter.md`, "currently spillable"
on `object-spilling.md`, and the attribution of a NIXL limitation on
`direct-transport/index.md`. It also restores a few smaller shifts that
the review noted.
- A later commit restores one more shift, on
`internals/port-service-discovery.md`. The pass had turned "Raylet (C++)
spawns Core Workers (C++)" into "both are C++ processes", which is wrong
for Python and Java worker processes. The restored sentence says both
are written in C++.
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 7, 2026
## Why are these changes needed?

Fourteen guide pages and notebooks run Sphinx autodoc directly. Some of
them repeat an API reference entry, and others are the only place an API
is documented at all. This PR moves every one of those APIs into an API
reference page under `API_PATH_PREFIXES` and replaces the guide-page
directives with cross-references. After it merges, autodoc runs only on
API reference pages, which is what a future move of the API reference
off Sphinx autodoc needs.

**New API reference entries**

- **Ray integrations API** (`ray-more-libs/api/`, new): Ray on Spark
(`setup_ray_cluster`, `shutdown_ray_cluster`,
`setup_global_ray_cluster`), Ray Collective, and Dask on Ray
(`RayDaskCallback` and its `_ray_*` hook methods). The section is
registered in `API_PATH_PREFIXES`, the `doc_api` rule, the APIs landing
toctree, and the `llms_txt_exclude` and `remove_from_toctrees` stub
patterns.
- Ray Collective lists everything the old `automodule ... :members:`
rendered (26 documented functions in `ray.util.collective.collective`,
plus `register_collective_backend`), grouped by purpose. Only
`register_collective_backend` carries an annotation
(`PublicAPI(stability="alpha")`), so Ray Core reviewers might want to
trim internals such as `GroupManager` and `get_group_handle`.
- **RLlib:** the nine algorithm-specific config classes (`PPOConfig`
through `MARWILConfig`) go into `algorithm-config.rst`. They use the
existing `class_without_autosummary.rst` template, so each class gets
one page and no per-member stubs. `MemoryTrackingCallbacks` goes into
`callback.rst`, also with the one-page template, and `OldAPIStack` into
`utils.rst`.
- **Ray Core:** `PublicAPI`, `DeveloperAPI`, and `Deprecated` go into a
new "API stability annotations" section, and `AutoscalingCluster` into a
new "Testing utilities" section, both in `core/api/utility.rst`.
`ray.autoscaler.sdk.request_resources` loses its `:noindex:`, because it
had no indexed entry anywhere.

**Guide pages now cross-reference instead of rendering**

`rllib/algorithms.md`, `rllib/callback.md`, `rllib/dev.md`,
`ray-contribute/stability.md` (its `public-api-def` labels are kept),
`ray-contribute/fake-autoscaler.md`, `core/miscellaneous.md`,
`serve/advanced-guides/gang-scheduling.md`,
`cluster/vms/user-guides/community/spark.md`,
`ray-more-libs/ray-collective.md`, `ray-more-libs/dask-on-ray.md`, and
the Aim, Comet, MLflow, and Wandb Tune notebooks.

`DockerCluster` lives in `ray.autoscaler._private`, so instead of an API
entry, `fake-autoscaler.md` now links to its source.

**Redirects:** `/ray-more-libs/doc/*` → `/ray-more-libs/api/doc/:splat`
covers the Dask stubs that moved. The other APIs were rendered inline on
guide pages, so they had no standalone URL to redirect.

**Base:** #66605 and #66751 have merged, so this PR is rebased onto
master as a single commit. The content is unchanged from the version
reviewed against #66751.

## Related issue number

None. This follows up #66751.

## Checks

- [x] I've signed off every commit (DCO).
- [x] Duplicate-work check: `gh pr list --repo ray-project/ray --state
open --search "<area keywords>"` found no open PR covering these moves.
- [x] Autodoc census of `doc/source/` on this branch: no autodoc
directive outside `API_PATH_PREFIXES` except a syntax example inside a
code fence in `ray-contribute/docs.md`, which Sphinx never runs.
- [x] I ran `ci/ray_ci/doc/autodoc.py`, the API consistency check's own
doc parser, over the Core and RLlib walks. Every new entry parses to a
resolvable dotted name. An early draft listed fully qualified names
under an unrelated `currentmodule`, which the parser reads as
unresolvable; each new block now sets its own `currentmodule`. The only
duplicate names are ones already documented twice on master. I couldn't
run the code-side half of the check locally, so premerge is the gate for
that half.
- [x] `bazel test //ci/pipeline:test_doc_api_rules_sync`: PASSED with
the new `ray-more-libs/api/` prefix.
- [x] Tag dry run: `ray-more-libs/api/*` emits `doc_api`, and the edited
guide pages hit the prose skip rule.
- [x] `rtd-redirects validate`: 0 errors.
- [x] `make -C doc rtd-build` (RtD-faithful, `-W`), with the base
branch's orphaned `_includes/_help.rst` set aside (#66750 already
deleted it on master). The full build flagged one warning: `BCConfig`
inherits `training()` from `MARWILConfig` rather than overriding it, so
the BC line now links to the class and to `MARWILConfig.training()`.
After that fix, an incremental `-W` rebuild reports `build succeeded.` I
confirmed in the HTML that every new cross-reference resolves to its API
page or stub.
- [x] `MemoryTrackingCallbacks` uses the one-page template. The default
template generated 20 stubs, almost all for members inherited from
`RLlibCallback`, which would have shadowed the `RLlibCallback` entries.
- [x] `rtd-redirects simulate` for the Dask stub rule on master, latest,
and `releases-2.40.0`: no regressions, wrong landings, or new loops. Old
stub URLs reach the new stubs in one hop.

AI assistance (Claude Code) was used to prepare this change. I reviewed
every changed line.

Signed-off-by: Douglas Strodtman <[email protected]>
gaurav0107 added a commit to gaurav0107/ray that referenced this pull request Nov 25, 2026
Master converted the Ray Core user guide to MyST Markdown (ray-project#66430) and
moved it from doc/source/ray-core to doc/source/core (ray-project#66605), so the
.rst edits from this PR no longer apply. Re-apply them to the .md pages:

- core/patterns/out-of-band-object-ref-serialization.md: add the intro
  paragraph naming both out-of-band channels, retitle the existing
  example as "pickle and cloudpickle", and add the "hex string
  round-trip" section that includes the doc_code example.
- core/objects/serialization.md: the "Serializing ObjectRefs" section
  that held the seealso was removed in ray-project#64037, so add the cross-link as
  a bullet under "Serialization notes" instead.

The doc_code example moved with the directory rename and is unchanged.

Signed-off-by: Gaurav Dubey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation 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