Repository navigation
Fix: omarchy plugin clone can generate a colliding plugin id - #1
Closed
baron-hines wants to merge 1 commit into
Closed
baron-hines wants to merge 1 commit into
baron-hines wants to merge 1 commit into
Conversation
`omarchy plugin clone <builtin>` derives the clone id from the username as `<user>.<plugin>`. When the username matches a built-in namespace this can equal a built-in's own id. The stock Omarchy VM user is literally `omarchy`, so `omarchy plugin clone omarchy.weather` generated the id `omarchy.weather` — identical to the built-in weather plugin — leaving the clone indistinguishable from what it was cloned from. Check the candidate id against every catalog id (built-in or already-cloned) and against any existing plugin directory, and suffix a counter until the id is unique. Normal usernames are unaffected; the collision case now yields `omarchy.weather2` instead of shadowing the built-in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
omarchy plugin clone <builtin>derives the new clone's id from$USERas roughly<username>.<plugin>. When the username matches the namespace of a built-in plugin, the generated id collides with the built-in itself.Concrete case — the stock Omarchy VM's default username is literally
omarchy, so:generates the clone id
omarchy.weather— the same id as the built-in weather plugin. The clone can't be distinguished from what it was cloned from. This is not hypothetical: any user cloning anomarchy.*built-in on a stock install hits it.Fix
After computing the candidate id, check it against every id in
omarchy-plugin-catalog(built-in or already-cloned) and against any existing plugin directory, and suffix a counter until the id is free. The directory-existence guard is folded into the same check so a clone never clobbers an existing one.baron.weather, etc.).omarchy.weather2instead of shadowing the built-in.Testing
🤖 Generated with Claude Code