Skip to content

Enforce Oxford spelling with typos - #174

Merged
leynos merged 4 commits into
mainfrom
typos-roll-out
Jul 14, 2026
Merged

Enforce Oxford spelling with typos#174
leynos merged 4 commits into
mainfrom
typos-roll-out

Conversation

@leynos

@leynos leynos commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • enforce en-GB-oxendict spelling in tracked Markdown with Typos 1.48.0;
  • apply reviewed Oxford spelling corrections across Rust, Python, and
    documentation while preserving external API spellings;
  • pin typos-config-builder at
    d6da92f02240a79a945c835f69bdd08a888da1d0 for deterministic shared-policy
    refresh, local-overlay merge, generation, and drift checks;
  • retain a small consumer-owned phrase gate for hand-written to handwritten,
    which Typos cannot express as a whole-phrase correction; and
  • keep the independent MST test cleanup in its own prerequisite commit.

Design boundaries

The repository no longer carries copied cache, HTTP, policy, rendering, or
generator modules. The shared builder remains focused on configuration
assembly. Chutoro owns only typos.local.toml, generated typos.toml, and the
standalone phrase scanner needed for punctuation-separated corrections.

External API and identifier spellings remain protected through narrow local
exceptions. The generated cache is untracked and accepted only when its source
and digest match the pinned builder policy.

Validation

  • make spelling: 3 phrase-policy tests passed at 94.87% coverage; generated
    config drift and Typos 1.48.0 passed;
  • make check-fmt, make lint, and make typecheck passed;
  • make test: 993 tests passed, 1 skipped;
  • make release and the dense-provider release build passed;
  • make kani: all 4 practical harnesses passed;
  • make verus: 25 checks passed;
  • make markdownlint: 50 files, 0 errors;
  • make nixie: all diagrams passed;
  • workflow contracts: 6 passed;
  • Checkmake, Mbake, Actionlint, and git diff --check passed.

make kani-full is not part of this bounded PR gate: the existing seventh
bidirectional-reconciliation proof previously exceeded the 120-minute command
and nightly-workflow limit after six distance harnesses passed. The four named
practical harnesses above are green.

No linked issue or roadmap item was found for this estate-maintenance rollout.

leynos added 2 commits July 14, 2026 12:23
Match the repository panic style explicitly when the compatibility
property fails, preserving the topology and error context without using
unwrap-style control flow.
Apply the reviewed en-GB-oxendict corrections and generated Typos
policy across code and documentation. Pin the shared config-builder CLI
while retaining the small consumer phrase gate for punctuation-separated
corrections that Typos cannot enforce.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @leynos, your pull request is larger than the review limit of 150000 diff characters

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 19 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bceb2a72-a408-454c-b426-412c096b9cbe

📥 Commits

Reviewing files that changed from the base of the PR and between 5584e66 and 6aaaa0b.

📒 Files selected for processing (62)
  • .github/workflows/ci.yml
  • .gitignore
  • AGENTS.md
  • Makefile
  • chutoro-bench-datasets/src/info.rs
  • chutoro-benches/benches/hnsw_ef_sweep.rs
  • chutoro-benches/src/profiling/mod.rs
  • chutoro-cli/src/cli/commands.rs
  • chutoro-cli/src/logging.rs
  • chutoro-core/src/hnsw/cpu/mod.rs
  • chutoro-core/src/hnsw/error.rs
  • chutoro-core/src/hnsw/graph/core.rs
  • chutoro-core/src/hnsw/insert/reciprocity.rs
  • chutoro-core/src/hnsw/invariants/mod.rs
  • chutoro-core/src/hnsw/node.rs
  • chutoro-core/src/hnsw/tests/build.rs
  • chutoro-core/src/hnsw/tests/property/graph_metrics.rs
  • chutoro-core/src/hnsw/tests/property/graph_topology_tests/tests.rs
  • chutoro-core/src/hnsw/tests/property/search_config.rs
  • chutoro-core/src/hnsw/tests/property/strategies.rs
  • chutoro-core/src/hnsw/tests/property/test_runner_support/budget_selection.rs
  • chutoro-core/src/hnsw/tests/property/test_runner_support/runner_wrappers.rs
  • chutoro-core/src/hnsw/tests/property/types.rs
  • chutoro-core/src/mst/mod.rs
  • chutoro-core/src/mst/property/tests.rs
  • chutoro-core/src/mst/union_find.rs
  • chutoro-core/src/session/tests/builder.rs
  • chutoro-providers/dense/src/simd/tests/parity/mod.rs
  • chutoro-providers/dense/src/simd/tests/parity/non_finite.rs
  • chutoro-providers/dense/src/tests/provider.rs
  • chutoro-providers/dense/src/tests/support.rs
  • docs/benchmark-dataset-retrieval.md
  • docs/chutoro-design.md
  • docs/complexity-antipatterns-and-refactoring-strategies.md
  • docs/developers-guide.md
  • docs/execplans/10-1-1-chutoro-bench-datasets-and-dataset-recipe-trait.md
  • docs/execplans/11-1-1-make-edge-harvesting-hnsw-insertion-path-public.md
  • docs/execplans/11-1-2-define-session-config-carrying-clustering-parameters.md
  • docs/execplans/11-1-4-incremental-core-distance-computation.md
  • docs/execplans/2-1-2-extend-synthetic-source-generators.md
  • docs/execplans/2-1-3-track-memory-footprint.md
  • docs/execplans/2-1-7-establish-a-ci-regression-detection-strategy.md
  • docs/execplans/2-2-1-cpu-distance-kernels-using-std-simd.md
  • docs/execplans/2-2-2-dense-point-view-for-aligned-structure-of-arrays.md
  • docs/execplans/2-2-4-optional-nightly-only-std-simd-backend.md
  • docs/execplans/2-2-5-portable-simd-gating-mechanics.md
  • docs/execplans/2-2-6-property-based-backend-parity-suite.md
  • docs/execplans/phase-1-nightly-slow-ci-job.md
  • docs/execplans/phase-1-property-test-ci-integration.md
  • docs/execplans/phase-1-validate-the-harvested-output.md
  • docs/execplans/phase-1-verus-proofs-for-edge-harvest-primitives.md
  • docs/execplans/replace-3-node-bidirectionality-harness-with-commit-path-harness.md
  • docs/property-testing-design.md
  • docs/reliable-testing-in-rust-via-dependency-injection.md
  • docs/rust-testing-with-rstest-fixtures.md
  • docs/users-guide.md
  • scripts/_vault_commands.py
  • scripts/run-verus.sh
  • scripts/tests/test_typos_rollout_check.py
  • scripts/typos_rollout_check.py
  • typos.local.toml
  • typos.toml

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR introduces a generated Typos spelling gate, exact phrase validation, Makefile and CI integration, helper tests, spelling-policy documentation, and spelling corrections across source code and documentation.

Changes

Spelling gate rollout

Layer / File(s) Summary
Spelling policy and build wiring
.gitignore, typos.toml, typos.local.toml, Makefile, .github/workflows/ci.yml, AGENTS.md, docs/developers-guide.md
Configure generated spelling policies, local overrides, cache exclusions, Makefile targets, CI setup, and contributor guidance.
Exact phrase checker implementation
scripts/typos_rollout_check.py
Load effective policy configuration, scan tracked files, mask ignored spans, detect exact prohibited phrases, report locations, and return status 2 for findings.
Phrase checker test coverage
scripts/tests/test_typos_rollout_check.py
Test policy merging, exclusions, masking, phrase boundaries, diagnostic output, and exit codes using temporary git-backed fixtures.
Repository spelling rollout
chutoro-*/**, docs/**, scripts/_vault_commands.py, scripts/run-verus.sh
Update spelling and wording across Rust sources, scripts, tests, user documentation, design documents, and execution plans.

Sequence Diagram(s)

sequenceDiagram
  participant Makefile
  participant TyposConfigBuilder
  participant TyposRolloutCheck
  participant Repository
  Makefile->>TyposConfigBuilder: Generate or verify typos.toml
  Makefile->>TyposRolloutCheck: Run phrase correction check
  TyposRolloutCheck->>Repository: Read tracked files
  Repository-->>TyposRolloutCheck: Return file contents
  TyposRolloutCheck-->>Makefile: Return findings and exit status
Loading

Possibly related PRs

Suggested reviewers: lodyai[bot]

Poem

Typos march in ordered lines,
Oxford maps and policy signs.
Make targets guard the gate,
Phrase checks catch errors straight.
Docs and code now neatly shine.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Unit Architecture ❌ Error load_policy and _tracked hard-code TOML/file/git I/O, while check_phrase_corrections swallows read errors, so fallibility is not explicit at the boundary. Make filesystem/git access injectable or return explicit errors, and stop swallowing read failures in the query path.
Testing (Unit And Behavioural) ⚠️ Warning Tests stay at helper level and call main in-process; they do not exercise the spelling gate as a process or make target, so the external boundary lacks behavioural coverage. Add a subprocess-level smoke test for scripts/typos_rollout_check.py or make spelling, and cover at least one error path such as missing policy or decode failure.
Testing (Property / Proof) ⚠️ Warning The new phrase scanner encodes broad text-matching invariants, yet the PR adds only example pytest cases and no property test or proof harness. Add Hypothesis or a bounded proof for the scanner’s boundary/masking invariants, and exercise them in CI alongside the existing example tests.
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed Match the title to the PR’s Oxford-spelling enforcement changes.
Description check ✅ Passed Keep the description tied to the Typos-based spelling policy changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Testing (Overall) ✅ Passed Accept the tests: they exercise policy loading, masking, exclusions, and CLI output with concrete oracles.
User-Facing Documentation ✅ Passed PR only changes spelling-check scripts; git diff shows no user-facing code or docs changes, and docs/users-guide.md is untouched.
Developer Documentation ✅ Passed PASS: docs/developers-guide.md documents the new spelling gate and build workflow, execplans show checked progress, and no extra locale copies are present.
Module-Level Documentation ✅ Passed All 30 touched .rs/.py modules in the PR summary have top-of-file module docs explaining purpose and context; no gaps were found.
Testing (Compile-Time / Ui) ✅ Passed No Rust/TS compile-time behaviour was added, and the new structured phrase-scan output has focused pytest coverage, including exact CLI output assertions.
Domain Architecture ✅ Passed Domain code stayed isolated; the diffs are docs, tests, and spelling-tooling, with no new domain dependence on transport, storage, or env concerns.
Observability ✅ Passed PASS — The PR is docs/CI/tooling only; the new phrase checker emits stable path:line:column findings and no production runtime behaviour is changed.
Security And Privacy ✅ Passed PASS: the new checker only reads tracked repo files via constant argv, emits phrase/correction text, and adds no secrets, auth, shell, or permission changes.
Performance And Resource Use ✅ Passed PASS: The scanner makes one git ls-files pass, processes 365 tracked files (~2.9 MB), and applies only 26 ignore regexes with a tiny phrase set; no material hotspot emerged.
Concurrency And State ✅ Passed PASS: The new spelling checker is fully sequential, uses only immutable module constants, and introduces no locks, tasks, or shared mutable state.
Architectural Complexity And Maintainability ✅ Passed The new spelling gate is narrow and explicit: a standalone script, generated config, and documented workflow solve an immediate need without broadening the codebase architecture.
Rust Compiler Lint Integrity ✅ Passed Rust diff adds no #[allow]/#[expect] dead-code or unused suppressions and no new .clone() calls; the only behavioural change is a test match rewrite.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch typos-roll-out

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

Extract per-file phrase finding generation so the consumer scanner keeps a
straightforward tracked-file loop. Fragment negative fixtures so the phrase
gate does not report its own policy examples.
codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review July 14, 2026 10:41

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @leynos, your pull request is larger than the review limit of 150000 diff characters

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@leynos

leynos commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously requested changes Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/chutoro-design.md`:
- Line 3543: Update the bibliography entry in docs/chutoro-design.md to preserve
the cited repository title and wording verbatim, changing “nearest neighbours”
to the American “nearest neighbors” spelling; leave the rest of the citation
unchanged.

In `@docs/execplans/phase-1-nightly-slow-ci-job.md`:
- Line 222: Use sentence case for the “Artefacts and Notes” headings: change
“Notes” to lowercase in docs/execplans/phase-1-nightly-slow-ci-job.md at lines
222-222 and docs/execplans/phase-1-property-test-ci-integration.md at lines
299-299.

In `@Makefile`:
- Around line 76-78: Update the exception handler in typos_rollout_check.py to
use Python 3 tuple syntax for catching both OSError and UnicodeDecodeError, so
spelling-phrase-check parses and runs under Python 3.14.

In `@scripts/tests/test_typos_rollout_check.py`:
- Around line 15-19: Convert the checker helper into a pytest fixture by adding
the pytest fixture decorator while preserving its import setup. Update each test
using checker to accept checker as its parameter, remove monkeypatch from those
test signatures, and delete the manual checker(monkeypatch) assignments.

In `@scripts/typos_rollout_check.py`:
- Around line 102-104: Update _excluded to evaluate policy.excluded_files with
pathspec.GitIgnoreSpec, matching Typos’s gitignore-style extend-exclude
semantics instead of combining path.parts and Path.match. Construct the spec
from the configured patterns and match the tracked path using the
repository-relative representation expected by GitIgnoreSpec, preserving the
boolean return contract.
- Around line 77-88: Update load_policy to check for the shared
.typos-oxendict-base.toml file before passing it to _document; raise a clear
error that directs users to the regeneration command in
docs/developers-guide.md. Preserve the existing phrase-loading and local-overlay
behavior when the cache exists.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4a218eea-a7db-4caa-ab0d-6a7aac99e244

📥 Commits

Reviewing files that changed from the base of the PR and between 5584e66 and e642ee4.

📒 Files selected for processing (62)
  • .github/workflows/ci.yml
  • .gitignore
  • AGENTS.md
  • Makefile
  • chutoro-bench-datasets/src/info.rs
  • chutoro-benches/benches/hnsw_ef_sweep.rs
  • chutoro-benches/src/profiling/mod.rs
  • chutoro-cli/src/cli/commands.rs
  • chutoro-cli/src/logging.rs
  • chutoro-core/src/hnsw/cpu/mod.rs
  • chutoro-core/src/hnsw/error.rs
  • chutoro-core/src/hnsw/graph/core.rs
  • chutoro-core/src/hnsw/insert/reciprocity.rs
  • chutoro-core/src/hnsw/invariants/mod.rs
  • chutoro-core/src/hnsw/node.rs
  • chutoro-core/src/hnsw/tests/build.rs
  • chutoro-core/src/hnsw/tests/property/graph_metrics.rs
  • chutoro-core/src/hnsw/tests/property/graph_topology_tests/tests.rs
  • chutoro-core/src/hnsw/tests/property/search_config.rs
  • chutoro-core/src/hnsw/tests/property/strategies.rs
  • chutoro-core/src/hnsw/tests/property/test_runner_support/budget_selection.rs
  • chutoro-core/src/hnsw/tests/property/test_runner_support/runner_wrappers.rs
  • chutoro-core/src/hnsw/tests/property/types.rs
  • chutoro-core/src/mst/mod.rs
  • chutoro-core/src/mst/property/tests.rs
  • chutoro-core/src/mst/union_find.rs
  • chutoro-core/src/session/tests/builder.rs
  • chutoro-providers/dense/src/simd/tests/parity/mod.rs
  • chutoro-providers/dense/src/simd/tests/parity/non_finite.rs
  • chutoro-providers/dense/src/tests/provider.rs
  • chutoro-providers/dense/src/tests/support.rs
  • docs/benchmark-dataset-retrieval.md
  • docs/chutoro-design.md
  • docs/complexity-antipatterns-and-refactoring-strategies.md
  • docs/developers-guide.md
  • docs/execplans/10-1-1-chutoro-bench-datasets-and-dataset-recipe-trait.md
  • docs/execplans/11-1-1-make-edge-harvesting-hnsw-insertion-path-public.md
  • docs/execplans/11-1-2-define-session-config-carrying-clustering-parameters.md
  • docs/execplans/11-1-4-incremental-core-distance-computation.md
  • docs/execplans/2-1-2-extend-synthetic-source-generators.md
  • docs/execplans/2-1-3-track-memory-footprint.md
  • docs/execplans/2-1-7-establish-a-ci-regression-detection-strategy.md
  • docs/execplans/2-2-1-cpu-distance-kernels-using-std-simd.md
  • docs/execplans/2-2-2-dense-point-view-for-aligned-structure-of-arrays.md
  • docs/execplans/2-2-4-optional-nightly-only-std-simd-backend.md
  • docs/execplans/2-2-5-portable-simd-gating-mechanics.md
  • docs/execplans/2-2-6-property-based-backend-parity-suite.md
  • docs/execplans/phase-1-nightly-slow-ci-job.md
  • docs/execplans/phase-1-property-test-ci-integration.md
  • docs/execplans/phase-1-validate-the-harvested-output.md
  • docs/execplans/phase-1-verus-proofs-for-edge-harvest-primitives.md
  • docs/execplans/replace-3-node-bidirectionality-harness-with-commit-path-harness.md
  • docs/property-testing-design.md
  • docs/reliable-testing-in-rust-via-dependency-injection.md
  • docs/rust-testing-with-rstest-fixtures.md
  • docs/users-guide.md
  • scripts/_vault_commands.py
  • scripts/run-verus.sh
  • scripts/tests/test_typos_rollout_check.py
  • scripts/typos_rollout_check.py
  • typos.local.toml
  • typos.toml

Comment thread docs/chutoro-design.md Outdated
Comment thread docs/execplans/phase-1-nightly-slow-ci-job.md Outdated
Comment thread Makefile
Comment thread scripts/tests/test_typos_rollout_check.py
Comment thread scripts/typos_rollout_check.py
Comment thread scripts/typos_rollout_check.py Outdated
Preserve the upstream hnswlib title, align the ExecPlan headings, and make
the consumer phrase scanner match Typos gitignore exclusions. Improve its
direct-use error and fixture setup while keeping Python 3.14 syntax and the
focused config-builder boundary intact.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Absence of Expected Change Pattern

  • chutoro/chutoro-core/src/hnsw/tests/property/strategies.rs is usually changed with: chutoro/chutoro-core/src/hnsw/tests/property/mod.rs

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@leynos

leynos commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant