Skip to content

fix(powershell): treat bracketed feature paths literally - #4970

Open
WOLIKIMCHENG wants to merge 2 commits into
github:mainfrom
WOLIKIMCHENG:fix/powershell-bracket-feature-paths
Open

WOLIKIMCHENG wants to merge 2 commits into
github:mainfrom
WOLIKIMCHENG:fix/powershell-bracket-feature-paths

Conversation

@WOLIKIMCHENG

@WOLIKIMCHENG WOLIKIMCHENG commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Use literal-path checks and directory enumeration for feature-derived paths.
  • Add regression coverage for bracketed paths and wildcard-shaped neighbors.

Testing

  • Focused Python tests: 64 passed.
  • Windows PowerShell 5.1: the bracket-path case failed before this change and passed after it; the neighboring-directory case was correctly rejected.
  • Sample project: specify, plan, tasks, checklist, and analyze workflows completed with a bracketed feature directory.
  • git diff --check passed.

AI Disclosure

  • I did use AI assistance (described below)

AI disclosure: AI-assisted tools were used to implement the fix and develop tests.

Assisted-by: Codex CLI (model: gpt-5.6-terra, autonomous)

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.

🟢 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.

@mnriem

mnriem commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Please address test & lint errors

@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Oct 15, 2026
Assisted-by: Codex CLI (model: gpt-5.6-terra, autonomous)

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

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.

3 participants