Repository navigation
fix: prevent integration catalog removal under environment override - #5525
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 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_URLis 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)
Collaborator
|
Thank you! |
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
Fixes #5524. When
SPECKIT_INTEGRATION_CATALOG_URLis set,integration catalog removenow exits with an error before reading or changing the inactive project catalog. An unset or whitespace-only override still allows removal.Testing
.venv/bin/specify --helppassed.uvx ruff@0.15.0 check src testspassed.AI Disclosure
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.