Repository navigation
[ci] Remove the banned-words lint check in favor of Vale - #65368
Merged
dstrodtman merged 1 commit intoAug 14, 2026
Merged
Conversation
Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the banned words lint check (check-banned-words.sh) from the CI pipeline, including its references in the Buildkite configuration, the main lint script, and the contributor documentation. I have no feedback to provide.
dstrodtman
enabled auto-merge (squash)
August 12, 2026 16:33
dstrodtman
added a commit
that referenced
this pull request
Aug 14, 2026
…65375) ## Description Two related fixes to the Vale setup. ### 1. The `vale` pre-commit hook has never run The top-level `exclude` in `.pre-commit-config.yaml` lists `doc/source/`, and pre-commit ANDs that global `exclude` with each hook's own `files` pattern. The Vale hook's pattern, `^doc/source/data/.*\.(md|rst)$`, lives entirely inside `doc/source/`, so the two can never both be satisfied and the hook matches zero files: ``` $ pre-commit run vale --all-files vale.................................................(no files to check)Skipped ``` Committing a change under `doc/source/data` skips it silently too. Vale still ran in CI through `ci/lint/check-documentation-style.sh`, so the gate existed, but contributors got no local signal, and a green pre-commit run said nothing at all about Vale. This narrows the `doc/source/` entry to `doc/source/(?!data/.*[.](md|rst)$)`, so it keeps excluding the tree except the prose the hook targets. Narrowing it also exposes those 48 files to hooks that had never seen them. Three needed exemptions, all recorded in the config with comments: * `trailing-whitespace` and `end-of-file-fixer` would rewrite 17 unrelated files. I've exempted those two hooks from `doc/source/data` so that enabling Vale stays a config-only change. **The whitespace cleanup is worth doing, and I'm happy to send it as its own PR** rather than bury it here, partly because three of those 17 files are also touched by the open #65372. * `semgrep` would fail. Caught by Cursor Bugbot, and it was right. `semgrep.yml`'s `code-block-python` rule lists `doc/source/data/**/*.rst` in its `paths.include` at `severity: ERROR`, there are 8 pre-existing violations across 5 files, and `ci/lint/lint.sh` runs `pre-commit run semgrep --all-files` as the `semgrep_lint` step. Converting those code blocks to `testcode` is real work that belongs in its own PR, not in a Vale change. The two rST hooks that also become eligible pass as-is. If you'd rather just take the whitespace churn here, say so and I'll fold it in. **A bigger finding, which I'm raising rather than fixing here.** That `semgrep` exemption is a second instance of the same bug, not a new one. Because the top-level `exclude` has covered `doc/source/`, the `code-block-python` rule has never run on **any** of the five doc paths it targets: 31 occurrences across 16 files in `doc/source/data`, `ray-core`, `ray-observability`, and `train`. Every one is an untested documentation snippet the rule was written to catch. Happy to take that on as a follow-up, but converting snippets means they start executing in CI, so it wants a maintainer opinion on scope and on whether the rule is still wanted for docs at all. ### 2. Vale was pinned to 3.4.1, from June 2024 This upgrades both the hook `rev` and the CI script to 3.17.1. The bump isn't inert, so three supporting changes come with it. `Vale.Spelling` produces **no alerts at all** under 3.4.1, but 11 error-severity alerts under 3.17.1, because the newer engine word-boundary-anchors vocabulary patterns. Existing entries such as `[Bb]ackpressure`, `dtype`, and `namespace` therefore stopped covering `backpressured`, `dtypes`, and `namespaces`. This widens those three and adds terms that were never listed at all: `Databricks`, `Datasink`, `Multimodality`, `preprocess`, `resample`, `vCPU`, `Vectorizer`. Two Google rules also became error-severity on content where they're wrong, so they're set to `warning` rather than editing correct prose: * `Google.HeadingPunctuation` reads the period in a numbered heading such as `### 1. Label your worker nodes` as a heading-ending period. The match it reports is literally `1.`. * `Google.OxfordComma` fires on "X, A and B" where A and B modify X rather than continuing a list, as in "resources used by all operators, active and requested". Both follow the existing precedent of tuning Google rules in `.vale.ini` alongside `Google.Colons` and `Google.Headings`, and both preserve 3.4.1's effective behavior, where neither rule blocked. ## Related issues None. Cross-referencing two of my own open PRs that touch adjacent surfaces, neither of which shares a file with this one: * #65368 removes the banned-words lint in favor of Vale. That increases how much Ray leans on Vale, which makes a dead local hook and a two-year-old pin more worth fixing. Touches `ci/lint/check-banned-words.sh`, `ci/lint/lint.sh`, and `.buildkite/lint.rayci.yml`. * #65342 makes the docs-go scope guard count Vale configuration as documentation content. Worth noting that after it merges, a Vale-config-only PR like this one would classify as documentation. Touches `ci/lint/validate_docs_go_scope.sh`. ## Additional information **AI assistance was used.** I used Claude Code to investigate and draft this. I reviewed every changed line, ran the measurements below myself, and can defend the change end to end. **Not a duplicate.** `gh pr list --repo ray-project/ray --state open --search "vale in:title"` and the same for `pre-commit` return only #65368 and #65342 above, which change different files and have different goals. **Measurements**, on the exact set `ci/lint/check-documentation-style.sh` lints (`doc/source/data` and `doc/source/ray-overview/examples`): | Vale | Total alerts | Error-severity | Exit code | Lint step | |---|---|---|---|---| | 3.4.1 (current pin) | 162 | 0 | 0 | green | | 3.17.1, bump alone | 208 | 14 | 1 | **red** | | 3.17.1, with this PR | 196 | 0 | 0 | green | That middle row is the reason the vocabulary and `.vale.ini` changes are in the same PR as the version bump: without them the bump turns `lint: documentation_style` red. **Checks run locally:** ``` # the CI script's exact target set, both versions vale doc/source/data doc/source/ray-overview/examples # 3.4.1 -> exit 0; 3.17.1 pre-fix -> exit 1; post-fix -> exit 0 # the hook now actually matches files and passes pre-commit run vale --files doc/source/data/data-internals.rst # vale.....................................................................Passed # and genuinely fails, rather than passing vacuously: appended a line # containing "This sentance has a deliberate spelling mistake." pre-commit run vale --files doc/source/data/data-internals.rst # 349:6 error Did you really mean 'sentance'? Vale.Spelling # 1 error, 0 warnings and 17 suggestions in 1 file. # the two hooks I exempted stay exempt, so no file churn pre-commit run trailing-whitespace --files $(git ls-files 'doc/source/data' | grep -E '\.(md|rst)$') pre-commit run end-of-file-fixer --files $(git ls-files 'doc/source/data' | grep -E '\.(md|rst)$') # both: (no files to check)Skipped # the two rST hooks that newly become eligible pre-commit run rst-directive-colons --files ... # Passed pre-commit run rst-inline-touching-normal --files ... # Passed ``` I also confirmed the 3.17.1 release publishes the two asset filenames the CI script downloads, `vale_3.17.1_Linux_64-bit.tar.gz` and `vale_3.17.1_macOS_arm64.tar.gz`. **Net effect:** contributors get Vale locally, CI runs a Vale two years newer, and `Vale.Spelling` becomes an enforced check instead of a silent one. --------- Signed-off-by: Douglas Strodtman <[email protected]>
elliot-barn
approved these changes
Aug 14, 2026
dstrodtman
added a commit
that referenced
this pull request
Aug 14, 2026
…65431) ## Why this change is needed `lint: doc_readme` carries the `always` tag, so it runs on every pull request, including documentation-prose-only ones. Its inputs are the repo-root `README.rst` and `python/setup.py`. Nothing under `doc/` feeds it, so a prose change cannot change its result. What it actually checks, from `ci/lint/lint.sh`: ```bash doc_readme() { /usr/bin/python -m pip install -c python/requirements_compiled.txt docutils cd python && /usr/bin/python setup.py check --restructuredtext --strict --metadata } ``` `--restructuredtext` validates `long_description`, which `python/setup.py` reads from the repo-root `README.rst`. `--metadata` validates `setup.py`'s own metadata fields. So the check guards how Ray's PyPI long description renders. It's a useful gate and this PR doesn't touch what it does; it's pointed at the wrong trigger. It ended up in the `lint-small-prose` matrix, which exists for the opposite reason: that matrix holds the checks a Markdown or reStructuredText change *can* fail, so they survive the prose filter that strips the code-oriented `lint-small` matrix. The name `doc_readme` reads like documentation. The other three steps in that matrix belong there; this one is packaging. ## What this PR does 1. Moves `doc_readme` into its own step tagged `pypi_readme` alone, with no `lint` and no `always`. 2. Adds a rule in `.buildkite/always.rules.txt` emitting `pypi_readme` for `README.rst` and `python/setup.py`. Both files keep `always lint`, which the catch-all would otherwise have given them, so no other step's trigger narrows. 3. Adds test cases to `.buildkite/always.rules.test.txt` for both inputs and for neighbors that must not emit the tag. 4. Rewrites the matrix comment to state the rule rather than imply it: adding a step to the prose matrix asserts a prose-only diff can fail it. Prose pull requests and code pull requests that leave both files alone both stop selecting the step. The second half of that is broader than strictly necessary to fix the prose case, and it's the point: a check that cannot fail from your change shouldn't be in your PR's status list. ## Two consequences worth flagging **Microcheck eligibility.** Dropping `lint` from the step means the microcheck pipeline's hardcoded `tag:lint` selector no longer makes it eligible there, so it runs on premerge only. Selects and rule-emitted tags are ANDed in rayci's step filter, so this is the expected outcome rather than a surprise. Microcheck is non-blocking; premerge is the gate this check has to hold. Noted in the step comment. **Step IDs shift within the lint group.** Step IDs are positional (`fmt.Sprintf("g%d_s%d", i, j)`), so inserting a step moves `api-param-coverage` from `g11_s3` to `g11_s4` and `docs-go-scope` from `g11_s4` to `g11_s5`. `Test.gen_microcheck_step_ids` derives step IDs from recent Bazel test results, and group `g11` contains no Bazel test steps, so nothing keyed on step ID is affected. ## Not a duplicate No open PR touches `doc_readme` (`gh pr list --repo ray-project/ray --state open --search doc_readme` returns nothing). #65368 edits the same matrix to remove `banned_words`, so these two will conflict textually. They're independent changes and either merge order works; whichever lands second needs a trivial rebase. ## Testing Rules layer, from the branch: ``` $ rayci test-rules $ echo $? 0 ``` 125 cases pass. Negative control: reverting the `README.rst` expectation to `always lint` fails with `+pypi_readme (unexpected)`, confirming the test is reading the new rule rather than passing vacuously. Step selection, generating the pipeline that the pinned rayci binary (v0.46.0, from `.rayciversion`) actually emits for a probe diff, rather than reasoning about tags: | Probe diff | Selected tags | `lint: doc_readme` | | --- | --- | --- | | `doc/source/index.rst`, at `master` | `always` | runs, inside the `g11_s0` matrix | | `doc/source/index.rst`, on this branch | `always` | not emitted | | `python/ray/actor.py`, on this branch | `always lint …` | not emitted | | `README.rst`, on this branch | `always lint pypi_readme` | emitted, `g11_s1` | | `python/setup.py`, on this branch | `… pypi_readme …` | emitted, `g11_s1` | The `master` row is the before state: on a prose-only diff the emitted prose matrix contains `banned_words`, `doc_readme`, `documentation_style`, `doc_no_new_rst`. On this branch that matrix has three entries and no separate `doc_readme` step appears. Not verifiable outside Buildkite: `if:` expression evaluation, which this PR doesn't touch. ## AI assistance AI assistance was used for this change. Every changed line was reviewed by a human before this PR was opened, and the commands above were run locally. Signed-off-by: Douglas Strodtman <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…ay-project#65375) ## Description Two related fixes to the Vale setup. ### 1. The `vale` pre-commit hook has never run The top-level `exclude` in `.pre-commit-config.yaml` lists `doc/source/`, and pre-commit ANDs that global `exclude` with each hook's own `files` pattern. The Vale hook's pattern, `^doc/source/data/.*\.(md|rst)$`, lives entirely inside `doc/source/`, so the two can never both be satisfied and the hook matches zero files: ``` $ pre-commit run vale --all-files vale.................................................(no files to check)Skipped ``` Committing a change under `doc/source/data` skips it silently too. Vale still ran in CI through `ci/lint/check-documentation-style.sh`, so the gate existed, but contributors got no local signal, and a green pre-commit run said nothing at all about Vale. This narrows the `doc/source/` entry to `doc/source/(?!data/.*[.](md|rst)$)`, so it keeps excluding the tree except the prose the hook targets. Narrowing it also exposes those 48 files to hooks that had never seen them. Three needed exemptions, all recorded in the config with comments: * `trailing-whitespace` and `end-of-file-fixer` would rewrite 17 unrelated files. I've exempted those two hooks from `doc/source/data` so that enabling Vale stays a config-only change. **The whitespace cleanup is worth doing, and I'm happy to send it as its own PR** rather than bury it here, partly because three of those 17 files are also touched by the open ray-project#65372. * `semgrep` would fail. Caught by Cursor Bugbot, and it was right. `semgrep.yml`'s `code-block-python` rule lists `doc/source/data/**/*.rst` in its `paths.include` at `severity: ERROR`, there are 8 pre-existing violations across 5 files, and `ci/lint/lint.sh` runs `pre-commit run semgrep --all-files` as the `semgrep_lint` step. Converting those code blocks to `testcode` is real work that belongs in its own PR, not in a Vale change. The two rST hooks that also become eligible pass as-is. If you'd rather just take the whitespace churn here, say so and I'll fold it in. **A bigger finding, which I'm raising rather than fixing here.** That `semgrep` exemption is a second instance of the same bug, not a new one. Because the top-level `exclude` has covered `doc/source/`, the `code-block-python` rule has never run on **any** of the five doc paths it targets: 31 occurrences across 16 files in `doc/source/data`, `ray-core`, `ray-observability`, and `train`. Every one is an untested documentation snippet the rule was written to catch. Happy to take that on as a follow-up, but converting snippets means they start executing in CI, so it wants a maintainer opinion on scope and on whether the rule is still wanted for docs at all. ### 2. Vale was pinned to 3.4.1, from June 2024 This upgrades both the hook `rev` and the CI script to 3.17.1. The bump isn't inert, so three supporting changes come with it. `Vale.Spelling` produces **no alerts at all** under 3.4.1, but 11 error-severity alerts under 3.17.1, because the newer engine word-boundary-anchors vocabulary patterns. Existing entries such as `[Bb]ackpressure`, `dtype`, and `namespace` therefore stopped covering `backpressured`, `dtypes`, and `namespaces`. This widens those three and adds terms that were never listed at all: `Databricks`, `Datasink`, `Multimodality`, `preprocess`, `resample`, `vCPU`, `Vectorizer`. Two Google rules also became error-severity on content where they're wrong, so they're set to `warning` rather than editing correct prose: * `Google.HeadingPunctuation` reads the period in a numbered heading such as `### 1. Label your worker nodes` as a heading-ending period. The match it reports is literally `1.`. * `Google.OxfordComma` fires on "X, A and B" where A and B modify X rather than continuing a list, as in "resources used by all operators, active and requested". Both follow the existing precedent of tuning Google rules in `.vale.ini` alongside `Google.Colons` and `Google.Headings`, and both preserve 3.4.1's effective behavior, where neither rule blocked. ## Related issues None. Cross-referencing two of my own open PRs that touch adjacent surfaces, neither of which shares a file with this one: * ray-project#65368 removes the banned-words lint in favor of Vale. That increases how much Ray leans on Vale, which makes a dead local hook and a two-year-old pin more worth fixing. Touches `ci/lint/check-banned-words.sh`, `ci/lint/lint.sh`, and `.buildkite/lint.rayci.yml`. * ray-project#65342 makes the docs-go scope guard count Vale configuration as documentation content. Worth noting that after it merges, a Vale-config-only PR like this one would classify as documentation. Touches `ci/lint/validate_docs_go_scope.sh`. ## Additional information **AI assistance was used.** I used Claude Code to investigate and draft this. I reviewed every changed line, ran the measurements below myself, and can defend the change end to end. **Not a duplicate.** `gh pr list --repo ray-project/ray --state open --search "vale in:title"` and the same for `pre-commit` return only ray-project#65368 and ray-project#65342 above, which change different files and have different goals. **Measurements**, on the exact set `ci/lint/check-documentation-style.sh` lints (`doc/source/data` and `doc/source/ray-overview/examples`): | Vale | Total alerts | Error-severity | Exit code | Lint step | |---|---|---|---|---| | 3.4.1 (current pin) | 162 | 0 | 0 | green | | 3.17.1, bump alone | 208 | 14 | 1 | **red** | | 3.17.1, with this PR | 196 | 0 | 0 | green | That middle row is the reason the vocabulary and `.vale.ini` changes are in the same PR as the version bump: without them the bump turns `lint: documentation_style` red. **Checks run locally:** ``` # the CI script's exact target set, both versions vale doc/source/data doc/source/ray-overview/examples # 3.4.1 -> exit 0; 3.17.1 pre-fix -> exit 1; post-fix -> exit 0 # the hook now actually matches files and passes pre-commit run vale --files doc/source/data/data-internals.rst # vale.....................................................................Passed # and genuinely fails, rather than passing vacuously: appended a line # containing "This sentance has a deliberate spelling mistake." pre-commit run vale --files doc/source/data/data-internals.rst # 349:6 error Did you really mean 'sentance'? Vale.Spelling # 1 error, 0 warnings and 17 suggestions in 1 file. # the two hooks I exempted stay exempt, so no file churn pre-commit run trailing-whitespace --files $(git ls-files 'doc/source/data' | grep -E '\.(md|rst)$') pre-commit run end-of-file-fixer --files $(git ls-files 'doc/source/data' | grep -E '\.(md|rst)$') # both: (no files to check)Skipped # the two rST hooks that newly become eligible pre-commit run rst-directive-colons --files ... # Passed pre-commit run rst-inline-touching-normal --files ... # Passed ``` I also confirmed the 3.17.1 release publishes the two asset filenames the CI script downloads, `vale_3.17.1_Linux_64-bit.tar.gz` and `vale_3.17.1_macOS_arm64.tar.gz`. **Net effect:** contributors get Vale locally, CI runs a Vale two years newer, and `Vale.Spelling` becomes an enforced check instead of a silent one. --------- Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: 400Ping <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…#65368) ## Summary Removes the `banned_words` lint check and its Buildkite matrix entry. `ci/lint/check-banned-words.sh` is a `git grep` for three fixed strings across `*.py`, `*.rst`, `*.md`, and `*.ipynb`. Vale already flags all three, at `error` severity, with better messages. This PR deletes the redundant check. ## The three terms, and what catches them today The check enforces exactly three case-sensitive strings. Every one is already covered by a Vale rule in this repository, with no configuration change required by this PR: | Term removed from the grep | Correct form | Vale rule that catches it | Source | | --- | --- | --- | --- | | `Kuberay` | `KubeRay` | `Google.WordList` (error) | `"[Kk]ube[Rr]ay": KubeRay` in `.vale/styles/Google/WordList.yml` | | `RLLib` | `RLlib` | `Vale.Terms` (error) | `(RL\|rl)lib` in `.vale/styles/config/vocabularies/RLlib/accept.txt` | | `Rllib` | `RLlib` | `Vale.Terms` (error) | same entry | Verified against a fixture page containing both the correct and incorrect forms: ``` t.md:5:18:Google.WordList:Use 'KubeRay' instead of 'Kuberay'. t.md:5:27:Vale.Terms:Use 'RLlib' instead of 'RLLib'. t.md:5:38:Vale.Terms:Use 'RLlib' instead of 'Rllib'. ``` The correct spellings `KubeRay` and `RLlib` produce no alerts, so the rules discriminate on capitalization the same way the case-sensitive grep did. Vale's messages name the correct form; the grep only says a misspelled word was found and asks the author to go fix it. The `Vale.Terms` message improves further on Vale 3.17.1 (ray-project#65375), which renders the vocabulary entry as `RLlib` rather than echoing the raw `(RL|rl)lib` pattern. Because coverage already exists, this PR deliberately adds nothing to the `reject.txt` vocabulary. A reject entry would fire `Vale.Avoid` *in addition to* the rule above, double-reporting the same token with a strictly less useful message ("Avoid using 'Kuberay'" versus "Use 'KubeRay' instead of 'Kuberay'"). ## What the check costs The step carries the `always` tag in `.buildkite/lint.rayci.yml`, so it runs on every pull request, including documentation-only ones. Measured across 89 `lint: banned_words` jobs from recent passing `premerge` builds: | Measure | p50 | p90 | Range | | --- | --- | --- | --- | | Job run time | 111s | 116s | 108s – 642s | | Queue wait before start | 42s | 51s | 8s – 146s | | Wall clock, queue plus run | 153s | — | — | Nearly all of that is fixed overhead rather than work. Taking build 71819 as a representative sample, the job started at 10:59:01.6 and finished at 11:00:52.8, and `Checking for common mis-spellings...` printed at 11:00:52. So roughly 110 seconds went to the repository clone and the forge image pull, and the `git grep` itself accounted for under a second of it. At 391 `premerge` builds over the last seven days, the step consumes on the order of 12 agent-hours per week to run three sub-second greps. ## Why not keep it anyway Beyond the cost, the grep can't express the rule properly: - **No scoping.** Vale rules apply per path glob. The grep is repo-wide, with no way to hold a stricter bar in one tree than another. - **No exceptions.** Vale has `TokenIgnores`, `BlockIgnores`, and vocabularies. The grep has none, so a page that needs to *name* an incorrect spelling can't. That's not hypothetical: ray-project#65239 adds a Kubernetes and KubeRay terminology table to the style guide, and the row telling contributors to write `KubeRay` rather than `Kuberay` fails the check. There is no way to satisfy both. - **No severity.** Vale has `suggestion`, `warning`, and `error`. The grep is a hard CI failure or nothing. - **No extensibility.** Adding a term means editing a shell string that ships its own bespoke failure output. Adding a term to Vale means one line in a vocabulary or `swap` map, and it inherits the shared message, link, and reporting. ## The remaining gap, stated plainly The gap this PR opens is **scope, not rule coverage**. Vale runs today only against `doc/source/data/` and `doc/source/ray-overview/examples`, both in CI and in the pre-commit hook. Within those trees the three spellings are enforced today and stay enforced after this PR. Outside them, the repo-wide grep was the only thing checking, and nothing replaces it until Vale's scope widens. Adding the terms to a Vale vocabulary would not close that gap, because the limit is which paths Vale is pointed at, not which rules it has. The docs team is widening that scope over the coming weeks. ## Related changes - Drops the `banned_words` entry from the always-on lint matrix in `.buildkite/lint.rayci.yml`. - Removes the local-run instructions from `doc/source/ray-contribute/getting-involved.md`. - Updates the prose-only lint step count in `doc/source/ray-contribute/ci.md` from four to three. ## Checks - [x] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. - [x] Release tests and any other tests I've added and changed pass. - [x] This PR is not tested :( Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: 400Ping <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…ay-project#65431) ## Why this change is needed `lint: doc_readme` carries the `always` tag, so it runs on every pull request, including documentation-prose-only ones. Its inputs are the repo-root `README.rst` and `python/setup.py`. Nothing under `doc/` feeds it, so a prose change cannot change its result. What it actually checks, from `ci/lint/lint.sh`: ```bash doc_readme() { /usr/bin/python -m pip install -c python/requirements_compiled.txt docutils cd python && /usr/bin/python setup.py check --restructuredtext --strict --metadata } ``` `--restructuredtext` validates `long_description`, which `python/setup.py` reads from the repo-root `README.rst`. `--metadata` validates `setup.py`'s own metadata fields. So the check guards how Ray's PyPI long description renders. It's a useful gate and this PR doesn't touch what it does; it's pointed at the wrong trigger. It ended up in the `lint-small-prose` matrix, which exists for the opposite reason: that matrix holds the checks a Markdown or reStructuredText change *can* fail, so they survive the prose filter that strips the code-oriented `lint-small` matrix. The name `doc_readme` reads like documentation. The other three steps in that matrix belong there; this one is packaging. ## What this PR does 1. Moves `doc_readme` into its own step tagged `pypi_readme` alone, with no `lint` and no `always`. 2. Adds a rule in `.buildkite/always.rules.txt` emitting `pypi_readme` for `README.rst` and `python/setup.py`. Both files keep `always lint`, which the catch-all would otherwise have given them, so no other step's trigger narrows. 3. Adds test cases to `.buildkite/always.rules.test.txt` for both inputs and for neighbors that must not emit the tag. 4. Rewrites the matrix comment to state the rule rather than imply it: adding a step to the prose matrix asserts a prose-only diff can fail it. Prose pull requests and code pull requests that leave both files alone both stop selecting the step. The second half of that is broader than strictly necessary to fix the prose case, and it's the point: a check that cannot fail from your change shouldn't be in your PR's status list. ## Two consequences worth flagging **Microcheck eligibility.** Dropping `lint` from the step means the microcheck pipeline's hardcoded `tag:lint` selector no longer makes it eligible there, so it runs on premerge only. Selects and rule-emitted tags are ANDed in rayci's step filter, so this is the expected outcome rather than a surprise. Microcheck is non-blocking; premerge is the gate this check has to hold. Noted in the step comment. **Step IDs shift within the lint group.** Step IDs are positional (`fmt.Sprintf("g%d_s%d", i, j)`), so inserting a step moves `api-param-coverage` from `g11_s3` to `g11_s4` and `docs-go-scope` from `g11_s4` to `g11_s5`. `Test.gen_microcheck_step_ids` derives step IDs from recent Bazel test results, and group `g11` contains no Bazel test steps, so nothing keyed on step ID is affected. ## Not a duplicate No open PR touches `doc_readme` (`gh pr list --repo ray-project/ray --state open --search doc_readme` returns nothing). ray-project#65368 edits the same matrix to remove `banned_words`, so these two will conflict textually. They're independent changes and either merge order works; whichever lands second needs a trivial rebase. ## Testing Rules layer, from the branch: ``` $ rayci test-rules $ echo $? 0 ``` 125 cases pass. Negative control: reverting the `README.rst` expectation to `always lint` fails with `+pypi_readme (unexpected)`, confirming the test is reading the new rule rather than passing vacuously. Step selection, generating the pipeline that the pinned rayci binary (v0.46.0, from `.rayciversion`) actually emits for a probe diff, rather than reasoning about tags: | Probe diff | Selected tags | `lint: doc_readme` | | --- | --- | --- | | `doc/source/index.rst`, at `master` | `always` | runs, inside the `g11_s0` matrix | | `doc/source/index.rst`, on this branch | `always` | not emitted | | `python/ray/actor.py`, on this branch | `always lint …` | not emitted | | `README.rst`, on this branch | `always lint pypi_readme` | emitted, `g11_s1` | | `python/setup.py`, on this branch | `… pypi_readme …` | emitted, `g11_s1` | The `master` row is the before state: on a prose-only diff the emitted prose matrix contains `banned_words`, `doc_readme`, `documentation_style`, `doc_no_new_rst`. On this branch that matrix has three entries and no separate `doc_readme` step appears. Not verifiable outside Buildkite: `if:` expression evaluation, which this PR doesn't touch. ## AI assistance AI assistance was used for this change. Every changed line was reviewed by a human before this PR was opened, and the commands above were run locally. Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: 400Ping <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ay-project#65375) ## Description Two related fixes to the Vale setup. ### 1. The `vale` pre-commit hook has never run The top-level `exclude` in `.pre-commit-config.yaml` lists `doc/source/`, and pre-commit ANDs that global `exclude` with each hook's own `files` pattern. The Vale hook's pattern, `^doc/source/data/.*\.(md|rst)$`, lives entirely inside `doc/source/`, so the two can never both be satisfied and the hook matches zero files: ``` $ pre-commit run vale --all-files vale.................................................(no files to check)Skipped ``` Committing a change under `doc/source/data` skips it silently too. Vale still ran in CI through `ci/lint/check-documentation-style.sh`, so the gate existed, but contributors got no local signal, and a green pre-commit run said nothing at all about Vale. This narrows the `doc/source/` entry to `doc/source/(?!data/.*[.](md|rst)$)`, so it keeps excluding the tree except the prose the hook targets. Narrowing it also exposes those 48 files to hooks that had never seen them. Three needed exemptions, all recorded in the config with comments: * `trailing-whitespace` and `end-of-file-fixer` would rewrite 17 unrelated files. I've exempted those two hooks from `doc/source/data` so that enabling Vale stays a config-only change. **The whitespace cleanup is worth doing, and I'm happy to send it as its own PR** rather than bury it here, partly because three of those 17 files are also touched by the open ray-project#65372. * `semgrep` would fail. Caught by Cursor Bugbot, and it was right. `semgrep.yml`'s `code-block-python` rule lists `doc/source/data/**/*.rst` in its `paths.include` at `severity: ERROR`, there are 8 pre-existing violations across 5 files, and `ci/lint/lint.sh` runs `pre-commit run semgrep --all-files` as the `semgrep_lint` step. Converting those code blocks to `testcode` is real work that belongs in its own PR, not in a Vale change. The two rST hooks that also become eligible pass as-is. If you'd rather just take the whitespace churn here, say so and I'll fold it in. **A bigger finding, which I'm raising rather than fixing here.** That `semgrep` exemption is a second instance of the same bug, not a new one. Because the top-level `exclude` has covered `doc/source/`, the `code-block-python` rule has never run on **any** of the five doc paths it targets: 31 occurrences across 16 files in `doc/source/data`, `ray-core`, `ray-observability`, and `train`. Every one is an untested documentation snippet the rule was written to catch. Happy to take that on as a follow-up, but converting snippets means they start executing in CI, so it wants a maintainer opinion on scope and on whether the rule is still wanted for docs at all. ### 2. Vale was pinned to 3.4.1, from June 2024 This upgrades both the hook `rev` and the CI script to 3.17.1. The bump isn't inert, so three supporting changes come with it. `Vale.Spelling` produces **no alerts at all** under 3.4.1, but 11 error-severity alerts under 3.17.1, because the newer engine word-boundary-anchors vocabulary patterns. Existing entries such as `[Bb]ackpressure`, `dtype`, and `namespace` therefore stopped covering `backpressured`, `dtypes`, and `namespaces`. This widens those three and adds terms that were never listed at all: `Databricks`, `Datasink`, `Multimodality`, `preprocess`, `resample`, `vCPU`, `Vectorizer`. Two Google rules also became error-severity on content where they're wrong, so they're set to `warning` rather than editing correct prose: * `Google.HeadingPunctuation` reads the period in a numbered heading such as `### 1. Label your worker nodes` as a heading-ending period. The match it reports is literally `1.`. * `Google.OxfordComma` fires on "X, A and B" where A and B modify X rather than continuing a list, as in "resources used by all operators, active and requested". Both follow the existing precedent of tuning Google rules in `.vale.ini` alongside `Google.Colons` and `Google.Headings`, and both preserve 3.4.1's effective behavior, where neither rule blocked. ## Related issues None. Cross-referencing two of my own open PRs that touch adjacent surfaces, neither of which shares a file with this one: * ray-project#65368 removes the banned-words lint in favor of Vale. That increases how much Ray leans on Vale, which makes a dead local hook and a two-year-old pin more worth fixing. Touches `ci/lint/check-banned-words.sh`, `ci/lint/lint.sh`, and `.buildkite/lint.rayci.yml`. * ray-project#65342 makes the docs-go scope guard count Vale configuration as documentation content. Worth noting that after it merges, a Vale-config-only PR like this one would classify as documentation. Touches `ci/lint/validate_docs_go_scope.sh`. ## Additional information **AI assistance was used.** I used Claude Code to investigate and draft this. I reviewed every changed line, ran the measurements below myself, and can defend the change end to end. **Not a duplicate.** `gh pr list --repo ray-project/ray --state open --search "vale in:title"` and the same for `pre-commit` return only ray-project#65368 and ray-project#65342 above, which change different files and have different goals. **Measurements**, on the exact set `ci/lint/check-documentation-style.sh` lints (`doc/source/data` and `doc/source/ray-overview/examples`): | Vale | Total alerts | Error-severity | Exit code | Lint step | |---|---|---|---|---| | 3.4.1 (current pin) | 162 | 0 | 0 | green | | 3.17.1, bump alone | 208 | 14 | 1 | **red** | | 3.17.1, with this PR | 196 | 0 | 0 | green | That middle row is the reason the vocabulary and `.vale.ini` changes are in the same PR as the version bump: without them the bump turns `lint: documentation_style` red. **Checks run locally:** ``` # the CI script's exact target set, both versions vale doc/source/data doc/source/ray-overview/examples # 3.4.1 -> exit 0; 3.17.1 pre-fix -> exit 1; post-fix -> exit 0 # the hook now actually matches files and passes pre-commit run vale --files doc/source/data/data-internals.rst # vale.....................................................................Passed # and genuinely fails, rather than passing vacuously: appended a line # containing "This sentance has a deliberate spelling mistake." pre-commit run vale --files doc/source/data/data-internals.rst # 349:6 error Did you really mean 'sentance'? Vale.Spelling # 1 error, 0 warnings and 17 suggestions in 1 file. # the two hooks I exempted stay exempt, so no file churn pre-commit run trailing-whitespace --files $(git ls-files 'doc/source/data' | grep -E '\.(md|rst)$') pre-commit run end-of-file-fixer --files $(git ls-files 'doc/source/data' | grep -E '\.(md|rst)$') # both: (no files to check)Skipped # the two rST hooks that newly become eligible pre-commit run rst-directive-colons --files ... # Passed pre-commit run rst-inline-touching-normal --files ... # Passed ``` I also confirmed the 3.17.1 release publishes the two asset filenames the CI script downloads, `vale_3.17.1_Linux_64-bit.tar.gz` and `vale_3.17.1_macOS_arm64.tar.gz`. **Net effect:** contributors get Vale locally, CI runs a Vale two years newer, and `Vale.Spelling` becomes an enforced check instead of a silent one. --------- Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…#65368) ## Summary Removes the `banned_words` lint check and its Buildkite matrix entry. `ci/lint/check-banned-words.sh` is a `git grep` for three fixed strings across `*.py`, `*.rst`, `*.md`, and `*.ipynb`. Vale already flags all three, at `error` severity, with better messages. This PR deletes the redundant check. ## The three terms, and what catches them today The check enforces exactly three case-sensitive strings. Every one is already covered by a Vale rule in this repository, with no configuration change required by this PR: | Term removed from the grep | Correct form | Vale rule that catches it | Source | | --- | --- | --- | --- | | `Kuberay` | `KubeRay` | `Google.WordList` (error) | `"[Kk]ube[Rr]ay": KubeRay` in `.vale/styles/Google/WordList.yml` | | `RLLib` | `RLlib` | `Vale.Terms` (error) | `(RL\|rl)lib` in `.vale/styles/config/vocabularies/RLlib/accept.txt` | | `Rllib` | `RLlib` | `Vale.Terms` (error) | same entry | Verified against a fixture page containing both the correct and incorrect forms: ``` t.md:5:18:Google.WordList:Use 'KubeRay' instead of 'Kuberay'. t.md:5:27:Vale.Terms:Use 'RLlib' instead of 'RLLib'. t.md:5:38:Vale.Terms:Use 'RLlib' instead of 'Rllib'. ``` The correct spellings `KubeRay` and `RLlib` produce no alerts, so the rules discriminate on capitalization the same way the case-sensitive grep did. Vale's messages name the correct form; the grep only says a misspelled word was found and asks the author to go fix it. The `Vale.Terms` message improves further on Vale 3.17.1 (ray-project#65375), which renders the vocabulary entry as `RLlib` rather than echoing the raw `(RL|rl)lib` pattern. Because coverage already exists, this PR deliberately adds nothing to the `reject.txt` vocabulary. A reject entry would fire `Vale.Avoid` *in addition to* the rule above, double-reporting the same token with a strictly less useful message ("Avoid using 'Kuberay'" versus "Use 'KubeRay' instead of 'Kuberay'"). ## What the check costs The step carries the `always` tag in `.buildkite/lint.rayci.yml`, so it runs on every pull request, including documentation-only ones. Measured across 89 `lint: banned_words` jobs from recent passing `premerge` builds: | Measure | p50 | p90 | Range | | --- | --- | --- | --- | | Job run time | 111s | 116s | 108s – 642s | | Queue wait before start | 42s | 51s | 8s – 146s | | Wall clock, queue plus run | 153s | — | — | Nearly all of that is fixed overhead rather than work. Taking build 71819 as a representative sample, the job started at 10:59:01.6 and finished at 11:00:52.8, and `Checking for common mis-spellings...` printed at 11:00:52. So roughly 110 seconds went to the repository clone and the forge image pull, and the `git grep` itself accounted for under a second of it. At 391 `premerge` builds over the last seven days, the step consumes on the order of 12 agent-hours per week to run three sub-second greps. ## Why not keep it anyway Beyond the cost, the grep can't express the rule properly: - **No scoping.** Vale rules apply per path glob. The grep is repo-wide, with no way to hold a stricter bar in one tree than another. - **No exceptions.** Vale has `TokenIgnores`, `BlockIgnores`, and vocabularies. The grep has none, so a page that needs to *name* an incorrect spelling can't. That's not hypothetical: ray-project#65239 adds a Kubernetes and KubeRay terminology table to the style guide, and the row telling contributors to write `KubeRay` rather than `Kuberay` fails the check. There is no way to satisfy both. - **No severity.** Vale has `suggestion`, `warning`, and `error`. The grep is a hard CI failure or nothing. - **No extensibility.** Adding a term means editing a shell string that ships its own bespoke failure output. Adding a term to Vale means one line in a vocabulary or `swap` map, and it inherits the shared message, link, and reporting. ## The remaining gap, stated plainly The gap this PR opens is **scope, not rule coverage**. Vale runs today only against `doc/source/data/` and `doc/source/ray-overview/examples`, both in CI and in the pre-commit hook. Within those trees the three spellings are enforced today and stay enforced after this PR. Outside them, the repo-wide grep was the only thing checking, and nothing replaces it until Vale's scope widens. Adding the terms to a Vale vocabulary would not close that gap, because the limit is which paths Vale is pointed at, not which rules it has. The docs team is widening that scope over the coming weeks. ## Related changes - Drops the `banned_words` entry from the always-on lint matrix in `.buildkite/lint.rayci.yml`. - Removes the local-run instructions from `doc/source/ray-contribute/getting-involved.md`. - Updates the prose-only lint step count in `doc/source/ray-contribute/ci.md` from four to three. ## Checks - [x] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. - [x] Release tests and any other tests I've added and changed pass. - [x] This PR is not tested :( Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ay-project#65431) ## Why this change is needed `lint: doc_readme` carries the `always` tag, so it runs on every pull request, including documentation-prose-only ones. Its inputs are the repo-root `README.rst` and `python/setup.py`. Nothing under `doc/` feeds it, so a prose change cannot change its result. What it actually checks, from `ci/lint/lint.sh`: ```bash doc_readme() { /usr/bin/python -m pip install -c python/requirements_compiled.txt docutils cd python && /usr/bin/python setup.py check --restructuredtext --strict --metadata } ``` `--restructuredtext` validates `long_description`, which `python/setup.py` reads from the repo-root `README.rst`. `--metadata` validates `setup.py`'s own metadata fields. So the check guards how Ray's PyPI long description renders. It's a useful gate and this PR doesn't touch what it does; it's pointed at the wrong trigger. It ended up in the `lint-small-prose` matrix, which exists for the opposite reason: that matrix holds the checks a Markdown or reStructuredText change *can* fail, so they survive the prose filter that strips the code-oriented `lint-small` matrix. The name `doc_readme` reads like documentation. The other three steps in that matrix belong there; this one is packaging. ## What this PR does 1. Moves `doc_readme` into its own step tagged `pypi_readme` alone, with no `lint` and no `always`. 2. Adds a rule in `.buildkite/always.rules.txt` emitting `pypi_readme` for `README.rst` and `python/setup.py`. Both files keep `always lint`, which the catch-all would otherwise have given them, so no other step's trigger narrows. 3. Adds test cases to `.buildkite/always.rules.test.txt` for both inputs and for neighbors that must not emit the tag. 4. Rewrites the matrix comment to state the rule rather than imply it: adding a step to the prose matrix asserts a prose-only diff can fail it. Prose pull requests and code pull requests that leave both files alone both stop selecting the step. The second half of that is broader than strictly necessary to fix the prose case, and it's the point: a check that cannot fail from your change shouldn't be in your PR's status list. ## Two consequences worth flagging **Microcheck eligibility.** Dropping `lint` from the step means the microcheck pipeline's hardcoded `tag:lint` selector no longer makes it eligible there, so it runs on premerge only. Selects and rule-emitted tags are ANDed in rayci's step filter, so this is the expected outcome rather than a surprise. Microcheck is non-blocking; premerge is the gate this check has to hold. Noted in the step comment. **Step IDs shift within the lint group.** Step IDs are positional (`fmt.Sprintf("g%d_s%d", i, j)`), so inserting a step moves `api-param-coverage` from `g11_s3` to `g11_s4` and `docs-go-scope` from `g11_s4` to `g11_s5`. `Test.gen_microcheck_step_ids` derives step IDs from recent Bazel test results, and group `g11` contains no Bazel test steps, so nothing keyed on step ID is affected. ## Not a duplicate No open PR touches `doc_readme` (`gh pr list --repo ray-project/ray --state open --search doc_readme` returns nothing). ray-project#65368 edits the same matrix to remove `banned_words`, so these two will conflict textually. They're independent changes and either merge order works; whichever lands second needs a trivial rebase. ## Testing Rules layer, from the branch: ``` $ rayci test-rules $ echo $? 0 ``` 125 cases pass. Negative control: reverting the `README.rst` expectation to `always lint` fails with `+pypi_readme (unexpected)`, confirming the test is reading the new rule rather than passing vacuously. Step selection, generating the pipeline that the pinned rayci binary (v0.46.0, from `.rayciversion`) actually emits for a probe diff, rather than reasoning about tags: | Probe diff | Selected tags | `lint: doc_readme` | | --- | --- | --- | | `doc/source/index.rst`, at `master` | `always` | runs, inside the `g11_s0` matrix | | `doc/source/index.rst`, on this branch | `always` | not emitted | | `python/ray/actor.py`, on this branch | `always lint …` | not emitted | | `README.rst`, on this branch | `always lint pypi_readme` | emitted, `g11_s1` | | `python/setup.py`, on this branch | `… pypi_readme …` | emitted, `g11_s1` | The `master` row is the before state: on a prose-only diff the emitted prose matrix contains `banned_words`, `doc_readme`, `documentation_style`, `doc_no_new_rst`. On this branch that matrix has three entries and no separate `doc_readme` step appears. Not verifiable outside Buildkite: `if:` expression evaluation, which this PR doesn't touch. ## AI assistance AI assistance was used for this change. Every changed line was reviewed by a human before this PR was opened, and the commands above were run locally. Signed-off-by: Douglas Strodtman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the
banned_wordslint check and its Buildkite matrix entry.ci/lint/check-banned-words.shis agit grepfor three fixed strings across*.py,*.rst,*.md, and*.ipynb. Vale already flags all three, aterrorseverity, with better messages. This PR deletes the redundant check.The three terms, and what catches them today
The check enforces exactly three case-sensitive strings. Every one is already covered by a Vale rule in this repository, with no configuration change required by this PR:
KuberayKubeRayGoogle.WordList(error)"[Kk]ube[Rr]ay": KubeRayin.vale/styles/Google/WordList.ymlRLLibRLlibVale.Terms(error)(RL|rl)libin.vale/styles/config/vocabularies/RLlib/accept.txtRllibRLlibVale.Terms(error)Verified against a fixture page containing both the correct and incorrect forms:
The correct spellings
KubeRayandRLlibproduce no alerts, so the rules discriminate on capitalization the same way the case-sensitive grep did.Vale's messages name the correct form; the grep only says a misspelled word was found and asks the author to go fix it. The
Vale.Termsmessage improves further on Vale 3.17.1 (#65375), which renders the vocabulary entry asRLlibrather than echoing the raw(RL|rl)libpattern.Because coverage already exists, this PR deliberately adds nothing to the
reject.txtvocabulary. A reject entry would fireVale.Avoidin addition to the rule above, double-reporting the same token with a strictly less useful message ("Avoid using 'Kuberay'" versus "Use 'KubeRay' instead of 'Kuberay'").What the check costs
The step carries the
alwaystag in.buildkite/lint.rayci.yml, so it runs on every pull request, including documentation-only ones.Measured across 89
lint: banned_wordsjobs from recent passingpremergebuilds:Nearly all of that is fixed overhead rather than work. Taking build 71819 as a representative sample, the job started at 10:59:01.6 and finished at 11:00:52.8, and
Checking for common mis-spellings...printed at 11:00:52. So roughly 110 seconds went to the repository clone and the forge image pull, and thegit grepitself accounted for under a second of it.At 391
premergebuilds over the last seven days, the step consumes on the order of 12 agent-hours per week to run three sub-second greps.Why not keep it anyway
Beyond the cost, the grep can't express the rule properly:
TokenIgnores,BlockIgnores, and vocabularies. The grep has none, so a page that needs to name an incorrect spelling can't. That's not hypothetical: [docs] Add Kubernetes and KubeRay conventions to the style guide #65239 adds a Kubernetes and KubeRay terminology table to the style guide, and the row telling contributors to writeKubeRayrather thanKuberayfails the check. There is no way to satisfy both.suggestion,warning, anderror. The grep is a hard CI failure or nothing.swapmap, and it inherits the shared message, link, and reporting.The remaining gap, stated plainly
The gap this PR opens is scope, not rule coverage. Vale runs today only against
doc/source/data/anddoc/source/ray-overview/examples, both in CI and in the pre-commit hook. Within those trees the three spellings are enforced today and stay enforced after this PR. Outside them, the repo-wide grep was the only thing checking, and nothing replaces it until Vale's scope widens.Adding the terms to a Vale vocabulary would not close that gap, because the limit is which paths Vale is pointed at, not which rules it has. The docs team is widening that scope over the coming weeks.
Related changes
banned_wordsentry from the always-on lint matrix in.buildkite/lint.rayci.yml.doc/source/ray-contribute/getting-involved.md.doc/source/ray-contribute/ci.mdfrom four to three.Checks
git commit -s).