Skip to content

Rename BackoffConfig.normalised to normalized (US spelling)#446

Merged
leynos merged 1 commit intomainfrom
rename-backoff-method-to-us-spelling-uheewx
Feb 5, 2026
Merged

Rename BackoffConfig.normalised to normalized (US spelling)#446
leynos merged 1 commit intomainfrom
rename-backoff-method-to-us-spelling-uheewx

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Feb 5, 2026

Summary

  • Rename BackoffConfig.normalised to BackoffConfig::normalized across the codebase to adopt American English spelling.
  • Update all internal usage, docs, and tests accordingly.
  • This is a breaking change for downstream users; call sites must be updated.

Changes

Core changes

  • Backoff API: replace BackoffConfig::normalised() with BackoffConfig::normalized().
  • Runtime:
    • In src/server/runtime.rs, use backoff.normalized() when preparing the backoff configuration.
  • Server config:
    • In src/server/config/mod.rs, document and reference cfg.normalized() instead of cfg.normalised().
  • Documentation/comments:
    • Update examples and commentary to reference normalized.

Documentation changes

  • CHANGELOG.md: Add breaking change note for the API rename.
  • docs/server/configuration.md: Update references to use BackoffConfig::normalized.
  • Other docs/comments that mentioned normalised updated to normalized.
  • Doc tests/examples in src/server/runtime/backoff.rs updated accordingly.

Tests / Examples changes

  • Doc tests and inline examples updated from normalised() to normalized().

Migration Guide

  • Update all call sites from:
    • cfg.normalised() to cfg.normalized()
    • backoff.normalised() to backoff.normalized()
  • Rebuild and run tests to ensure all references are updated.

Test plan

  • Build succeeds with updated API.
  • Doc tests compile with new method name.
  • No remaining references to normalised() in code or docs.
  • Runtime acceptance loop uses the corrected normalized() backoff configuration.

◳ Generated by DevBoxer


ℹ️ Tag @devboxerhub to ask questions and address PR feedback

📎 Task: https://www.devboxer.com/task/1bd3b44a-656f-416a-a9fd-f0b1c4073512

📝 Closes #441

Summary by Sourcery

Rename the backoff configuration normalisation method to use American English spelling and update all references across code, configuration, and docs.

Enhancements:

  • Rename BackoffConfig::normalised to BackoffConfig::normalized and update runtime usage and server configuration to match.

Documentation:

  • Update configuration and changelog documentation to reference BackoffConfig::normalized and note the breaking API change.

Chores:

  • Tidy a minor formatting issue in migration documentation.

Renamed `BackoffConfig::normalised` method to `normalized` to align with American English spelling in the public API. Updated all references and documentation accordingly, including changelog, doc comments, and source code. This is a breaking change for downstream consumers who must update their code to use the new method name.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Feb 5, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Renames the Backoff configuration API method from normalised to normalized across code, configuration, docs, and tests, and wires the new spelling through the server runtime accept-loop backoff configuration.

Class diagram for BackoffConfig method rename to normalized

classDiagram
    class BackoffConfig_Before {
        Duration initial_delay
        Duration max_delay
        BackoffConfig normalised()
    }

    class BackoffConfig_After {
        Duration initial_delay
        Duration max_delay
        BackoffConfig normalized()
    }

    BackoffConfig_Before <.. BackoffConfig_After
Loading

File-Level Changes

Change Details Files
Rename BackoffConfig API from normalised() to normalized() and update usages.
  • Change BackoffConfig method name from normalised(self) -> Self to normalized(self) -> Self without altering behavior.
  • Update all in-code call sites to use cfg.normalized() / backoff.normalized().
  • Adjust invariants and behavior comments to reference BackoffConfig::normalized and the new method name.
src/server/runtime/backoff.rs
src/server/runtime.rs
src/server/config/mod.rs
Align documentation and changelog with the new BackoffConfig::normalized API.
  • Document the breaking rename from BackoffConfig::normalised to BackoffConfig::normalized in the changelog.
  • Update server configuration docs to reference BackoffConfig::normalized and describe its clamping behavior using the new spelling.
  • Fix inline examples, doc tests, and comments to use normalized instead of normalised.
CHANGELOG.md
docs/server/configuration.md
src/server/runtime/backoff.rs
Minor prose cleanup in an unrelated migration doc.
  • Reflow a mitigation bullet to avoid awkward line breaking while keeping the content the same.
docs/execplans/migrate-from-cucumber-to-rstest-bdd.md

Assessment against linked issues

Issue Objective Addressed Explanation
#441 Rename the BackoffConfig method from normalised to normalized in its definition and all internal call sites (e.g., runtime and server config).
#441 Update all documentation (including comments, docs files, and changelog) and tests/examples to use BackoffConfig::normalized and document the breaking API change.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

Summary by CodeRabbit

  • Refactor

    • Public API method BackoffConfig::normalised() has been renamed to BackoffConfig::normalized() to standardise public-facing API naming conventions to American English.
  • Documentation

    • Updated server configuration and runtime documentation, including code examples and migration guides, to reflect the renamed backoff configuration method.

Walkthrough

This PR standardises the spelling of the BackoffConfig::normalised method to BackoffConfig::normalized, aligning the public API with American English conventions. The change encompasses method definition, call sites, and documentation across six files.

Changes

Cohort / File(s) Summary
Core backoff configuration
src/server/runtime/backoff.rs
Method renamed from normalised() to normalized(). Documentation example updated to match new method name. Internal logic remains unchanged.
Method call sites
src/server/runtime.rs, src/server/config/mod.rs
Updated all invocations of normalised() to normalized() and corrected documentation references to reflect the new method name.
Documentation updates
CHANGELOG.md, docs/server/configuration.md, docs/execplans/migrate-from-cucumber-to-rstest-bdd.md
Changelog documents breaking change. Configuration docs updated to reference normalized instead of normalised. Minor formatting adjustments to migration documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Poem

🎭 From British to American shores, the method takes flight,
normalisednormalized, a spelling made right,
🚀 One breaking change to set the API straight,
📖 Documentation aligned at a proper rate!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely and accurately summarises the primary change: renaming BackoffConfig::normalised to BackoffConfig::normalized for US spelling alignment.
Description check ✅ Passed The description comprehensively details the breaking API change, all file modifications, migration guidance, and test coverage across the codebase.
Linked Issues check ✅ Passed All requirements from issue #441 are addressed: method definition renamed, all call sites updated, documentation references corrected, and breaking change noted.
Out of Scope Changes check ✅ Passed The PR contains only the renaming of BackoffConfig::normalised to BackoffConfig::normalized; the minor documentation formatting adjustment in migrate-from-cucumber-to-rstest-bdd.md is tangential but minor.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rename-backoff-method-to-us-spelling-uheewx

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

@leynos leynos marked this pull request as ready for review February 5, 2026 12:02
sourcery-ai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@docs/server/configuration.md`:
- Around line 58-59: Change the narrative text “normalises” to the Oxford “-ize”
form “normalizes” in the sentence that references the builder, but do not alter
the API/code identifier BackoffConfig::normalized (keep its spelling and
formatting intact); update the plain-text word only so the sentence reads:
"builder normalizes the supplied configuration via `BackoffConfig::normalized`,
so out-of-range values are adjusted rather than preserved."

In `@src/server/config/mod.rs`:
- Around line 142-146: The doc comment uses British variant "Normalisation" but
project requires en-GB-oxendict "-ize" spellings; update the doc text around
BackoffConfig::normalized (and any mentions like cfg.normalized()) to use
"Normalization" (and adjust any other occurrences of "normalisation" ->
"normalization") so the docs match the coding guideline.

Comment thread docs/server/configuration.md
Comment thread src/server/config/mod.rs
@leynos leynos merged commit d0d7122 into main Feb 5, 2026
6 checks passed
@leynos leynos deleted the rename-backoff-method-to-us-spelling-uheewx branch February 5, 2026 12:12
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.

Rename BackoffConfig::normalised to BackoffConfig::normalized

1 participant