Skip to content

fix(ruby): apply the disambiguation suffix once, not once per reference - #8131

Merged
Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
andreaTP:fix/ruby-twilio-repeated-suffix
Sep 2, 2026
Merged

fix(ruby): apply the disambiguation suffix once, not once per reference#8131
Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
andreaTP:fix/ruby-twilio-repeated-suffix

Conversation

@andreaTP

Copy link
Copy Markdown
Contributor
  • CodeType.Name delegates to TypeDefinition.Name, so the reference pass renamed the class again
  • removes that pass; references follow the rename through the type definition already
  • un-suppresses the twilio generation and idempotency tests

@andreaTP
Andrea Peruffo (andreaTP) requested a review from a team as a code owner September 2, 2026 16:15
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request! Please add a changelog entry under ## [Unreleased] in CHANGELOG.md, before the first released version section, so users can see what changed. Add bug fixes under ### Changed and new features under ### Added.

@baywet Vincent Biret (baywet) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution!

Copilot AI 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.

🟢 Approval recommended

The refiner change is narrowly scoped, aligns with CodeType.Name delegation semantics, and is backed by a regression test plus re-enabled integration/idempotency coverage.

Pull request overview

This PR fixes Ruby model disambiguation so a class that collides with a sibling namespace gets the Model suffix applied exactly once (on the type definition), avoiding repeated suffixing while walking references. It also re-enables the Twilio Ruby integration and idempotency coverage that previously had to be suppressed due to this failure mode.

Changes:

  • Remove the Ruby refiner “update references” pass that was inadvertently renaming the underlying class multiple times via CodeType.Name delegation.
  • Add a regression test ensuring the disambiguation suffix is applied only once and that references track the type definition rename.
  • Un-suppress Twilio Ruby generation/idempotency runs and document the fix in the changelog.
File summaries
File Description
tests/Kiota.Builder.Tests/Refiners/RubyLanguageRefinerTests.cs Adds a targeted regression test reproducing the multi-suffix rename failure and asserting idempotent disambiguation.
src/Kiota.Builder/Refiners/RubyRefiner.cs Simplifies disambiguation to a single pass on the model type, removing reference-walking renames that caused repeated suffixing.
it/config.json Removes Twilio Ruby suppressions so the integration and idempotency scenarios run again by default.
CHANGELOG.md Records the Ruby disambiguation fix and the re-enabled Twilio test coverage with references to the related issues.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- CodeType.Name delegates to TypeDefinition.Name, so the reference pass renamed the class again
- removes that pass; references follow the rename through the type definition already
- un-suppresses the twilio generation and idempotency tests
auto-merge was automatically disabled September 2, 2026 16:36

Head branch was pushed to by a user without write access

@andreaTP
Andrea Peruffo (andreaTP) force-pushed the fix/ruby-twilio-repeated-suffix branch from 5e66b31 to 684e860 Compare September 2, 2026 16:36
@baywet
Vincent Biret (baywet) added this pull request to the merge queue Sep 2, 2026
Merged via the queue into microsoft:main with commit 63a163d Sep 2, 2026
333 of 339 checks passed
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.

3 participants