Skip to content

fix: prevent integration catalog removal under environment override - #5525

Merged
mnriem merged 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5524
Nov 23, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5524

Conversation

@chelsealong

Copy link
Copy Markdown
Contributor

Description

Fixes #5524. When SPECKIT_INTEGRATION_CATALOG_URL is set, integration catalog remove now exits with an error before reading or changing the inactive project catalog. An unset or whitespace-only override still allows removal.

Testing

  • Before the fix, both new regression tests failed: the domain method removed the entry and the CLI exited successfully.
  • After the fix, 143 focused catalog tests passed; the tests verify that the project YAML remains byte-for-byte unchanged under the override.
  • .venv/bin/specify --help passed.
  • uvx ruff@0.15.0 check src tests passed.

AI Disclosure

  • I did use AI assistance.

AI disclosure: Codex (GPT-6, default reasoning settings, autonomous) investigated the issue, generated the code and tests, and ran validation. Human review has not been claimed.

@chelsealong
chelsealong requested a review from mnriem as a code owner November 23, 2026 01:39
Copilot AI adaptive review requested due to automatic review settings November 23, 2026 01:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change preventing catalog removal while an environment override is active.

No open issues 🎉

What changed in this PR

Fixes #5524 by preventing integration catalog removal while an environment override makes project catalog sources inactive, aligning removal with catalog listing behavior.

Changes:

  • Reject removal before reading or modifying project configuration when SPECKIT_INTEGRATION_CATALOG_URL is non-empty after trimming whitespace.
  • Add domain and CLI regression tests confirming rejection leaves YAML byte-for-byte unchanged, while a whitespace-only override still permits removal.
File Description
tests/​specify_cli/​integrations/​test_catalog.py Tests override rejection, unchanged YAML, and whitespace-only override handling.
tests/​specify_cli/​integrations/​catalog/​test_command_remove.py Tests CLI failure and configuration preservation under an override.
src/​specify_cli/​integrations/​__init__.py Guards catalog removal with an actionable environment-override error.

Review effort: Balanced (adaptive)

@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Nov 23, 2026
@mnriem
mnriem requested a balanced review from Copilot November 23, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change preventing catalog removal from modifying inactive project sources under an environment override.

No open issues 🎉

Review effort: Balanced

@mnriem
mnriem merged commit a5ba3ee into github:main Nov 23, 2026
14 checks passed
@mnriem

mnriem commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-must-have Verdict: high-value, important work for Spec Kit — do first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

integration catalog remove deletes a project source that catalog list reports as inactive while SPECKIT_INTEGRATION_CATALOG_URL is set

3 participants