Repository navigation
fix(powershell): treat bracketed feature paths literally - #4970
WOLIKIMCHENG wants to merge 3 commits into
Conversation
Assisted-by: Codex CLI (model: gpt-5.6-terra, autonomous)
There was a problem hiding this comment.
🟢 Approval recommended
The focused literal-path changes include positive and negative regression coverage, with no blocking issues identified.
0 open findings
What changed in this PR
Fixes PowerShell task setup and prerequisite checks for feature directories containing square brackets.
Changes:
- Uses literal paths for feature-derived file checks and directory enumeration.
- Adds regression tests for bracketed directories and rejection of wildcard-matching neighbors.
Reported test results were not independently rerun.
| File | Description |
|---|---|
| tests/test_setup_tasks.py | Adds bracketed-path success and neighbor-rejection tests. |
| tests/test_check_prerequisites_python_parity.py | Tests literal paths across prerequisite output modes. |
| scripts/powershell/setup-tasks.ps1 | Uses literal paths for required and optional documents. |
| scripts/powershell/common.ps1 | Makes shared file and directory checks literal. |
| scripts/powershell/check-prerequisites.ps1 | Uses literal paths for prerequisites and document discovery. |
🧠 Review effort: Max
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Please address test & lint errors |
Assisted-by: Codex CLI (model: gpt-5.6-terra, autonomous)
|
Thank you for flagging the test and lint errors. I’ve pushed a follow-up that makes the PowerShell JSON tests decode UTF-8 output and preserve the script’s exit code. Please let me know if anything else needs adjustment. |
| "if ($null -ne $scriptExitCode -and $scriptExitCode -ne 0) { exit $scriptExitCode }; " | ||
| "exit 1 }" | ||
| ), | ||
| str(script), |
There was a problem hiding this comment.
Updated all three -Command helpers to single-quote paths and arguments, doubling embedded apostrophes. Added regression cases for paths containing spaces and apostrophes, argument preservation, UTF-8 output, and failure statuses.
|
Please address Copilot feedback |
|
Thanks for flagging the Copilot feedback. I updated the PowerShell test helpers and added regression coverage for paths with spaces and apostrophes. I’m following up with the details in the review thread. |

Description
PowerShell can treat square brackets in a feature directory name as wildcards, causing task setup or prerequisite checks to miss existing files or match a neighboring directory.
Testing
git diff --checkpassed.AI Disclosure
AI disclosure: AI-assisted tools were used to implement the fix and develop tests.