Skip to content

fix: reject unknown setup-plan arguments - #4371

Open
pttydou wants to merge 1 commit into
github:mainfrom
pttydou:fix/4363-reject-unknown-setup-plan-args
Open

fix: reject unknown setup-plan arguments#4371
pttydou wants to merge 1 commit into
github:mainfrom
pttydou:fix/4363-reject-unknown-setup-plan-args

Conversation

@pttydou

@pttydou pttydou commented Aug 29, 2026

Copy link
Copy Markdown

Description

Fixes #4363.

setup-plan accepted unknown arguments because the Bash variant collected them without reading them, while the PowerShell and Python variants intentionally ignored them for parity. This change rejects the first unknown option before resolving feature paths in all three variants, matching the existing setup-tasks behavior.

The regression test verifies the shared exit code, stdout, stderr, and absence of plan.md side effects across Bash, PowerShell, and Python.

Testing

  • Tested locally with uv run specify --help

  • Ran existing tests with uv sync && uv run pytest

  • Tested with a sample project (if applicable)

  • python -m pytest tests/test_setup_plan_python_parity.py::test_all_variants_reject_unknown_options -q — 1 passed with PortableGit Bash, PowerShell 7.6.4, and Python 3.14.3

  • Inverse mutation (Bash ignores the option again) — the regression failed as expected; restoring the fix returned it to passing

  • uvx ruff@0.15.0 check scripts tests — passed

  • shellcheck --severity=error on every tracked shell script — passed

  • bash -n scripts/bash/setup-plan.sh — passed

  • python -m pytest tests -q — 6,778 passed, 467 skipped, 85 local environment failures outside the changed paths (primarily unavailable Windows symlink privileges, GBK default decoding, and unrelated PowerShell fixture capture)

The normal /speckit.plan invocation is unchanged; the sample-project parity fixture covers the new invalid direct-invocation path.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

This contribution was implemented autonomously with OpenAI Codex (GPT-5) on behalf of @pttydou. The agent inspected the three script variants, authored the code and regression test, reviewed the diff, and ran the checks reported above.

Assisted-by: OpenAI Codex (model: GPT-5, autonomous)
@pttydou
pttydou requested a review from mnriem as a code owner August 29, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: setup-plan.sh silently ignores unknown arguments (ARGS is collected but never read)

1 participant