Skip to content

Enforce Oxford spelling#74

Merged
leynos merged 1 commit into
mainfrom
typos-roll-out
Jul 10, 2026
Merged

Enforce Oxford spelling#74
leynos merged 1 commit into
mainfrom
typos-roll-out

Conversation

@leynos

@leynos leynos commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the shared Oxford spelling-policy helper and freshness-aware untracked base cache
  • generate the repository typos.toml from the shared dictionary plus a narrow local overlay
  • enforce pinned typos checks locally and in CI
  • correct all 52 genuine corpus findings while retaining documented local terms
  • repair the strict test lint surface and stale release binary target exposed by the full gates

Validation

  • make check-fmt
  • make lint
  • make typecheck
  • make test-workflow-contracts (6 passed)
  • make test (all targets and features passed)
  • make release
  • make markdownlint (shared helper: 15 passed, 90.94% coverage)
  • make nixie
  • mbake validate Makefile
  • actionlint .github/workflows/ci.yml
  • git diff --check

Scope note

The 27-file change exceeds the normal twelve-file tolerance because 52 required spelling corrections span 13 existing prose files, alongside the standard shared-policy integration files. The local overlay accepts only the HashiCorp proper name and the deliberate model term mis-predictions.

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

Add the shared spelling-policy helper, cached base dictionary, pinned typos gate, and CI integration. Correct all genuine corpus findings while retaining documented local terminology.\n\nRepair the strict test lint surface and stale release target exposed by the full repository gates.

@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 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

Summary

  • Added shared Oxford spelling-policy tooling that validates and merges dictionaries, generates deterministic typos.toml, and atomically writes configuration.
  • Added freshness-aware local/HTTPS base-dictionary caching with metadata, conditional requests, offline support, and validated stale-cache fallback.
  • Added repository-specific Typos exceptions for HashiCorp and mis-predictions, integrated spelling checks into the Makefile and CI, and documented contributor usage.
  • Corrected 52 corpus spelling findings across documentation and guidance files.
  • Improved test error propagation and added comprehensive rollout/cache tests covering validation, determinism, refresh behaviour, fallback handling, and Python 3.13 compatibility.
  • Refreshed development tooling configuration, including ignored caches and the default application target.

Validation

Formatting, linting, type checking, workflow contract tests, full tests, release, Markdown linting, Nixie, Makefile validation, actionlint, and whitespace checks pass.

Walkthrough

Introduces generated Typos configuration from shared and local dictionaries, adds cache refresh and fallback handling, wires spelling checks into Make and CI, updates repository documentation, and improves test error propagation.

Changes

Spelling policy rollout

Layer / File(s) Summary
Dictionary and cache refresh
scripts/typos_rollout.py, scripts/typos_rollout_cache.py
Adds validated dictionary handling, deterministic mappings, atomic writes, and local or HTTPS cache refresh behaviour.
Configuration generation and fallback
scripts/generate_typos_config.py, typos.local.toml, typos.toml
Loads shared and local rules, renders generated configuration, and reuses validated tracked configuration after HTTPS failures.
Rollout validation tests
scripts/tests/test_typos_rollout.py
Tests parsing, merging, rendering, cache freshness, HTTP validation, offline mode, metadata, and fallback statuses.
Spelling enforcement wiring
Makefile, .github/workflows/ci.yml, .gitignore, docs/developers-guide.md
Adds spelling targets, CI execution, cache ignores, and contributor instructions.
Repository spelling normalization
.rules/*, AGENTS.md, docs/*
Normalizes spelling and terminology across rules, guides, roadmaps, and design documents.
Test error propagation
tests/ambiguity_heuristic.rs, tests/lagc_args.rs
Replaces panic-based error handling with proptest failures and propagated Result errors.

Possibly related issues

  • leynos/stilyagi#57 — Adds parse-focused tests for generated typos.toml, matching this PR’s generator and configuration validation.

Poem

Words march neatly, rule by rule,
A cached dictionary keeps them cool.
Make and CI now check the flow,
While tests catch faults before they grow.
Typos flee beneath the moonlit glow.

✨ 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.

@leynos
leynos marked this pull request as ready for review July 10, 2026 16:13
@leynos
leynos merged commit 0507fa3 into main Jul 10, 2026
5 checks passed
@leynos
leynos deleted the typos-roll-out branch July 10, 2026 16:13

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 613524e341

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
Comment on lines +51 to +54
@$(UV_ENV) $(UV) run scripts/generate_typos_config.py
@git ls-files -z '*.md' | \
xargs -0 -r env $(UV_ENV) $(UV) tool run typos@$(TYPOS_VERSION) \
--config typos.toml --force-exclude

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail on generated spelling config drift

When a PR changes typos.local.toml or the shared dictionary advances, this target rewrites the tracked typos.toml and then immediately runs typos against that uncommitted output. Because the recipe never checks git diff --exit-code typos.toml after regeneration, CI can pass while the committed generated config remains stale, leaving fresh or offline checkouts to use a different spelling policy than the one CI validated.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 613524e341

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
Comment on lines +51 to +54
@$(UV_ENV) $(UV) run scripts/generate_typos_config.py
@git ls-files -z '*.md' | \
xargs -0 -r env $(UV_ENV) $(UV) tool run typos@$(TYPOS_VERSION) \
--config typos.toml --force-exclude

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail on generated spelling config drift

When a PR changes typos.local.toml or the shared dictionary advances, this target rewrites the tracked typos.toml and then immediately runs typos against that uncommitted output. Because the recipe never checks git diff --exit-code typos.toml after regeneration, CI can pass while the committed generated config remains stale, leaving fresh or offline checkouts to use a different spelling policy than the one CI validated.

Useful? React with 👍 / 👎.

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