Skip to content

Fix auto-generated host name collisions with existing hosts#905

Draft
qi-imbue wants to merge 1 commit intomainfrom
mng/fix-auto-host-name
Draft

Fix auto-generated host name collisions with existing hosts#905
qi-imbue wants to merge 1 commit intomainfrom
mng/fix-auto-host-name

Conversation

@qi-imbue
Copy link
Contributor

When creating a host with an auto-generated name (e.g. mng c @.modal), the name was generated randomly without checking against existing hosts, which could produce collisions. Now discovers existing hosts on the provider first and retries name generation until a unique name is found.

Fixed-name providers (like local, which always returns "localhost") are detected by observing that get_host_name returns the same value on retry, and the name is accepted as-is since such providers reuse hosts by design.

When creating a host with an auto-generated name (e.g. `mng c @.modal`),
the name was generated randomly without checking against existing hosts,
which could produce collisions. Now discovers existing hosts on the
provider first and retries name generation until a unique name is found.

Fixed-name providers (like local, which always returns "localhost") are
detected by observing that get_host_name returns the same value on retry,
and the name is accepted as-is since such providers reuse hosts by design.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant