fix: avoid proxy name collisions in provider uniquification - #3055
Open
olicesx wants to merge 1 commit into
Open
fix: avoid proxy name collisions in provider uniquification#3055olicesx wants to merge 1 commit into
olicesx wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a proxy-provider URI import bug where the uniqueName suffixing logic could generate a name (e.g. name-01) that already existed, causing a later proxy to be dropped during assembly. The update ensures generated names are registered and the suffix increments until an unused slot is found.
Changes:
- Update
uniqueNameto check for collisions against already-registered names and to register the generated name. - Add a regression test covering the reported duplicate-name + pre-existing-suffix scenario.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| common/convert/converter.go | Fixes uniqueName so generated suffixed names don’t collide with pre-existing names and are registered immediately. |
| common/convert/converter_test.go | Adds a regression test ensuring name, name-01, name-02, name-03 are all retained and uniquely assigned. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2931
uniqueName generated name-01 without checking whether that name was already taken (e.g. by another node's own fragment), so the colliding node got dropped later during assembly. The generated name is now registered and the suffix keeps incrementing until a free slot is found.