Conversation
…#4505) Rerunning `catalog add` for an already-configured entry now succeeds as a no-op instead of failing, so the command is safe inside re-runnable workflows. This implements the assessment's recommended Option A ("idempotent no-op for equivalent entries"): an identical rerun exits 0, while a request that matches an existing entry's identity but supplies different settings is rejected as a conflict rather than silently overwriting priority/install permissions. Applied consistently to all six families: - extension / preset — identity = catalog name - integration / workflow / step — identity = catalog URL - bundle — identity = source id or url The URL-identity class methods now return "added"/"unchanged" so the CLI can report the no-op, and bundle add_source returns (source, status). Updates duplicate-add tests to the new semantics, adds no-op + conflict coverage per family, and documents the behavior in the reference docs. Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Owner
Author
|
Superseded by the upstream PR against github/spec-kit (this fork PR was created automatically against the fork's own main by mistake). |
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
Addresses #4505. Today every
catalog addcommand fails when a matching entry already exists, which forces workflow authors to add their own duplicate-detection/remove-then-add logic around a command that may run repeatedly.This makes
catalog addidempotent, implementing the feature assessment's recommended Option A — "idempotent no-op for equivalent entries":catalog addis safe inside a re-runnable workflow.Scope — all six catalog families
specify extension catalog addspecify preset catalog addspecify integration catalog addspecify workflow catalog addspecify workflow step catalog addspecify bundle catalog addImplementation notes
IntegrationCatalog/WorkflowCatalog/StepCatalog.add_catalog) now return"added"/"unchanged"so the CLI can report the no-op; a same-URL add with a different--nameraises a conflict.bundler.commands_impl.catalog_config.add_sourcenow returns(CatalogSource, status).Tests & docs
extensions,presets,workflows,integrations,bundles).Family checklist
This pull request was authored autonomously by GitHub Copilot (model: Claude Opus 4.8) on behalf of @mnriem.