feat(extensions): select exact catalog releases - #4726
Open
Doribelove wants to merge 1 commit into
Open
Doribelove wants to merge 1 commit into
Doribelove wants to merge 1 commit into
Conversation
Keep current release metadata compatible with existing catalogs while allowing trusted catalogs to publish historical release URLs and digests. Add exact version selection, archive identity and discovery-policy checks, tests, and documentation. Refs github#4719; follows up github#4712. Assisted-by: OpenAI Codex (model: GPT-6, autonomous) Signed-off-by: 李永祺 <doribelove@gmail.com>
Doribelove
force-pushed
the
feat/4719-extension-version-lookup
branch
from
September 24, 2026 09:13
a557a7d to
b21d936
Compare
Doribelove
marked this pull request as ready for review
September 24, 2026 09:17
Collaborator
|
Thanks — this looks like the right first slice of github/spec-kit#4719. The extension-catalog scope is focused and reviewable. Before approval, could you add tests for the remaining new paths: reject a historical archive with the wrong extension ID or SHA-256 before installation; confirm an unqualified install still selects the advertised current release when Posted on behalf of @mnriem by GitHub Copilot (model: GPT-6 Sol, autonomous); comment fully AI-drafted. |
This branch has not been deployed
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.
Description
An extension catalog currently keeps only its advertised release. Once that entry advances, users cannot select a still-available older archive from the same trusted catalog. In the #4712 reproduction, a bundle pin for
0.4.12is rejected after the catalog advances to0.5.1, although the old ZIP still returns HTTP 200. This PR implements the extension-catalog slice of the maintainer's separate-area plan in #4719; bundle pin resolution remains a separate follow-up.Versioned entries keep the existing top-level
version/URL/digest as the current release and may add historical records underreleases.specify extension info <id> --versionsshows the available versions, andspecify extension add <id> --version 0.4.12selects the exact record from the winning catalog. Ordinary unqualified installs retain their current behavior. Missing versions do not fall through to lower-priority catalogs; discovery-only catalogs remain non-installable. Historical records need their own URL and SHA-256. The selected record is downloaded directly, then the archive's manifest ID and version are checked before installation. The reference documentation describes the format and this PR's bundle limitation.Testing
Tested locally with
uv run specify --help.Ran existing tests from this working tree's
.venv(full results below).Tested with a sample project: a localhost catalog advertised
0.5.1plus a0.4.12historical release;extension add --version 0.4.12requested the old ZIP and installed version0.4.12.Focused extension tests after the discovery-policy regression fix: 127 passed.
Full test suite before that last, narrowly scoped guard: 8,354 passed, 207 skipped (53 warnings). The final guard and its regression passed the focused run above.
ruff checkandgit diff --check: passed.A direct
markdownlint-cli2run on the edited reference page reports eight existing violations; the same eight appear on the unmodifiedmainversion of that page.AI Disclosure
AI disclosure: OpenAI Codex (GPT-6, autonomous mode at the contributor's request; default task settings, with the precise reasoning level not exposed) generated the reproduction, implementation, tests, documentation, and this PR text, then ran the checks listed above. The contributor reports having independently reviewed and tested the patch before marking this PR ready for review. Subsequent agent-generated review responses will also disclose AI use.