Skip to content

Commit 90c325c

Browse files
committed
Address community bundle review feedback
Ensure explicit install-allowed catalogs take precedence over built-in discovery, tighten component installability validation, and use issue-linked community branches. Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fbe794bc-667a-4c9e-b48b-825067debc6d
1 parent 8a11b57 commit 90c325c

6 files changed

Lines changed: 32 additions & 8 deletions

File tree

.github/workflows/add-community-bundle.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/add-community-bundle.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ Confirm that:
152152
- If non-default catalogs are required, ensure each URL is HTTPS, the README
153153
documents the corresponding `catalog add` command, and the testing details
154154
say those catalogs were registered in the clean-project test.
155-
- If the field says `None` but a component is not bundled and cannot be found
156-
in a default Spec Kit catalog, fail validation and ask the submitter to list
157-
and document its catalog.
155+
- If the field says `None` but a component is not bundled and cannot be
156+
installed from a default Spec Kit catalog, fail validation and ask the
157+
submitter to list and document an install-allowed companion catalog.
158158

159159
The community bundle catalog itself remains discovery-only. Companion catalog
160160
URLs are documentation and validation metadata, not catalogs this workflow
@@ -249,8 +249,10 @@ repository README remains the source for the actual URLs.
249249

250250
Create one draft pull request.
251251

252-
- New entry branch: `add-<bundle-id>-bundle`
253-
- Update branch: `update-<bundle-id>-bundle`
252+
- New entry branch:
253+
`community/${{ github.event.issue.number }}-add-<bundle-id>-bundle`
254+
- Update branch:
255+
`community/${{ github.event.issue.number }}-update-<bundle-id>-bundle`
254256
- New title: `Add <Bundle Name> bundle to community catalog`
255257
- Update title: `Update <Bundle Name> bundle to v<version>`
256258

docs/community/bundles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Bundles compose existing Spec Kit components — extensions, presets, workflows, and steps — into a single role or team stack. They are useful when a user should be able to install a tested set of components together instead of following several separate install commands.
77

8-
Accepted community bundle entries are published in [`bundles/catalog.community.json`](https://github.com/github/spec-kit/blob/main/bundles/catalog.community.json) and listed below. The built-in community source is discovery-only: `specify bundle search` and `specify bundle info` can inspect entries, but installing by ID requires explicitly adding an install-allowed catalog. To submit a bundle for review, file a [Bundle Submission](https://github.com/github/spec-kit/issues/new?template=bundle_submission.yml) issue.
8+
Accepted community bundle entries are published in [`bundles/catalog.community.json`](https://github.com/github/spec-kit/blob/main/bundles/catalog.community.json) and listed below. The built-in community source is discovery-only: `specify bundle search` and `specify bundle info` can inspect entries, but installing by ID requires explicitly adding an install-allowed catalog. Explicit catalogs use a higher default precedence than the built-in community source. To submit a bundle for review, file a [Bundle Submission](https://github.com/github/spec-kit/issues/new?template=bundle_submission.yml) issue.
99

1010
| Bundle | Purpose | Role or team | Provides | Required catalogs | URL |
1111
|--------|---------|--------------|----------|-------------------|-----|

src/specify_cli/bundler/models/catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Scope(str, Enum):
4343
BUILTIN_DEFAULT_STACK: tuple[dict[str, Any], ...] = (
4444
{"id": "default", "url": "builtin://default", "priority": 1,
4545
"install_policy": InstallPolicy.INSTALL_ALLOWED.value},
46-
{"id": "community", "url": "builtin://community", "priority": 2,
46+
{"id": "community", "url": "builtin://community", "priority": 20,
4747
"install_policy": InstallPolicy.DISCOVERY_ONLY.value},
4848
)
4949

tests/contract/test_catalog_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def test_builtin_default_stack_when_no_config(tmp_path: Path):
3939
assert ids == ["default", "community"]
4040
assert sources[0].install_policy is InstallPolicy.INSTALL_ALLOWED
4141
assert sources[1].install_policy is InstallPolicy.DISCOVERY_ONLY
42+
assert sources[1].priority == 20
4243
assert all(s.scope is Scope.BUILTIN for s in sources)
4344

4445

tests/integration/test_bundler_catalog_stack.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,27 @@ def test_resolve_prefers_highest_precedence_source():
3838
assert resolved.install_allowed is False
3939

4040

41+
def test_explicit_catalog_shadows_builtin_community_at_default_priority():
42+
sources = [
43+
_source("community", 20, "discovery-only"),
44+
_source("explicit", 10, "install-allowed"),
45+
]
46+
payloads = {
47+
"community": catalog_payload({
48+
"shared": catalog_entry_dict("shared", version="1.0.0"),
49+
}),
50+
"explicit": catalog_payload({
51+
"shared": catalog_entry_dict("shared", version="2.0.0"),
52+
}),
53+
}
54+
55+
resolved = _stack(sources, payloads).resolve("shared")
56+
57+
assert resolved.source.id == "explicit"
58+
assert resolved.entry.version == "2.0.0"
59+
assert resolved.install_allowed is True
60+
61+
4162
def test_resolve_unknown_bundle_errors():
4263
stack = _stack(
4364
[_source("only", 1, "install-allowed")],

0 commit comments

Comments
 (0)