chore: write the repo in en-US, and gate it so it stays that way - #204
Conversation
The project standard is en-US. The tree had drifted to en-GB -- and I made that worse: on #202 I rejected a reviewer's generalising -> generalizing suggestion on the measured grounds that the repo was consistently en-GB (37 "behaviour" to 3). The measurement was right and the conclusion was backwards: consistency with a drift is not a reason to keep drifting. 1,505 replacements across 131 files, from 51 stem-level pairs applied case-preservingly, so every inflection of a stem is covered by one entry. Touches prose, doc comments, assertion messages, and private test-function names. NO public item is renamed, so there is no API change -- checked by enumerating `pub fn|struct|enum|const|static|trait|type|mod` names against the stem list and finding none. Also checked in advance: - no CI job or script filters on an affected test name - no excluded directory cites an affected test name, so swept and unswept text cannot desync - no verbatim external quotation is altered (searched for quoted phrases beside a citation marker; the one hit was our own italic emphasis, not a quote) Excluded trees, and why: ref-docs/ immutable research corpus -- corrections land as new dated supplemental files, never in-place rewrites (module 40) n64brew_wiki/ CC BY-SA mirror, quoted verbatim by design ref-proj/ study clones of other emulators third_party/ vendored libdragon; not our prose to edit Two literals are preserved because they are values, not words: `lightgrey` in a shields.io badge URL (a color PARAMETER), and GitHub Actions' own `cancelled` run status where the CHANGELOG quotes it. Stems whose form is correct in en-US too were deliberately left out of the list -- analysis, synthesis, hypothesis, peripheral, exercise, precise, premise, promise, otherwise, likewise, bitwise, controlled, installed, stalled -- since a stem there would corrupt a correct word. Adds scripts/check_en_us.sh and an `en-US spelling` CI job, because a one-off sweep decays: nothing fails when one en-GB form returns, so it survives review and the next has precedent. This repo already demonstrates the pattern -- markdownlint runs in pre-commit only, and an MD040 violation sat unnoticed on main until #203. The gate is mutation-checked in BOTH directions (fails on the unswept tree at 1,355 lines, passes on the swept one at 443 files), strips allowed literals rather than skipping their whole line so a permitted value cannot shield a real hit beside it, and documents a per-line `spell-exempt` escape hatch. Also wired into pre-commit for a faster local loop, with CI as the unskippable gate. Gates: fmt, clippy -D warnings, cargo test --workspace, rustdoc -D warnings, no_std thumbv7em, markdownlint, check_no_roms, check_en_us -- all green.
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (133)
Comment |
… class Adjudicates the Antigravity review on #204, which caught one of four corruptions. A before/after word-pair audit over the whole diff caught all four, and it is the check I should have run before committing the sweep: characteris -> characteriz corrupted characteristics -> characteriztics optimis -> optimiz corrupted optimistic -> optimiztic realis -> realiz corrupted realistically -> realiztically centre -> center corrupted centred -> centerd All four are stems matching INSIDE a word already correct in en-US. The gate passed on the corrupted tree, and correctly so -- the outputs are not en-GB either, so an en-GB pattern cannot see them. The same defect was in the gate itself, in both directions: bare -is stems made it report `characteristics`, `optimistic` and `realistically` as violations. Split the stem list in two -- PLAIN_STEMS matched as substrings, ISE_STEMS requiring an en-GB verb/noun ending -- so `optimis+tic` no longer matches while `optimis+ation` still does. Also: - Added a MALFORMED backstop list so these specific non-words cannot return, with a comment saying plainly that it is a backstop for forms already seen and NOT a substitute for auditing a future sweep's word pairs. - Added `cancelled`/`cancelling` and `centring` as stems. Their omission left real en-GB spellings unswept -- `the_sign_of_a_cancelled_zero_...` (renamed) and two prose sites -- while the value references keep the backticked `cancelled` form that names GitHub Actions' literal status. - `centring` and `cancelling` are listed separately because neither CONTAINS its sibling stem, which is how a stem list silently under-matches. The gate is now mutation-checked three ways: it catches an injected en-GB word, catches an injected malformed word, and does NOT flag optimistic / realistically / characteristics / synthesis / analysis. Antigravity also reported scripts/check_en_us.sh as missing from the patch; rejected as incorrect -- `git ls-files` lists it and the `en-US spelling` CI job PASSED on this PR, which is impossible if the script were absent. Gates: fmt, clippy -D warnings, cargo test --workspace, rustdoc -D warnings, no_std thumbv7em, markdownlint, check_no_roms, check_en_us -- all green.
Adjudication of the Antigravity reviewBlocking issue — The script is committed. The decisive evidence is stronger than the file listing, though: the That job's only step is I suspect the patch view truncated: this diff spans 133 files, and Suggestion — You found one. I ran a before/after word-pair audit over the entire diff — reconstructing each changed line's words and reporting every pair that differs — and it found four:
Three of those are worse than a typo: they are stems firing inside words that were already correct in en-US. I had explicitly reasoned about this class when building the list — excluding Worth being clear about what this says about my own gate: it PASSED on the corrupted tree, and correctly so. The outputs are not en-GB either, so an en-GB pattern cannot see them. Your review caught one; the audit caught all four. The audit is the check I should have run before committing, and its absence is the actual mistake here. The same defect was in the gate, in both directions. Bare
Three further fixes in the same commit:
The gate is now mutation-checked three ways rather than two: Good catch — the one typo you surfaced is what prompted the audit that found the other three. |
Antigravity review (Gemini via Ultra)This PR converts repository documentation, comments, and configuration text from en-GB to en-US spelling and adds CI and pre-commit gates to enforce en-US spelling going forward. Blocking issues
Suggestions
NitpicksNone. Automated first-pass review by |
Motivation
The project standard is en-US. The tree had drifted to en-GB — and I made that worse: on #202 I rejected a reviewer's
generalising→generalizingsuggestion on the measured grounds that the repo was consistently en-GB (37behaviourto 3, 41modelledto 0). The measurement was correct; the conclusion was backwards. Consistency with a drift is not a reason to keep drifting.The sweep
1,505 replacements across 131 files, from 51 stem-level pairs applied case-preservingly. Stems rather than whole words, so one entry covers every inflection (
colouralso fixescolours/coloured/colouring/colourful). Families covered:-our/-or,-ise/-ize,-isation/-ization,-re/-er, doubled-lled/-lling, plus a dozen individual words (artefact,analogue,catalogue,judgement,acknowledgement,licence,grey, …).Touches prose, doc comments, assertion messages, and private test-function names.
Safety checks run before applying
No public item is renamed, so there is no API change. Enumerated every
pub fn|struct|enum|const|static|trait|type|modname against the stem list: zero matches. The only identifiers affected are private — three local variables (centre_r/g/b,traveled) and ~14#[test]function names.§,UM,N64brew); the single hit was our own italic emphasis, not a quotationExcluded trees, and why:
ref-docs/n64brew_wiki/ref-proj/third_party/whilstthat stays)Two literals preserved because they are values, not words:
lightgreyin a shields.io badge URL — a color parameter, and a naive sweep would have edited it — and GitHub Actions' owncancelledrun status where the CHANGELOG quotes it.Stems deliberately left out because the form is correct in en-US too, and a stem there would corrupt a correct word:
analysis,analyses(as a noun),synthesis,hypothesis,peripheral,exercise,precise,imprecise,premise,promise,otherwise,likewise,bitwise,advertise,revise,praise,controlled,installed,stalled.synthesiseis handled as a whole word sosynthesissurvives;mis-analysesis targeted specifically because bareanalysesis ambiguous between the verb and the plural noun.The gate —
scripts/check_en_us.sh+ anen-US spellingCI jobA one-off sweep decays. Nothing fails when a single en-GB form returns, so it survives review and the next one has precedent. This repo already demonstrates the pattern: markdownlint runs in pre-commit only, never in CI, and an MD040 fence violation consequently sat unnoticed on
mainuntil #203 happened to catch it.The gate is mutation-checked in both directions, which is the part that makes it evidence rather than decoration:
Two design details worth calling out:
badge lightgrey and also the word colour hereis still reported).spell-exemptmarker for quoted external values, and says in its own header to prefer rephrasing, since every marker is a small permanent exception. This PR uses zero of them: the CHANGELOG entry was rephrased to describe the families instead of naming en-GB examples.Wired into pre-commit as well for a faster local loop, with CI as the unskippable gate — a contributor can bypass a hook with
--no-verify, not a CI job.The CI job takes no untrusted input:
actions/checkout@v7plus onerun:, no${{ }}interpolation, and triggers unchanged (pull_request, notpull_request_target).Gates run locally
cargo fmt --all --check·cargo clippy --workspace --all-targets -- -D warnings·cargo test --workspace·RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps·cargo build -p rustyn64-core --target thumbv7em-none-eabihf --no-default-features·pre-commit run markdownlint --all-files·check_no_roms.sh·check_en_us.sh— all green.Note for reviewers
This is a large mechanical diff. The substantive review surface is small and worth focusing on:
scripts/check_en_us.sh(the stem list, the exclusions, the two protected literals), and the ~17 lines in the table above where the sweep touched something other than prose. The remaining ~1,470 lines are single-word substitutions in comments and Markdown.🤖 Generated with Claude Code