fix: reject unknown setup-plan arguments - #4371
Open
pttydou wants to merge 1 commit into
Open
Conversation
Assisted-by: OpenAI Codex (model: GPT-5, autonomous)
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.
Description
Fixes #4363.
setup-planaccepted 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 existingsetup-tasksbehavior.The regression test verifies the shared exit code, stdout, stderr, and absence of
plan.mdside effects across Bash, PowerShell, and Python.Testing
Tested locally with
uv run specify --helpRan existing tests with
uv sync && uv run pytestTested 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.3Inverse 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— passedshellcheck --severity=erroron every tracked shell script — passedbash -n scripts/bash/setup-plan.sh— passedpython -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.planinvocation is unchanged; the sample-project parity fixture covers the new invalid direct-invocation path.AI Disclosure
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.