fix: bundled extensions should not have download URLs#2155
Merged
mnriem merged 3 commits intogithub:mainfrom Apr 10, 2026
Merged
fix: bundled extensions should not have download URLs#2155mnriem merged 3 commits intogithub:mainfrom
mnriem merged 3 commits intogithub:mainfrom
Conversation
- Remove selftest from default catalog (not a published extension) - Replace download_url with 'bundled: true' flag for git extension - Add bundled check in extension add flow with clear error message when bundled extension is missing from installed package - Add bundled check in download_extension() with specific error - Direct users to reinstall via uv with full GitHub URL - Add 3 regression tests for bundled extension handling
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes installation failures for bundled core extensions by removing invalid download URLs from the default catalog and making the CLI/catalog logic explicitly treat bundled extensions as local-only.
Changes:
- Update default extension catalog to mark
gitas bundled and removeselftestfrom the catalog. - Update
extension addto detect bundled catalog entries and emit a reinstall-focused error when the bundled files aren’t present locally. - Update
ExtensionCatalog.download_extension()to emit a clearer bundled-specific error (and add regression tests around bundled/no-URL cases).
Show a summary per file
| File | Description |
|---|---|
extensions/catalog.json |
Marks git as bundled (no URL) and removes selftest entry from default catalog. |
src/specify_cli/__init__.py |
Adds bundled-aware behavior in extension add with actionable error output when local bundled assets are missing. |
src/specify_cli/extensions.py |
Adds a bundled-specific error path in download_extension() when download_url is absent. |
tests/test_extensions.py |
Adds regression tests for bundled-missing CLI error and download_extension() error messaging. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 2
…tall constant - Move bundled check before download_url inspection in download_extension() so bundled extensions can never be downloaded even with a URL present - Extract REINSTALL_COMMAND constant to avoid duplicated install strings
Bundled extensions should only be blocked from download when they have no download_url. If a newer version is published to the catalog with a URL, users should be able to install it to get bug fixes. Add test for bundled-with-URL download path.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes installation failures for bundled extensions in the default extension catalog by preventing the CLI/catalog download path from being used when an extension is intended to be shipped inside the Spec Kit package.
Changes:
- Marked the
gitcatalog entry as bundled (and removed the unpublishedselftestentry) to avoid invalid release-artifact download URLs. - Updated
specify extension addto detect bundled extensions from catalog metadata and emit an actionable reinstall error if the bundled payload is missing locally. - Updated
ExtensionCatalog.download_extension()to explicitly reject bundled-without-URL entries with a specific error, and added regression tests for these behaviors.
Show a summary per file
| File | Description |
|---|---|
extensions/catalog.json |
Removes selftest and marks git as "bundled": true to prevent broken download attempts. |
src/specify_cli/__init__.py |
Adds bundled-aware handling in extension add with a clearer error when the bundled payload can’t be found locally. |
src/specify_cli/extensions.py |
Adds a bundled-specific guard in download_extension() and centralizes reinstall guidance via REINSTALL_COMMAND. |
tests/test_extensions.py |
Adds regression tests covering bundled-missing behavior and error messaging in both CLI and catalog download code paths. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
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.
Fixes #2151
Problem
Extensions from the default catalog (
catalog.json) could not be installed becausedownload_urlpointed to GitHub release artifacts that don't exist. Thegitandselftestextensions are bundled with spec-kit and should never be downloaded from a URL.When the bundled extension lookup failed (e.g., incomplete install), the code fell through to the catalog download path and hit a 404.
Changes
extensions/catalog.json— Removedselftest(not a published extension). Replaceddownload_urlwith"bundled": trueon thegitentry.src/specify_cli/__init__.py— Theextension addflow now checks for"bundled": truebefore attempting download. When a bundled extension can't be found locally, it shows a clear error with reinstall instructions.src/specify_cli/extensions.py—download_extension()checks for"bundled": trueand raises a specific error instead of the generic "has no download URL".tests/test_extensions.py— Added 3 regression tests:download_extension()rejects bundled extensions with a clear messageTesting
All 1232 tests pass.