Skip to content

Enforce en-GB-oxendict spelling in source (#249) - #259

Open
lodyai[bot] wants to merge 13 commits into
mainfrom
issue-249-decide-and-enforce-en-gb-oxendict-spelling-for-code-identifiers-not-just-prose
Open

Enforce en-GB-oxendict spelling in source (#249)#259
lodyai[bot] wants to merge 13 commits into
mainfrom
issue-249-decide-and-enforce-en-gb-oxendict-spelling-for-code-identifiers-not-just-prose

Conversation

@lodyai

@lodyai lodyai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This branch applies the repository's en-GB-oxendict policy to code identifiers
and source prose, closing the gap that allowed Python -ise identifiers to
drift without a failing gate. It normalizes the existing source corpus, widens
the pinned spelling check to tracked Markdown, Python and Rust files, and
records the policy and exception process in ADR-009.

Closes #249

ExecPlan: enforce-ize-identifiers.md

Review walkthrough

  • Start with Makefile and test_typos_rollout.py for configuration ordering, the widened pathspec and the real-target integration test.
  • Review typos.local.toml for bounded external-contract exceptions and typos.toml for the regenerated Markdown-specific code-span policy.
  • Inspect AGENTS.md, the developers' guide, ADR-009, and the Summary section of the design document for the governing rule and its architectural reference.
  • Finish with the mechanical identifier, source-prose and public-docstring corrections. GitHub's "artifacts" wire key, /artifacts URL and established --artifact-name option remain unchanged.

Validation

  • make check-fmt: passed.
  • make test: passed (774 Python tests, 47 skipped; 68 Rust tests).
  • make typecheck: passed.
  • make lint: passed, including 32 spelling-policy tests and the final Markdown, Python and Rust scan.
  • make markdownlint: passed.
  • make nixie: passed.
  • mbake validate Makefile: passed.
  • git diff --check: passed.
  • coderabbit review --agent: passed with zero findings.

Notes

All renamed identifiers are private, test-local or function-local. No public
API compatibility shim is required. docs/contents.md already used the
existing [adr-009] reference label after the rebase, so that stale finding
required no change.

References

Adoption update

Rebased onto origin/main (no conflicts) and addressed the outstanding review:

  • ADR renumbered to 009. #244 already claims
    docs/adr-008-rust-pump-observation-channel.md and is further along, so this
    decision takes the next free number. The file, docs/contents.md, the
    developers' guide, the design document, and the ExecPlan were updated together.
  • Fixed the Python 3.12 CI failure. The test_cli_help_and_missing_token_snapshot
    Syrupy transcript pinned argparse's line wrapping rather than the CLI's contract:
    CPython 3.12 wraps --artifact-name ARTEFACT_NAME across two usage lines where
    3.13 and 3.14 keep it whole. The snapshot is replaced by assertions on the help
    exit code, description, every option name and help sentence, the optional
    defaults, rejection of each omitted required option, and the exact missing-token
    message; the snapshot file and its wheel-manifest entry are deleted. The
    command-line surface tests moved into their own module to stay inside the
    400-line limit.
  • Spelling gate re-verified against main's corpus. The widened gate passes over
    the whole tree after the rebase; main introduced no new -ise violations. A
    seeded -ise identifier was confirmed to fail the gate, and its removal to
    restore green.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 835ebc81-06ec-4653-899e-4d23d89dd0a9

📥 Commits

Reviewing files that changed from the base of the PR and between cfdb65d and da02b0f.

📒 Files selected for processing (5)
  • benchmarks/fetch_main_benchmark_baseline.py
  • cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py
  • scripts/tests/test_typos_rollout.py
  • scripts/typos_rollout.py
  • typos.local.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Summary

Enforce the repository-wide en-GB-oxendict spelling policy across identifiers, source prose, comments, docstrings, fixtures, and tracked Markdown, Python, and Rust files.

  • Rename internal -ise identifiers to -ize, including benchmark helpers and test utilities.
  • Extend the pinned typos gate with documented exceptions for external contracts and deliberate fixtures.
  • Add ADR-009, update AGENTS.md and contributor documentation, and record the completed ExecPlan in docs/execplans/enforce-ize-identifiers.md.
  • Add regression tests for source scanning, exceptions, near-misses, backticks, and Makefile integration.
  • Replace the version-sensitive CLI help snapshot with semantic assertions.
  • Update related documentation, changelog entries, and execution-plan references.

Formatting, tests, type checking, linting, documentation checks, Makefile validation, and diff checks pass.

Walkthrough

The change standardizes repository spelling to en-GB-oxendict, extends the pinned typos gate to Markdown, Python, and Rust, renames internal -ise identifiers, and documents narrow spelling exceptions.

Changes

Oxford spelling enforcement

Layer / File(s) Summary
Policy, gate, and exception configuration
AGENTS.md, Makefile, typos*.toml, scripts/*, docs/*, CHANGELOG.md
The spelling policy now covers identifiers, comments, docstrings, prose, and tracked Markdown, Python, and Rust files. Generated configuration, documented exceptions, Makefile targets, ADRs, and rollout tests support the gate.
Artefact API and helper renames
benchmarks/fetch_main_benchmark_baseline.py, tests/helpers/maturin.py, tests/helpers/maturin_wheel.py, cuprum/unittests/*maturin*, cuprum/unittests/test_fetch_main_benchmark_baseline*
Benchmark baseline APIs, wheel helpers, tests, and CLI support use artefact terminology. The --artifact-name option remains unchanged.
Identifier and test-helper alignment
cuprum/_backend.py, cuprum/unittests/test_*, tests/helpers/maturin_wheel.py
Private identifiers, local variables, test names, helper names, and CrossHair references use -ize spellings.
Source and test prose corrections
benchmarks/*, cuprum/*, rust/*, tests/*
Comments, docstrings, headings, assertion messages, and module documentation use the selected spelling policy without changing runtime behaviour.

Possibly related PRs

Suggested labels: Issue

Suggested reviewers: leynos

Poem

Oxford words march in line,
Typos guard each source-file sign.
Artefacts keep their proper name,
Tests record the spelling game.
-ize and -yse now align.

🚥 Pre-merge checks | ✅ 19 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Testing (Property / Proof) ⚠️ Warning The PR adds generic Dictionary-to-TOML and source-gate invariants, but new tests use only fixed examples and parametrization; no Hypothesis or CrossHair property test was added. Add a Hypothesis property test over valid Dictionary contents and orderings. Assert deterministic parseable output, Markdown-only exception scoping, and preservation of every generated Oxford mapping.
✅ Passed checks (19 passed)
Check name Status Explanation
Title check ✅ Passed Keep the title: it states the main change and links issue #249.
Description check ✅ Passed Keep the description: it directly explains the spelling policy, enforcement, documentation, tests, and validation.
Linked Issues check ✅ Passed Accept the implementation: it satisfies issue #249 by renaming identifiers, widening the spelling gate, documenting exceptions, and adding regression tests.
Out of Scope Changes check ✅ Passed Keep the changes: the CLI tests, documentation, configuration, and benchmark terminology updates support the stated spelling-enforcement objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Testing (Overall) ✅ Passed New tests exercise the Makefile path expansion and ordering, real typos failures and scoped exceptions, renderer output, and CLI help, validation, failure, and extraction behaviour.
User-Facing Documentation ✅ Passed Pass this check: the PR changes contributor spelling enforcement and internal/test/CI names, not library user behaviour; AGENTS.md, the developers' guide, ADR-009, and CHANGELOG.md document the cha...
Developer Documentation ✅ Passed Accept the check: the developers' guide documents the pinned gate, source scope, regeneration, exceptions, and coverage; ADR-009 and the design reference record the decision; the ExecPlan is COMPLETE.
Module-Level Documentation ✅ Passed Accept: every tracked Python module has a module docstring, and each changed Rust module has //! documentation stating its purpose, use, and component relationship.
Testing (Unit And Behavioural) ✅ Passed Accept the check: tests cover Makefile ordering and all source types, pinned spelling failures and exceptions, CLI help/defaults/errors/success, archive traversal, retries, and redirects.
Testing (Compile-Time / Ui) ✅ Passed Accept this change: Rust changes are documentation-only, no TypeScript changes exist, and CLI/wheel output checks use focused semantic assertions and normalized snapshots.
Unit Architecture ✅ Passed Pass this check: keep the explicit split; render_typos_config is pure, writes and refreshes are named separately, Make targets expose sequencing, and benchmark query changes are mechanical renames.
Domain Architecture ✅ Passed Keep the change: core cuprum diffs only rename locals or update prose, while GitHub, filesystem, and spelling infrastructure remains in benchmarks/, scripts/, and Makefile boundaries.
Observability ✅ Passed Pass this check: the cumulative diff only renames symbols, stabilizes CLI help, and updates spelling tooling; network paths are unchanged and no logging, metrics, tracing, or alerts were added.
Security And Privacy ✅ Passed Accept this check: the PR adds no workflow or permission changes or credential material; it retains bounded token use, strips cross-origin auth, encodes query inputs, and rejects archive path trave...
Performance And Resource Use ✅ Passed Keep the change: functional additions are bounded spelling scans and tests; the 276-file, 2.56 MB scan is linear, while downloader retries and per-run queries are unchanged.
Concurrency And State ✅ Passed Accept this check: concurrency-sensitive edits are spelling or identifier renames; Make prerequisites order config before consumers, and the integration test asserts generation precedes scanning.
Architectural Complexity And Maintainability ✅ Passed Keep the change: it adds only a scoped Markdown renderer branch, explicit Make targets, and focused test seams; no new dependencies, cycles, or speculative framework appear.
Rust Compiler Lint Integrity ✅ Passed The branch changes only six Rust comment/doc lines; no Rust code, imports, module boundaries, lint allowances, artificial anchors, or clone calls changed. Existing expectations are narrow and justi...
📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #249

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-249-decide-and-enforce-en-gb-oxendict-spelling-for-code-identifiers-not-just-prose

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

@sourcery-ai

sourcery-ai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR widens the repository spelling gate to cover Markdown, Python, and Rust, normalizes internal spellings and identifiers to en-GB-oxendict (Oxford -ize/-yse) conventions, and documents the policy and exception workflow, including narrowly scoped ignores for external contracts and test fixtures.

Flow diagram for widened spelling gate and exception workflow

flowchart TD
    Dev[Run make spelling]
    Dev --> MSpelling[Makefile spelling recipe]

    MSpelling --> GenTypos[generate_typos_config.py]
    GenTypos --> SharedDict[Shared estate dictionary]
    GenTypos --> LocalOverlay[typos.local.toml]
    GenTypos --> TyposToml[Generated typos.toml]

    MSpelling --> TyposCheck[typos spelling check]
    TyposCheck --> Files[Tracked *.md, *.py, *.rs]

    LocalOverlay --> Ignores[patterns.ignore for external contracts and fixtures]
    Ignores --> TyposCheck
Loading

File-Level Changes

Change Details Files
Rename internal benchmark artefact helpers from American to British spelling while preserving external GitHub Actions contracts.
  • Rename ArtifactQuery to ArtefactQuery and artifact_* parameters/locals to artefact_* in the benchmark baseline fetch helper.
  • Update redirect handler, selection, extraction, and CLI functions to use artefact terminology, keeping the --artifact-name CLI flag and GitHub 'artifacts' wire keys unchanged.
  • Adjust unit tests to import the renamed artefact helpers, update helper names and docstrings, and keep fixtures aligned with the new identifiers.
benchmarks/fetch_main_benchmark_baseline.py
cuprum/unittests/test_fetch_main_benchmark_baseline.py
Extend the spelling gate to enforce en-GB-oxendict policy on Markdown, Python, and Rust files and add regression coverage for the Makefile recipe.
  • Change the Makefile spelling recipe to run typos against tracked *.md, *.py, and *.rs files and update its description to cover prose and source.
  • Add a test that parses the Makefile spelling target and asserts the three pathspec globs are present.
  • Update typos.local.toml and the generated typos.toml to add narrowly anchored ignore patterns for GitHub Actions artefact literals and deliberate spelling/byte-splitting fixtures.
Makefile
scripts/tests/test_typos_rollout.py
typos.local.toml
typos.toml
Document the source spelling policy, scope, and exception workflow, and record the architectural decision.
  • Expand the developers guide spelling policy to explicitly govern identifiers, comments, docstrings, fixtures, and prose across Markdown, Python, and Rust.
  • Clarify AGENTS.md to require en-GB-oxendict spelling for code and documentation, describe the source-wide typos gate, and explain how to add narrow exceptions in typos.local.toml.
  • Add ADR-008 and index it from contents.md and the developers guide to record the decision to enforce Oxford spelling in source, including consequences.
  • Add a Changed entry in CHANGELOG.md describing the widened source spelling enforcement.
docs/developers-guide.md
AGENTS.md
docs/adr-008-enforce-oxford-spelling-in-source.md
docs/contents.md
CHANGELOG.md
Normalize spelling across Python tests, helpers, and benchmarks to match en-GB-oxendict and improve consistency in comments, docstrings, and helper names.
  • Standardize spellings such as recognize/normalize/serialize/parameterize/behavior across unit tests, property-based tests, and behaviour tests while keeping external interface names intact.
  • Rename summarise_* helpers to summarize_* in folded summary tests and benchmarks, keeping public summarize_folded_file API stable.
  • Update maturin helpers and tests to use artefact spelling and normalize metadata/wheel entry helper names.
  • Adjust various comments and docstrings in core modules and adapters to use consistent American/British choices per policy (e.g., centralize, serialise vs serialize) without changing public APIs.
cuprum/unittests/test_line_splitting.py
cuprum/unittests/test_folded_summary.py
benchmarks/summarize_folded.py
tests/helpers/maturin.py
cuprum/unittests/test_maturin_build.py
cuprum/unittests/test_args_validators_property.py
cuprum/unittests/test_backend_resolver_property.py
cuprum/unittests/test_pipeline.py
cuprum/unittests/test_sh_property_based.py
cuprum/unittests/test_sh.py
benchmarks/_benchmark_type_validators.py
benchmarks/_benchmark_types.py
cuprum/_pipeline_config.py
cuprum/adapters/tracing_adapter.py
cuprum/builders/args.py
cuprum/sh.py
cuprum/unittests/test_rust_streams.py
cuprum/unittests/test_safe_cmd_stdin.py
cuprum/unittests/test_env_context.py
cuprum/unittests/test_profile_driver.py
cuprum/unittests/test_rust_splice.py
cuprum/unittests/test_safe_cmd_context.py
cuprum/unittests/test_safe_cmd_run.py
cuprum/unittests/test_stream_drain.py
cuprum/unittests/test_tee_profile_worker_core.py
cuprum/unittests/test_tee_profile_worker_concurrency.py
cuprum/unittests/test_tee_profile_worker_selector_metrics.py
cuprum/unittests/test_tracing_span_concurrency.py
benchmarks/tee_profile_worker.py
benchmarks/profile_tee_hotpath.py
benchmarks/sinks.py
benchmarks/tee_profile_driver.py
benchmarks/tee_profile_scenarios.py
cuprum/_pipeline_internals.py
cuprum/adapters/metrics_adapter.py
cuprum/context/registration.py
cuprum/unittests/_adapter_test_support.py
cuprum/unittests/_tee_profile_concurrency_support.py
cuprum/unittests/test_builder_property_based.py
cuprum/unittests/test_tracing_span_stateful.py
rust/cuprum-rust/src/splice/mod.rs
tests/behaviour/test_rust_streams_behaviour.py
tests/behaviour/test_telemetry_adapters.py
tests/helpers/execution.py
Add an ExecPlan describing the implementation plan, constraints, risks, and validation strategy for enforcing Oxford spelling in source identifiers.
  • Introduce enforce-ize-identifiers ExecPlan capturing milestones for identifier renames, source corpus cleanup, gate widening, documentation updates, and final publication.
  • Record constraints around public API stability, external contracts, generator usage, and gating order, plus progress and decision log entries tied to this branch.
  • Describe the validation stack and how the spelling regression test should fail before and succeed after the Makefile change.
docs/execplans/enforce-ize-identifiers.md

Assessment against linked issues

Issue Objective Addressed Explanation
#249 Rename the twelve internal Python identifiers using -ise spelling to their en-GB-oxendict -ize equivalents and keep all references consistent.
#249 Extend the spelling gate to check source files (at least *.py and *.rs) in addition to Markdown, and configure typos to handle necessary external-API spelling exceptions.
#249 Update contributor documentation (AGENTS.md and related docs) to explicitly state that en-GB-oxendict spelling applies to code identifiers as well as comments and prose, and describe the widened scope and exception process.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

lodyai Bot pushed a commit that referenced this pull request Jul 30, 2026
Link the Unreleased changelog entry to draft PR #259 and close the living
ExecPlan with final validation, review, branch, and publication evidence.
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review July 30, 2026 22:27

@sourcery-ai sourcery-ai 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.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@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: eed2e13566

ℹ️ 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 docs/adr-008-enforce-oxford-spelling-in-source.md Outdated
@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
✅ 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 coderabbitai Bot added the Issue label Jul 31, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 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 `@cuprum/_pipeline_internals.py`:
- Line 7: Update the module docstring near the ``CommandResult`` assembly
description to use the repository-required “centralize” spelling instead of
“centralise”; leave the surrounding wording unchanged.

In `@docs/developers-guide.md`:
- Around line 1303-1304: Update the exception sentence in the documentation near
the existing docstrings, string fixtures, and prose guidance to match ADR-008:
exempt spellings required by external contracts and deliberate spelling-test
fixtures, rather than limiting exemptions to external APIs.

In `@scripts/tests/test_typos_rollout.py`:
- Line 32: Add diagnostic messages to the new assertions in the test covering
spelling targets and Oxford correction mappings. Update the assertion involving
spelling_recipe and the assertion involving mappings["organize"] to use the
Python assert message form, preserving the proposed failure-context messages and
existing conditions.
🪄 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: d764fa9d-7f15-40f1-bdf6-6d1d35d40253

📥 Commits

Reviewing files that changed from the base of the PR and between 682ffd6 and eed2e13.

📒 Files selected for processing (57)
  • AGENTS.md
  • CHANGELOG.md
  • Makefile
  • benchmarks/_benchmark_type_validators.py
  • benchmarks/_benchmark_types.py
  • benchmarks/fetch_main_benchmark_baseline.py
  • benchmarks/profile_tee_hotpath.py
  • benchmarks/sinks.py
  • benchmarks/summarize_folded.py
  • benchmarks/tee_profile_driver.py
  • benchmarks/tee_profile_scenarios.py
  • benchmarks/tee_profile_worker.py
  • cuprum/_backend.py
  • cuprum/_pipeline_config.py
  • cuprum/_pipeline_internals.py
  • cuprum/adapters/metrics_adapter.py
  • cuprum/adapters/tracing_adapter.py
  • cuprum/builders/args.py
  • cuprum/context/registration.py
  • cuprum/sh.py
  • cuprum/unittests/_adapter_test_support.py
  • cuprum/unittests/_tee_profile_concurrency_support.py
  • cuprum/unittests/test_args_validators_property.py
  • cuprum/unittests/test_backend_resolver_property.py
  • cuprum/unittests/test_builder_property_based.py
  • cuprum/unittests/test_env_context.py
  • cuprum/unittests/test_fetch_main_benchmark_baseline.py
  • cuprum/unittests/test_folded_summary.py
  • cuprum/unittests/test_line_splitting.py
  • cuprum/unittests/test_maturin_build.py
  • cuprum/unittests/test_pipeline.py
  • cuprum/unittests/test_profile_driver.py
  • cuprum/unittests/test_rust_splice.py
  • cuprum/unittests/test_rust_streams.py
  • cuprum/unittests/test_safe_cmd_context.py
  • cuprum/unittests/test_safe_cmd_run.py
  • cuprum/unittests/test_safe_cmd_stdin.py
  • cuprum/unittests/test_sh.py
  • cuprum/unittests/test_sh_property_based.py
  • cuprum/unittests/test_stream_drain.py
  • cuprum/unittests/test_tee_profile_worker_concurrency.py
  • cuprum/unittests/test_tee_profile_worker_core.py
  • cuprum/unittests/test_tee_profile_worker_selector_metrics.py
  • cuprum/unittests/test_tracing_span_concurrency.py
  • cuprum/unittests/test_tracing_span_stateful.py
  • docs/adr-008-enforce-oxford-spelling-in-source.md
  • docs/contents.md
  • docs/developers-guide.md
  • docs/execplans/enforce-ize-identifiers.md
  • rust/cuprum-rust/src/splice/mod.rs
  • scripts/tests/test_typos_rollout.py
  • tests/behaviour/test_rust_streams_behaviour.py
  • tests/behaviour/test_telemetry_adapters.py
  • tests/helpers/execution.py
  • tests/helpers/maturin.py
  • typos.local.toml
  • typos.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Comment thread cuprum/_pipeline_internals.py
Comment thread docs/developers-guide.md Outdated
Comment thread scripts/tests/test_typos_rollout.py Outdated
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
✅ 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 coderabbitai 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.

Actionable comments posted: 7

🤖 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 `@benchmarks/fetch_main_benchmark_baseline.py`:
- Around line 42-49: Expand the public NumPy-style docstrings at
benchmarks/fetch_main_benchmark_baseline.py:42-49 for ArtefactQuery, documenting
every query field and api_base_url; at
benchmarks/fetch_main_benchmark_baseline.py:210-216, document payload inputs,
selection order, and the None result; at
benchmarks/fetch_main_benchmark_baseline.py:247-252, document extraction results
and archive failure conditions; at
benchmarks/fetch_main_benchmark_baseline.py:270-275, document query, token,
result, and GitHub-response validation failures; and at
benchmarks/fetch_main_benchmark_baseline.py:357-358, document CLI arguments,
exit codes, and token-failure behavior. Also expand the public helper docstring
at tests/helpers/maturin.py:221-232 to document root, out_dir, the wheel result,
and include a useful example call, adding appropriate Parameters, Returns, and
Raises sections where applicable.

In `@docs/contents.md`:
- Around line 42-43: Update the ADR-008 entry in docs/contents.md to use the
existing [adr-008] reference label instead of an inline destination, ensuring it
reuses the single link definition already declared later in the document and
matches the surrounding reference-style entries.

In `@docs/developers-guide.md`:
- Around line 1306-1310: Update the documentation’s “shared estate dictionary”
wording to use the generator’s established terminology: shared/base
en-GB-oxendict dictionary and local cache. Keep the description aligned with the
implementation’s refresh and merge behavior.

In `@Makefile`:
- Around line 129-132: Update the Makefile spelling targets so configuration
generation is a shared prerequisite that runs before both spelling-helper-test
and the final scan. Ensure _run_spelling_gate and the commands under spelling
use the freshly generated typos.toml, and add or update relevant tests to verify
generation precedes validation.

In `@scripts/tests/test_typos_rollout.py`:
- Around line 79-91: Extend test_spelling_gate_preserves_documented_exceptions
with parameterized fixtures covering every local spelling-gate exception: the
/artifacts path, teh and ises fixture pairs, and the byte-splitting case. Feed
each fixture through _run_spelling_gate and assert success, while retaining
existing coverage for --artifact-name, artifacts, and mappings["organise"].

In `@typos.local.toml`:
- Around line 14-18: Update the typos.local.toml exceptions for "artifacts",
/artifacts, and --artifact-name to use boundaries that match only the intended
external API or CLI literals, not longer repository-owned values. Add near-miss
cases covering longer values to scripts/tests/test_typos_rollout.py, then
regenerate typos.toml from the updated configuration.

In `@typos.toml`:
- Line 34: Move the fenced-code and inline-code ignore patterns from
[default].extend-ignore-re into [type.markdown] so they apply only to Markdown
scanning, updating the generator or typos.local.toml as the source of truth and
regenerating typos.toml. Add fixtures verifying backtick-wrapped “organise” is
rejected in both Python and Rust files.
🪄 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: a2cb2f5e-44d5-4b0e-b501-1b657212ea41

📥 Commits

Reviewing files that changed from the base of the PR and between 682ffd6 and 7743a0b.

📒 Files selected for processing (58)
  • AGENTS.md
  • CHANGELOG.md
  • Makefile
  • benchmarks/_benchmark_type_validators.py
  • benchmarks/_benchmark_types.py
  • benchmarks/fetch_main_benchmark_baseline.py
  • benchmarks/profile_tee_hotpath.py
  • benchmarks/sinks.py
  • benchmarks/summarize_folded.py
  • benchmarks/tee_profile_driver.py
  • benchmarks/tee_profile_scenarios.py
  • benchmarks/tee_profile_worker.py
  • cuprum/_backend.py
  • cuprum/_pipeline_config.py
  • cuprum/_pipeline_internals.py
  • cuprum/adapters/metrics_adapter.py
  • cuprum/adapters/tracing_adapter.py
  • cuprum/builders/args.py
  • cuprum/context/registration.py
  • cuprum/sh.py
  • cuprum/unittests/__snapshots__/test_fetch_main_benchmark_baseline.ambr
  • cuprum/unittests/_adapter_test_support.py
  • cuprum/unittests/_tee_profile_concurrency_support.py
  • cuprum/unittests/test_args_validators_property.py
  • cuprum/unittests/test_backend_resolver_property.py
  • cuprum/unittests/test_builder_property_based.py
  • cuprum/unittests/test_env_context.py
  • cuprum/unittests/test_fetch_main_benchmark_baseline.py
  • cuprum/unittests/test_folded_summary.py
  • cuprum/unittests/test_line_splitting.py
  • cuprum/unittests/test_maturin_build.py
  • cuprum/unittests/test_pipeline.py
  • cuprum/unittests/test_profile_driver.py
  • cuprum/unittests/test_rust_splice.py
  • cuprum/unittests/test_rust_streams.py
  • cuprum/unittests/test_safe_cmd_context.py
  • cuprum/unittests/test_safe_cmd_run.py
  • cuprum/unittests/test_safe_cmd_stdin.py
  • cuprum/unittests/test_sh.py
  • cuprum/unittests/test_sh_property_based.py
  • cuprum/unittests/test_stream_drain.py
  • cuprum/unittests/test_tee_profile_worker_concurrency.py
  • cuprum/unittests/test_tee_profile_worker_core.py
  • cuprum/unittests/test_tee_profile_worker_selector_metrics.py
  • cuprum/unittests/test_tracing_span_concurrency.py
  • cuprum/unittests/test_tracing_span_stateful.py
  • docs/adr-008-enforce-oxford-spelling-in-source.md
  • docs/contents.md
  • docs/developers-guide.md
  • docs/execplans/enforce-ize-identifiers.md
  • rust/cuprum-rust/src/splice/mod.rs
  • scripts/tests/test_typos_rollout.py
  • tests/behaviour/test_rust_streams_behaviour.py
  • tests/behaviour/test_telemetry_adapters.py
  • tests/helpers/execution.py
  • tests/helpers/maturin.py
  • typos.local.toml
  • typos.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Comment thread benchmarks/fetch_main_benchmark_baseline.py
Comment thread docs/contents.md Outdated
Comment thread docs/developers-guide.md Outdated
Comment thread Makefile Outdated
Comment thread scripts/tests/test_typos_rollout.py Outdated
Comment thread typos.local.toml Outdated
Comment thread typos.toml Outdated
lodyai Bot pushed a commit that referenced this pull request Aug 2, 2026
Link the Unreleased changelog entry to draft PR #259 and close the living
ExecPlan with final validation, review, branch, and publication evidence.
@lodyai
lodyai Bot force-pushed the issue-249-decide-and-enforce-en-gb-oxendict-spelling-for-code-identifiers-not-just-prose branch from 7743a0b to 9a4851f Compare August 2, 2026 12:00
codescene-access[bot]

This comment was marked as outdated.

lodyai Bot pushed a commit that referenced this pull request Aug 4, 2026
Link the Unreleased changelog entry to draft PR #259 and close the living
ExecPlan with final validation, review, branch, and publication evidence.
@lodyai
lodyai Bot force-pushed the issue-249-decide-and-enforce-en-gb-oxendict-spelling-for-code-identifiers-not-just-prose branch from 9a4851f to a71b7d5 Compare August 4, 2026 19:00
codescene-access[bot]

This comment was marked as outdated.

@leynos

leynos commented Aug 4, 2026

Copy link
Copy Markdown
Owner

@coderabbitai Please investigate the cause of the following issue using codegraph exploration and research, identify a fix and provide an AI coding agent prompt for the fix:

=================================== FAILURES ===================================
___________________ test_cli_help_and_missing_token_snapshot ___________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f0190e514f0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0190e51d90>
snapshot = dict({
  'help': list([
    'usage: fetch_main_benchmark_baseline.py [-h] --repository REPOSITORY',
    '             ...containing the GitHub token.',
  ]),
  'missing_token': 'missing GitHub token in environment variable GITHUB_TOKEN',
})
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_cli_help_and_missing_toke0')

    def test_cli_help_and_missing_token_snapshot(
        capsys: pytest.CaptureFixture[str],
        monkeypatch: pytest.MonkeyPatch,
        snapshot: SnapshotAssertion,
        tmp_path: pth.Path,
    ) -> None:
        """CLI help and token errors retain their user-facing contract."""
        monkeypatch.setattr(sys, "argv", ["fetch_main_benchmark_baseline.py"])
        with pytest.raises(SystemExit) as help_exit:
            main(["--help"])
        help_text = capsys.readouterr().out
        monkeypatch.delenv("GITHUB_TOKEN", raising=False)
        with pytest.raises(SystemExit) as token_exit:
            main(_main_cli_args(tmp_path))
        token_error = str(token_exit.value)
    
        assert help_exit.value.code == 0
        assert "--artifact-name" in help_text
        assert "Artefact name to download" in help_text
        assert "missing GitHub token" in token_error
>       assert {"help": help_text.splitlines(), "missing_token": token_error} == snapshot
E       AssertionError: assert [+ received] == [- snapshot]
E           dict({
E             ...
E               'usage: fetch_main_benchmark_baseline.py [-h] --repository REPOSITORY',
E         -     '                                        --workflow WORKFLOW',
E         +     '                                        --workflow WORKFLOW --artifact-name',
E         -     '                                        --artifact-name ARTEFACT_NAME',
E         -     '                                        --output-dir OUTPUT_DIR',
E         +     '                                        ARTEFACT_NAME --output-dir OUTPUT_DIR',
E               '                                        [--branch BRANCH] [--event EVENT]',
E             ...
E           })

cuprum/unittests/test_fetch_main_benchmark_baseline.py:209: AssertionError
--------------------------- snapshot report summary ----------------------------
1 snapshot failed. 14 snapshots passed.
=========================== short test summary info ============================
FAILED cuprum/unittests/test_fetch_main_benchmark_baseline.py::test_cli_help_and_missing_token_snapshot - AssertionError: assert [+ received] == [- snapshot]
    dict({
      ...
        'usage: fetch_main_benchmark_baseline.py [-h] --repository REPOSITORY',
  -     '                                        --workflow WORKFLOW',
  +     '                                        --workflow WORKFLOW --artifact-name',
  -     '                                        --artifact-name ARTEFACT_NAME',
  -     '                                        --output-dir OUTPUT_DIR',
  +     '                                        ARTEFACT_NAME --output-dir OUTPUT_DIR',
        '                                        [--branch BRANCH] [--event EVENT]',
      ...
    })
============= 1 failed, 817 passed, 52 skipped in 86.36s (0:01:26) =============
make: *** [Makefile:199: test] Error 1

@coderabbitai

This comment was marked as resolved.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
✅ 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.

leynos and others added 8 commits August 6, 2026 19:05
Make identifiers, comments, docstrings, fixtures, and prose explicit parts
of the en-GB-oxendict policy while retaining narrowly documented external
contract exceptions.

Record the decision in ADR-008, index it for maintainers, and note the new
contributor-facing source gate in the Unreleased changelog.
Link the Unreleased changelog entry to draft PR #259 and close the living
ExecPlan with final validation, review, branch, and publication evidence.
Align the documented exception scope with ADR-008 and add actionable
failure context to the spelling-policy regression assertions.
Exercise the configured spelling scanner across Markdown, Python, and Rust
fixtures, including the documented external-contract exceptions. Snapshot
the benchmark baseline CLI help and token error while retaining semantic
assertions for the stable option and Oxford wording.
Exercise the real Make spelling target, generate configuration before all
consumers, and keep Markdown code ignores scoped to Markdown. Tighten local
contract exceptions and cover their accepted and near-miss forms.

Document ADR-008 in the design, complete the affected public docstrings,
and preserve `main`'s maturin test refactor while applying the source
spelling policy.
Update newly added upstream prose to satisfy the widened source spelling
gate and keep the Maturin helper reference aligned with its renamed symbol.
ADR-008 is already claimed by the Rust pump observation channel decision
in an older, further-advanced pull request. Take the next free number so
the two can land in either order without a filename collision.

Updates the contents index, the developers' guide, the design document,
and the ExecPlan alongside the file rename.
The stored Syrupy transcript pinned argparse's line wrapping, not the
CLI's contract. CPython 3.12 wraps `--artifact-name ARTEFACT_NAME` across
two usage lines where 3.13 and 3.14 keep it whole, so the snapshot failed
the 3.12 job while every other version passed.

Replace it with assertions on what the interface actually promises: the
help exit code, the description, every option name and its help sentence,
the optional-argument defaults, rejection of each required option when
omitted, and the exact missing-token message. Whitespace is collapsed
before matching so rewrapping cannot break the assertions again.

Move the command-line surface tests into their own module, with the
shared argument builder in a support module, keeping both files inside
the 400-line limit.
@lodyai
lodyai Bot force-pushed the issue-249-decide-and-enforce-en-gb-oxendict-spelling-for-code-identifiers-not-just-prose branch from a71b7d5 to a4032ce Compare August 6, 2026 17:19
codescene-access[bot]

This comment was marked as outdated.

`test_cli_help_documents_every_option` now asserts that the usage text
identifies `fetch_main_benchmark_baseline.py`. Patching `sys.argv` no
longer achieves that: Python 3.14 derives argparse's default prog from
the actual invocation, so under `python -m pytest` the usage line read
`python3 -m pytest`. The parser now pins `prog` explicitly — the tool's
name is part of its contract in a way the wrapping never was — and the
redundant argv patch and its `sys` import are gone. Verified 9/9 on
3.12, 3.13, and 3.14.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
codescene-access[bot]

This comment was marked as outdated.

lodyai Bot pushed a commit that referenced this pull request Aug 6, 2026
`test_adapter_fail_fast` and `test_tracing_span_concurrency` used the -ise
forms in module docstrings, method docstrings, and comments, which the
en-GB-oxendict house rule spells -ize; `test_pipeline_wait_state_machine`
had the same in "initialises".

`test_an_unrecognised_phase_still_raises` is renamed with them. The rule
that preserves existing -ise identifiers exists to protect names other code
depends on, and this one has no consumers at all: it is a test method, named
nowhere but its own definition. Leaving it would plant a fresh counterexample
just as PR #259 lands the identifier policy.
@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
✅ 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

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai 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.

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 `@benchmarks/fetch_main_benchmark_baseline.py`:
- Line 1: Expand the module docstring in fetch_main_benchmark_baseline.py to
explain the script’s purpose, utility, GitHub Actions boundary, and usage, while
preserving its required leading triple-quoted form. Update the argparse
configuration separately so its existing short CLI description remains unchanged
and is no longer derived from __doc__.

In `@cuprum/adapters/tracing_adapter.py`:
- Line 277: Replace the British spelling “serialise” with “serialize” in the
lifecycle comments at both changed locations, keeping the set_status/end wording
aligned with the repository’s -ize spelling policy.

In `@cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py`:
- Around line 54-61: All newly added bare assertions in
test_fetch_main_benchmark_baseline_cli.py, including the help-output checks and
the additional referenced assertion blocks, need diagnostic messages. Update
each assert to use the assert condition, "message" form, with concise context
identifying the failed expectation.

In `@scripts/tests/test_typos_rollout.py`:
- Around line 361-368: Add descriptive messages to each assertion in the
rendered_config checks, including the expected scope and value for locale,
extend-ignore-re, extend-glob, and the markdown ignore patterns. Use the
required assert expression with a comma-separated message for every assertion,
preserving the existing expectations.

In `@scripts/typos_rollout.py`:
- Around line 164-175: Expand the docstring for the public function
render_typos_config with NumPy-style Parameters, Returns, and Raises sections.
Document the Dictionary input, rendered typos.toml string, possible exceptions,
and that ignore_patterns are partitioned into global patterns versus
Markdown-only patterns based on _MARKDOWN_IGNORE_PATTERNS.
- Around line 187-189: The Markdown configuration in
scripts/typos_rollout.py:187-189 requires corresponding end-to-end fixtures in
scripts/tests/test_typos_rollout.py:194-213. Add .md fixtures under the
[type.markdown] patterns covering inline code spans and fenced blocks containing
-ise forms, while retaining the existing Python and Rust backtick rejection
cases.
🪄 Autofix

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: 826c7486-b5de-44b2-85f0-819ae3098233

📥 Commits

Reviewing files that changed from the base of the PR and between 7f6ec92 and cfdb65d.

📒 Files selected for processing (66)
  • AGENTS.md
  • CHANGELOG.md
  • Makefile
  • benchmarks/_benchmark_type_validators.py
  • benchmarks/_benchmark_types.py
  • benchmarks/fetch_main_benchmark_baseline.py
  • benchmarks/profile_tee_hotpath.py
  • benchmarks/sinks.py
  • benchmarks/summarize_folded.py
  • benchmarks/tee_profile_driver.py
  • benchmarks/tee_profile_scenarios.py
  • benchmarks/tee_profile_worker.py
  • cuprum/_backend.py
  • cuprum/_pipeline_config.py
  • cuprum/_pipeline_internals.py
  • cuprum/adapters/metrics_adapter.py
  • cuprum/adapters/tracing_adapter.py
  • cuprum/builders/args.py
  • cuprum/context/registration.py
  • cuprum/sh.py
  • cuprum/unittests/__snapshots__/test_maturin_build.ambr
  • cuprum/unittests/_adapter_test_support.py
  • cuprum/unittests/_fetch_baseline_cli_support.py
  • cuprum/unittests/_tee_profile_concurrency_support.py
  • cuprum/unittests/test_args_validators_property.py
  • cuprum/unittests/test_backend_resolver_property.py
  • cuprum/unittests/test_builder_property_based.py
  • cuprum/unittests/test_env_context.py
  • cuprum/unittests/test_fetch_main_benchmark_baseline.py
  • cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py
  • cuprum/unittests/test_folded_summary.py
  • cuprum/unittests/test_line_splitting.py
  • cuprum/unittests/test_maturin_build.py
  • cuprum/unittests/test_maturin_pins.py
  • cuprum/unittests/test_pipeline.py
  • cuprum/unittests/test_profile_driver.py
  • cuprum/unittests/test_rust_splice.py
  • cuprum/unittests/test_rust_streams.py
  • cuprum/unittests/test_safe_cmd_context.py
  • cuprum/unittests/test_safe_cmd_run.py
  • cuprum/unittests/test_safe_cmd_stdin.py
  • cuprum/unittests/test_sh.py
  • cuprum/unittests/test_sh_property_based.py
  • cuprum/unittests/test_stream_drain.py
  • cuprum/unittests/test_tee_profile_worker_concurrency.py
  • cuprum/unittests/test_tee_profile_worker_core.py
  • cuprum/unittests/test_tee_profile_worker_selector_metrics.py
  • cuprum/unittests/test_tracing_span_concurrency.py
  • cuprum/unittests/test_tracing_span_stateful.py
  • docs/adr-009-enforce-oxford-spelling-in-source.md
  • docs/contents.md
  • docs/cuprum-design.md
  • docs/developers-guide.md
  • docs/execplans/enforce-ize-identifiers.md
  • rust/cuprum-rust/src/consume_snapshot_tests.rs
  • rust/cuprum-rust/src/errors.rs
  • rust/cuprum-rust/src/splice/mod.rs
  • scripts/tests/test_typos_rollout.py
  • scripts/typos_rollout.py
  • tests/behaviour/test_rust_streams_behaviour.py
  • tests/behaviour/test_telemetry_adapters.py
  • tests/helpers/execution.py
  • tests/helpers/maturin.py
  • tests/helpers/maturin_wheel.py
  • typos.local.toml
  • typos.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Comment thread benchmarks/fetch_main_benchmark_baseline.py Outdated
Comment thread cuprum/adapters/tracing_adapter.py
Comment thread cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py Outdated
Comment thread scripts/tests/test_typos_rollout.py Outdated
Comment thread scripts/typos_rollout.py
Comment thread scripts/typos_rollout.py
`make spelling` regenerates `typos.toml` from the shared base plus
`typos.local.toml`, but the inline-code-span exemption lived only in the
generated file — hand-edited in, so every regeneration deleted it and
three backtick-quoted identifiers (`artifact`, `color`) failed the gate
on a clean checkout. The pattern now lives in the overlay's
`[patterns] ignore`, which the generator merges and preserves. Verified
non-vacuous: a seeded violation outside a code span still fails the
gate.

Closes #294.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

Address the review findings on the spelling-policy branch.

`benchmarks/fetch_main_benchmark_baseline.py` derived its argparse
description from `__doc__`, so any documentation the module needed would
have landed in `--help`. Give the parser its own short description
literal, then expand the module docstring with the script's purpose, the
`benchmark-ratchet` CI boundary that is its only caller, the meaning of
exit code 3, and a usage example. `--help` is unchanged.

`render_typos_config` is public but carried a one-line docstring. Give it
Parameters, Returns and Raises sections, and state the partition it
performs: patterns in `_MARKDOWN_IGNORE_PATTERNS` describe Markdown
syntax and are emitted under `[type.markdown]` so they exempt only `*.md`,
while every other pattern stays global.

The inline-code exemption restored in #294 had no end-to-end cover. Add
two cases to `test_spelling_gate_preserves_documented_exceptions` that
run the real pinned scanner over `.md` fixtures: an `-ise` term in an
inline code span, and one in a fenced block. Both must pass the gate,
while plain `.md` prose stays gated by the existing detection test.

Give the remaining bare assertions in both touched test modules the
diagnostic messages the test-path rule requires.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
codescene-access[bot]

This comment was marked as outdated.

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

No quality gates enabled for this code.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai Both pre-merge warnings are answerable without code changes. Evidence gathered against the current head da02b0fb.

1. Linked Issues — non-compliant centralise / serialise in source documentation

Not reproducible on the tree. A case-insensitive sweep of every tracked file on the branch for centralis|serialis|normalis|summaris returns exactly two classes of hit:

  • typos.toml — 45 matching lines (18 centralis*, 27 serialis*), every one a correction-table entry: "centralise" = "centralize", "serialise" = "serialize", plus inflections. That file is the ban. A correction table has to spell the forbidden form on the left-hand side in order to forbid it, exactly as a linter's rule-name string has to contain the thing it bans. It is generated by scripts/generate_typos_config.py from typos.local.toml and is never hand-edited (AGENTS.md, Markdown guidance).

  • docs/execplans/enforce-ize-identifiers.md:25 — the line reads:

    Do not globally accept `normalise`, `serialise`, `summarise`, or related `-ise` terms because that would disable identifier enforcement.

    Every token sits inside a backtick span, in the constraints section of the ExecPlan whose whole subject is banning those forms. That exemption is not an oversight, it is encoded policy: typos.local.toml carries the inline-code-span pattern '`[^`\n]+`' with its rationale beside it.

Counting precisely: centralise appears nowhere on this branch outside typos.toml. serialise appears exactly once outside typos.toml, at the backticked ExecPlan line above. git grep -l -i -E 'centralis|serialis' -- . ':!typos.toml' returns a single file.

The PR description is clean too. I re-read it via gh pr view 259 --json body and grepped for -ise forms: zero matches.

Likely mechanism: pre-merge checks evaluate against the review's commit_id, and this one looks to be re-reading its own generated walkthrough summary rather than the current tree — a pattern that has recurred on this repository. If you can cite a file and line on da02b0fb that I have missed, I will fix it straight away.

2. Out of Scope Changes — benchmark-baseline CLI test module, shared fixtures, wheel snapshot

These are downstream consequences of the enforcement and of a CI failure this PR created and had to clear. The chain, verified against git log and git diff:

  1. The widened gate forced the rename. Commit 6759f6bd extended the spelling target from *.md to all tracked Python and Rust. That is the second bullet of Decide and enforce en-GB-oxendict spelling for code identifiers, not just prose #249's own remediation list, which explicitly warns that "an initial pass [will] surface unrelated findings". cuprum/unittests/test_fetch_main_benchmark_baseline.py sits precisely on the artifact/artefact boundary and took 102 lines of change in that commit: extract_artifact_archiveextract_artefact_archive, find_latest_artifact_download_urlfind_latest_artefact_download_url, _artifacts_payload_artefacts_payload. The GitHub Actions wire vocabulary ("artifacts", --artifact-name) stays American and is anchored as a documented external contract in typos.local.toml. That split — British in our identifiers, American at the API boundary — is exactly what needed test cover.

  2. Covering that boundary introduced a snapshot, and the snapshot broke CI. Commit e149f1b4 snapshotted the CLI's --help to pin the Oxford wording next to the retained --artifact-name option. It was not a pre-existing snapshot; this PR added it, and it was the wrong instrument. argparse rewraps its usage line across interpreter versions: CPython 3.12 splits --artifact-name ARTEFACT_NAME across two usage lines where 3.13 and 3.14 keep it whole. On a71b7d5b, Typecheck and test (Python 3.12) was the only failing job in the run — the snapshot pinned argparse's line wrapping rather than the CLI's contract.

  3. The fix produced the flagged files. a4032ce2 deleted the transcript snapshot and replaced it with assertions on what the interface actually promises: help exit code, description, every option name and help sentence, optional-argument defaults, rejection of each omitted required option, and the exact missing-token message, with whitespace collapsed so rewrapping cannot break it again. Doing that inside test_fetch_main_benchmark_baseline.py would have pushed it past the 400-line cap in AGENTS.md, so the command-line surface moved to test_fetch_main_benchmark_baseline_cli.py and the shared argument builder to _fetch_baseline_cli_support.py (24 lines). cfdb65d6 then pinned prog explicitly, because Python 3.14 derives argparse's default prog from the actual invocation and the usage line read python3 -m pytest.

  4. The wheel snapshot moved automatically. The entire test_maturin_build.ambr diff is two added lines, listing those two new files in the wheel manifest, because both landed under cuprum/. Regenerating it is mandatory for the manifest test to pass; it is bookkeeping, not scope.

Scope, stated plainly: #249 covers step 1 directly — widening the gate to *.py/*.rs is verbatim in the issue, and the issue anticipates the collateral renames. It does not mention CLI tests. Steps 2 to 4 are justified not by the issue text but by the Typecheck and test (Python 3.12) failure this PR had to fix, plus the 400-line and Markdown-lint rules in AGENTS.md. Reverting them would leave the branch red. I have not treated anything here as optional polish, and I would rather name the real justification than stretch the issue to cover it.

Outcome

No tracked file changed in response to these two warnings, so no gates were re-run. Head remains da02b0fb.

One unrelated red worth noting: benchmark-ratchet currently fails with worst_regression_ratio=0.314733, max_regression=0.300000 — a 5% overshoot of the threshold on a timing gate, from a branch that changes no runtime code path beyond a docstring and an argparse prog. That reads as runner noise rather than a regression this PR introduced. Typecheck and test (Python 3.15a) is the known environmental red fixed by #293.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- current head ---'
git rev-parse --short HEAD
git status --short

printf '%s\n' '--- spelling occurrences outside generated configuration ---'
git grep -n -i -E 'centralis|serialis|normalis|summaris' -- . ':!typos.toml' || true

printf '%s\n' '--- generated spelling configuration provenance ---'
rg -n -C 3 -P 'generate_typos_config|typos\.toml|never hand|generated' \
  AGENTS.md docs scripts typos.local.toml Makefile || true

printf '%s\n' '--- relevant file structure ---'
ast-grep outline cuprum/unittests/test_fetch_main_benchmark_baseline.py --items all
ast-grep outline cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py --items all
ast-grep outline cuprum/unittests/_fetch_baseline_cli_support.py --items all
ast-grep outline tests/helpers/maturin.py --items all

printf '%s\n' '--- rename, CLI coverage, and wheel-manifest references ---'
rg -n -C 3 -P 'artefact|artifact|fetch_main_benchmark_baseline|build_native_wheel_artefact' \
  benchmarks/fetch_main_benchmark_baseline.py \
  cuprum/unittests/test_fetch_main_benchmark_baseline.py \
  cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py \
  cuprum/unittests/_fetch_baseline_cli_support.py \
  cuprum/unittests/test_maturin_build.py \
  cuprum/unittests/__snapshots__/test_maturin_build.ambr \
  tests/helpers/maturin.py

printf '%s\n' '--- relevant commits ---'
git log --oneline --decorate -20 -- \
  Makefile scripts/tests/test_typos_rollout.py \
  benchmarks/fetch_main_benchmark_baseline.py \
  cuprum/unittests/test_fetch_main_benchmark_baseline.py \
  cuprum/unittests/test_fetch_main_benchmark_baseline_cli.py \
  cuprum/unittests/_fetch_baseline_cli_support.py \
  cuprum/unittests/__snapshots__/test_maturin_build.ambr

Length of output: 94109


@pandalump

Withdraw both pre-merge warnings.

The spelling warning does not apply to current head da02b0f. The only match outside generated typos.toml is docs/execplans/enforce-ize-identifiers.md Line 25. It documents forbidden spellings inside Markdown code spans. The generated configuration and the scoped-exception process support this use.

Treat the benchmark-baseline CLI files as in scope. The widened spelling gate required the internal artefact renames. The CLI tests then replaced an interpreter-dependent argparse help snapshot with semantic contract assertions. The shared support module keeps the test module within the repository size limit. The wheel snapshot correctly records the added package files.

Static inspection confirms the dependency chain. I did not run tests in this environment.


✏️ Learnings added
Learnt from: pandalump
URL: https://github.com/leynos/cuprum/pull/259

Timestamp: 2026-08-07T18:02:15.599Z
Learning: In `leynos/cuprum`, `typos.toml` is generated from the shared en-GB-oxendict dictionary and `typos.local.toml`. The repository spelling gate scans tracked Markdown, Python, and Rust files. Forbidden spelling forms can appear in generated correction mappings and in documented Markdown code-span examples that describe the prohibition; these occurrences are not policy violations.

Learnt from: pandalump
URL: https://github.com/leynos/cuprum/pull/259

Timestamp: 2026-08-07T18:02:15.599Z
Learning: In `leynos/cuprum`, benchmark baseline code uses `artefact` for repository-owned identifiers while retaining GitHub Actions external-contract terms such as JSON field `artifacts` and CLI option `--artifact-name`. The external terms are deliberate contract boundaries and require narrowly scoped spelling exceptions.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
✅ 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide and enforce en-GB-oxendict spelling for code identifiers, not just prose

3 participants