Fix shared script command hints for integration separators#2627
Fix shared script command hints for integration separators#2627WOLIKIMCHENG wants to merge 3 commits into
Conversation
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
|
Addressed. |
mnriem
left a comment
There was a problem hiding this comment.
Please resolve conflicts
1122bc5 to
a54610a
Compare
|
Hi @mnriem, I rebased the branch onto the latest main and resolved the conflicts. Thank you! |
Summary
Fixes #2587.
Testing