fix: restore alias compatibility for community extensions (#2110)#2125
Merged
mnriem merged 1 commit intogithub:mainfrom Apr 8, 2026
Merged
fix: restore alias compatibility for community extensions (#2110)#2125mnriem merged 1 commit intogithub:mainfrom
mnriem merged 1 commit intogithub:mainfrom
Conversation
Relax alias validation in _collect_manifest_command_names() to only
enforce the 3-part speckit.{ext}.{cmd} pattern on primary command
names. Aliases retain type and duplicate checking but are otherwise
free-form, restoring pre-github#1994 behavior.
This unblocks community extensions (e.g. spec-kit-verify) that use
2-part aliases like 'speckit.verify'.
Fixes github#2110
Contributor
There was a problem hiding this comment.
Pull request overview
Restores backward compatibility for community extensions that declare legacy 2-part aliases (e.g., speckit.verify) by relaxing alias validation during extension installation.
Changes:
- Update extension manifest validation so only primary command names must match
speckit.{extension}.{command}and the extension namespace. - Allow aliases to bypass the strict 3-part pattern validation (while still checking type and duplicates).
- Adjust the extension install test to assert that short aliases are accepted.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/extensions.py |
Limits canonical pattern/namespace validation to primary command names; relaxes alias validation. |
tests/test_extensions.py |
Renames/updates a test to expect successful install with a 2-part alias. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
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.
Summary
Fixes #2110 — Community extensions that use 2-part aliases (e.g.,
speckit.verify) fail to install with:Root cause
Commit #1994 ("fix: prevent extension command shadowing") added strict 3-part pattern enforcement to aliases in
_collect_manifest_command_names(). Before #1994, aliases had no pattern validation — only primary command names were checked. This broke all community extensions using short aliases.Changes
src/specify_cli/extensions.py_collect_manifest_command_names(), the 3-partspeckit.{ext}.{cmd}pattern, namespace check, and core command shadowing check are now only applied to primary command names (kind == "command")tests/test_extensions.pytest_install_rejects_alias_without_extension_namespace→test_install_accepts_short_alias— now verifies that 2-part aliases are accepted instead of rejectedTest plan
spec-kit-verify(which usesaliases: ["speckit.verify"]) can install again