Repository navigation
[CI] Make the Vale pre-commit hook run, and upgrade Vale to 3.17.1 - #65375
Merged
dstrodtman merged 2 commits intoAug 14, 2026
Merged
Conversation
The `vale` pre-commit hook has been matching zero files since it was added. 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. Because the hook's pattern (`^doc/source/data/.*\.(md|rst)$`) lives entirely inside `doc/source/`, the two can never both be satisfied. `pre-commit run vale --all-files` reports "no files to check", and committing a change to doc/source/data skips the hook silently. Vale still ran in CI through ci/lint/check-documentation-style.sh, so the gate existed, but contributors got no local signal and a passing pre-commit run said nothing about Vale. Narrow the `doc/source/` entry so it keeps excluding the tree except the Markdown and rST under doc/source/data that the hook targets. Verified: the hook now installs and runs, passes on clean files, and fails on an injected misspelling. Narrowing the exclude also exposes those 48 files to `trailing-whitespace` and `end-of-file-fixer` for the first time, which would rewrite 17 unrelated files. Exempt those two hooks from doc/source/data so enabling Vale stays a config-only change; the whitespace cleanup is worth its own PR. The two rST hooks that also become eligible pass as-is. Upgrade Vale from 3.4.1 to 3.17.1 in both the hook `rev` and the CI script, which needs three supporting changes to stay green: - `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`. Widen those three and add the terms that were never listed: Databricks, Datasink, Multimodality, preprocess, resample, vCPU, and Vectorizer. - `Google.HeadingPunctuation` reads the period in a numbered heading such as "### 1. Label your worker nodes" as a heading-ending period, and `Google.OxfordComma` fires on "X, A and B" where A and B modify X rather than continuing a list. Both are false positives on current content, so set them to warning rather than editing correct prose. This matches the existing precedent of tuning Google rules in .vale.ini, and preserves 3.4.1's effective behavior, where neither rule blocked. Measured on the exact set the CI script lints (doc/source/data and doc/source/ray-overview/examples): 3.4.1 reports 162 alerts, 0 of them error-severity, and exits 0. Before these fixes 3.17.1 reported 208 alerts, 14 error-severity, and exited 1, which would have turned the lint step red. After them it reports 196 alerts, 0 error-severity, and exits 0. Net effect: contributors get Vale locally, CI runs a Vale that is two years newer, and `Vale.Spelling` becomes an enforced check instead of a silent one. Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the documentation linting configuration by upgrading Vale to version 3.17.1, adjusting pre-commit exclusions to run Vale on files under doc/source/data, and tuning Vale rules and accepted vocabularies. Feedback on the changes suggests resolving redundant patterns in the vocabulary file for [Pp]reprocess and [Rr]esample by removing the optional ? suffix, as their base forms are already defined.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit b1ef2b3. Configure here.
Cursor Bugbot caught a real break. semgrep.yml's `code-block-python` rule lists doc/source/data/**/*.rst in its `paths.include`, so narrowing the top-level `exclude` exposed 8 pre-existing violations across 5 files and would have failed the `semgrep_lint` step, which runs `pre-commit run semgrep --all-files`. Exempt the hook from doc/source/data alongside the two whitespace hooks, and leave the violations to a separate PR rather than converting code blocks here. Verified: `pre-commit run semgrep --all-files` now passes, as does `pre-commit run vale --all-files`. Gemini flagged two vocabulary entries as redundant, and it was right that the base forms already exist: `[Pp]reprocess` in Data/accept.txt and `[Rr]esample` in General/accept.txt. Rather than keep a base entry plus an inflected entry for the same word, widen the existing entry in place, which is what this PR already does for backpressure, dtype, and namespace. That leaves one entry per word and no cross-list duplication. Checked the other five added terms the same way; Databricks, Datasink, Multimodality, vCPU, and Vectorizer are each single entries. Vale 3.17.1 still exits 0 with no error-severity alerts on the set the CI script lints. 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
## 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 (#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: #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]>
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]>
bveeramani
pushed a commit
that referenced
this pull request
Sep 21, 2026
… carve-out (#65425) ## Why #65375 fixed a pre-commit `exclude` bug that had kept the `vale` hook from matching any files. Narrowing that exclude so Vale can see `doc/source/data` prose also exposed those files to `trailing-whitespace` and `end-of-file-fixer` for the first time. Rather than make a config-only change rewrite unrelated prose files, #65375 exempted the two hooks from the directory and deferred the cleanup. This is that cleanup. ## What 1. Removes both `exclude: ^doc/source/data/` lines that #65375 added, along with the comments explaining them. 2. Runs `trailing-whitespace` and `end-of-file-fixer` over the Markdown and rST files under `doc/source/data`. That rewrites 14 of them: trailing spaces trimmed, missing final newlines added. No content changes. `git diff --ignore-all-space --ignore-blank-lines -- doc/source/data` is empty, so the whole prose diff is whitespace. Both hooks now pass `--all-files`. ## Not in scope The `semgrep` exemption on the same directory stays. It covers pre-existing `code-block-python` violations, which want a real fix rather than a whitespace pass. ## Reviewing this A pure-whitespace diff is only reviewable when nothing else is in it, which is the point of keeping it as its own PR. `git diff -w` showing nothing is the check that matters. Signed-off-by: Douglas Strodtman <[email protected]>
owenowenisme
pushed a commit
to owenowenisme/ray
that referenced
this pull request
Sep 23, 2026
… carve-out (ray-project#65425) ## Why ray-project#65375 fixed a pre-commit `exclude` bug that had kept the `vale` hook from matching any files. Narrowing that exclude so Vale can see `doc/source/data` prose also exposed those files to `trailing-whitespace` and `end-of-file-fixer` for the first time. Rather than make a config-only change rewrite unrelated prose files, ray-project#65375 exempted the two hooks from the directory and deferred the cleanup. This is that cleanup. ## What 1. Removes both `exclude: ^doc/source/data/` lines that ray-project#65375 added, along with the comments explaining them. 2. Runs `trailing-whitespace` and `end-of-file-fixer` over the Markdown and rST files under `doc/source/data`. That rewrites 14 of them: trailing spaces trimmed, missing final newlines added. No content changes. `git diff --ignore-all-space --ignore-blank-lines -- doc/source/data` is empty, so the whole prose diff is whitespace. Both hooks now pass `--all-files`. ## Not in scope The `semgrep` exemption on the same directory stays. It covers pre-existing `code-block-python` violations, which want a real fix rather than a whitespace pass. ## Reviewing this A pure-whitespace diff is only reviewable when nothing else is in it, which is the point of keeping it as its own PR. `git diff -w` showing nothing is the check that matters. Signed-off-by: Douglas Strodtman <[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
… carve-out (ray-project#65425) ## Why ray-project#65375 fixed a pre-commit `exclude` bug that had kept the `vale` hook from matching any files. Narrowing that exclude so Vale can see `doc/source/data` prose also exposed those files to `trailing-whitespace` and `end-of-file-fixer` for the first time. Rather than make a config-only change rewrite unrelated prose files, ray-project#65375 exempted the two hooks from the directory and deferred the cleanup. This is that cleanup. ## What 1. Removes both `exclude: ^doc/source/data/` lines that ray-project#65375 added, along with the comments explaining them. 2. Runs `trailing-whitespace` and `end-of-file-fixer` over the Markdown and rST files under `doc/source/data`. That rewrites 14 of them: trailing spaces trimmed, missing final newlines added. No content changes. `git diff --ignore-all-space --ignore-blank-lines -- doc/source/data` is empty, so the whole prose diff is whitespace. Both hooks now pass `--all-files`. ## Not in scope The `semgrep` exemption on the same directory stays. It covers pre-existing `code-block-python` violations, which want a real fix rather than a whitespace pass. ## Reviewing this A pure-whitespace diff is only reviewable when nothing else is in it, which is the point of keeping it as its own PR. `git diff -w` showing nothing is the check that matters. 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.

Description
Two related fixes to the Vale setup.
1. The
valepre-commit hook has never runThe top-level
excludein.pre-commit-config.yamllistsdoc/source/, and pre-commit ANDs that globalexcludewith each hook's ownfilespattern. The Vale hook's pattern,^doc/source/data/.*\.(md|rst)$, lives entirely insidedoc/source/, so the two can never both be satisfied and the hook matches zero files:Committing a change under
doc/source/dataskips it silently too. Vale still ran in CI throughci/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 todoc/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-whitespaceandend-of-file-fixerwould rewrite 17 unrelated files. I've exempted those two hooks fromdoc/source/dataso 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 [Data] Update docs for hash shuffle v2 #65372. *semgrepwould fail. Caught by Cursor Bugbot, and it was right.semgrep.yml'scode-block-pythonrule listsdoc/source/data/**/*.rstin itspaths.includeatseverity: ERROR, there are 8 pre-existing violations across 5 files, andci/lint/lint.shrunspre-commit run semgrep --all-filesas thesemgrep_lintstep. Converting those code blocks totestcodeis 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
semgrepexemption is a second instance of the same bug, not a new one. Because the top-levelexcludehas covereddoc/source/, thecode-block-pythonrule has never run on any of the five doc paths it targets: 31 occurrences across 16 files indoc/source/data,ray-core,ray-observability, andtrain. 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
revand the CI script to 3.17.1. The bump isn't inert, so three supporting changes come with it.Vale.Spellingproduces 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, andnamespacetherefore stopped coveringbackpressured,dtypes, andnamespaces. 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
warningrather than editing correct prose:Google.HeadingPunctuationreads the period in a numbered heading such as### 1. Label your worker nodesas a heading-ending period. The match it reports is literally1..Google.OxfordCommafires 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.inialongsideGoogle.ColonsandGoogle.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:
ci/lint/check-banned-words.sh,ci/lint/lint.sh, and.buildkite/lint.rayci.yml.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 forpre-commitreturn only #65368 and #65342 above, which change different files and have different goals.Measurements, on the exact set
ci/lint/check-documentation-style.shlints (doc/source/dataanddoc/source/ray-overview/examples):That middle row is the reason the vocabulary and
.vale.inichanges are in the same PR as the version bump: without them the bump turnslint: documentation_stylered.Checks run locally:
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.gzandvale_3.17.1_macOS_arm64.tar.gz.Net effect: contributors get Vale locally, CI runs a Vale two years newer, and
Vale.Spellingbecomes an enforced check instead of a silent one.