Fix shared script command hints for integration separators#2627
Open
WOLIKIMCHENG wants to merge 2 commits into
Open
Fix shared script command hints for integration separators#2627WOLIKIMCHENG wants to merge 2 commits into
WOLIKIMCHENG wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a command-hint mismatch in bundled shared scripts by templating /speckit command references and rendering them with the active integration’s invoke_separator during shared infrastructure installation/refresh, ensuring hints match actual command invocations for both dot (/speckit.plan) and hyphen (/speckit-plan) styles.
Changes:
- Replaced hardcoded
/speckit.*//speckit-*references in shared bash/PowerShell scripts with__SPECKIT_COMMAND_<NAME>__placeholders. - Updated shared infrastructure installation to resolve
__SPECKIT_COMMAND_*__placeholders in shared scripts (in addition to templates) using the activeinvoke_separator. - Expanded regression tests to cover script hint rendering and refresh behavior across install/use/switch/upgrade flows and customization preservation.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/shared_infra.py |
Resolves __SPECKIT_COMMAND_*__ placeholders when copying shared scripts so command hints match the active integration separator. |
src/specify_cli/__init__.py |
Switches default/upgrade refresh paths to re-install shared infra (scripts + templates) with refresh_managed=True and updates related CLI/help messaging. |
scripts/bash/check-prerequisites.sh |
Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders for template-time rendering. |
scripts/bash/common.sh |
Updates comments referencing commands to use __SPECKIT_COMMAND_*__ placeholders. |
scripts/bash/setup-tasks.sh |
Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders. |
scripts/powershell/check-prerequisites.ps1 |
Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders. |
scripts/powershell/common.ps1 |
Updates comments referencing commands to use __SPECKIT_COMMAND_*__ placeholders. |
scripts/powershell/setup-tasks.ps1 |
Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders. |
tests/integrations/test_cli.py |
Adds direct coverage ensuring _install_shared_infra renders shared script command refs for both dot/hyphen separators. |
tests/integrations/test_integration_subcommand.py |
Adds end-to-end regression coverage for script ref refresh across install/uninstall/use/switch/upgrade flows and customization preservation. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 10/10 changed files
- Comments generated: 1
Comment on lines
+1442
to
1450
| _install_shared_infra( | ||
| project_root, | ||
| resolved_script, | ||
| invoke_separator=_invoke_separator_for_integration( | ||
| integration, {"integration_settings": settings}, key, parsed_options | ||
| ), | ||
| force=refresh_templates_force, | ||
| refresh_managed=True, | ||
| ) |
Contributor
Author
|
Addressed. |
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.
Summary
Fixes #2587.
Testing