Repository navigation
fix: save init options before re-registering extensions (#5321) - #5322
Open
chelsealong wants to merge 1 commit into
Open
chelsealong wants to merge 1 commit into
chelsealong wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Forced initialization can overwrite files outside the project through symlinked skill subdirectories because individual destination directories are not validated.
1 open issue
What changed in this PR
Fixes #5321 by saving the selected integration mode before forced init re-registers installed extensions and presets.
Changes:
- Moves init-option persistence ahead of re-registration so it uses the current mode.
- Adds regression coverage for skills and command modes when saved options are absent.
| File | Description |
|---|---|
tests/integrations/test_cli.py |
Verifies forced init generates extension files only in the selected mode. |
src/specify_cli/command_init.py |
Saves init options before extension and preset re-registration. |
Review effort: Balanced (auto)
| init_opts["ai_skills"] = True | ||
| else: | ||
| init_opts.pop("ai_skills", None) | ||
| save_init_options(project_path, init_opts) |
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 #5321. Forced init now saves the selected integration mode before re-registering installed extensions and presets, so extension files use the selected mode.
Testing
.venv/bin/python -m pytest tests/integrations/test_cli.py tests/test_agent_config_consistency.py -q— 111 passed..venv/bin/specify --helpandgit diff --check— passed.AI Disclosure
Codex (GPT-6, autonomous mode) generated the code and tests and ran local validation. No human review or testing is claimed.