Skip to content

fix: preserve registered integration skills during extension update - #5005

Open
chelsealong wants to merge 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5002
Open

chelsealong wants to merge 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5002

Conversation

@chelsealong

Copy link
Copy Markdown
Contributor

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

  • Regression test: failed before the fix because the Codex SKILL.md was 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 --help and git diff --check — passed.
  • Ruff reports 20 findings in the touched files; the unchanged files report the same 20 findings.

AI Disclosure

  • I used AI assistance.

AI disclosure: Codex (GPT-6, autonomous mode) investigated the issue and generated the code and regression test. No human review is claimed.

@chelsealong
chelsealong requested a review from mnriem as a code owner October 17, 2026 10:36
@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Oct 18, 2026
@mnriem
mnriem requested a max review from Copilot October 19, 2026 12:52

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.

🟡 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,
@mnriem

mnriem commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Please address Copilot feedback

@mnriem mnriem added the author-awaiting Waiting on author response label Oct 19, 2026

This branch has not been deployed

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

Labels

author-awaiting Waiting on author response 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.

[Bug]: extension update removes extension skills of non-default integrations

3 participants