Repository navigation
fix: preserve registered integration skills during extension update - #5005
Open
chelsealong wants to merge 1 commit into
Open
chelsealong wants to merge 1 commit into
chelsealong wants to merge 1 commit into
Conversation
4 of 5 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Secondary registration can overwrite the active integration’s skills when output directories are shared.
2 open issues
What changed in this PR
Preserves extension commands and native skills for previously registered integrations during updates, addressing #5002.
Changes:
- Refreshes previously registered non-default integrations.
- Includes their outputs in transactional backups.
- Adds positive and negative Codex regression cases.
AI disclosure: GitHub Copilot (model unknown, autonomous) generated this review for the requester.
| File | Description |
|---|---|
| tests/specify_cli/extensions/test_command_update.py | Tests preservation of registered Codex skills and exclusion of unregistered integrations. |
| src/specify_cli/extensions/_command_update_transaction.py | Expands backups and restores secondary integration registrations after installation. |
Review effort: Max
Comment on lines
+586
to
+592
| for agent_name in missing_agents: | ||
| rendered = registrar.register_commands_for_agent( | ||
| agent_name, manifest, | ||
| manager.extensions_dir / extension_id, project_root, | ||
| ) | ||
| if rendered: | ||
| refreshed_commands[agent_name] = rendered |
Comment on lines
+410
to
+414
| command_targets = manager._command_registration_targets() | ||
| for agent_name, cmd_names in registered_commands.items(): | ||
| if cmd_names and agent_name in registrar.AGENT_CONFIGS: | ||
| command_targets.setdefault( | ||
| agent_name, |
Collaborator
|
Please address Copilot feedback |
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
Fixes #5002. Updating an extension now refreshes commands and native skills for integrations recorded in its previous registry entry, including a non-default Codex integration. An integration with no prior registration remains untouched.
Testing
SKILL.mdwas deleted; both positive and negative cases pass after the fix..venv/bin/python -m pytest tests/specify_cli/extensions/test_command_update.py tests/specify_cli/extensions/test_command_update_transaction.py tests/specify_cli/extensions/test_command_update_artifacts.py -q— 61 passed..venv/bin/specify --helpandgit diff --check— passed.AI Disclosure
AI disclosure: Codex (GPT-6, autonomous mode) investigated the issue and generated the code and regression test. No human review is claimed.