fix(ruby): apply the disambiguation suffix once, not once per reference - #8131
Conversation
Andrea Peruffo (andreaTP)
commented
Sep 2, 2026
- 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
|
Thanks for opening this pull request! Please add a changelog entry under |
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
There was a problem hiding this comment.
🟢 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.Namedelegation. - 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
Head branch was pushed to by a user without write access
5e66b31 to
684e860
Compare