feat(flags): WI-3 --skip selective install + --only/--skip mutual exclusion (#468) - #499
Merged
Merged
Conversation
…lusion (#468) ## What - bash scripts/linux/setup.sh: add ARG_SKIP_SET sentinel so --skip= (empty) exits 1 instead of falling through to a full install. Change mutual exclusion guard from -n "$ARG_ONLY" truthiness to ARG_ONLY_SET/ARG_SKIP_SET sentinels (mirrors --only pattern). Change build_final_toolset skip branch to use ARG_SKIP_SET so empty --skip= is caught by validate_csv_shape. - PS scripts/windows/setup.ps1: change mutual exclusion from ($Only -and $Skip) to $PSBoundParameters.ContainsKey('Only') -and ContainsKey('Skip'). Change elseif ($Skip) to elseif ($PSBoundParameters.ContainsKey('Skip')) -- mirrors the --only ContainsKey pattern, ensuring empty -Skip '' triggers exit 1. - tests/test_setup_flags.sh + test_setup_flags_pwsh.ps1: add 12 WI-3 tests (bash/pwsh parity): T_skip_single, T_skip_multi, T_skip_unknown, T_skip_empty, T_skip_conflict, T_skip_blank_trailing, T_skip_blank_leading, T_skip_blank_consecutive, T_list_plus_only, T_list_plus_skip, T_no_selection_persistence, T_git_hook_skip_path_safe. ## Why WI-3 (#468 flags-first): --skip=tool1,tool2 excludes tools from DEFAULT_TOOLS while preserving order; --only and --skip are mutually exclusive; --list takes precedence over both; no state leaks between independent invocations. ## Test evidence - PS: 36/36 PASS (24 WI-1/2 + 12 WI-3 new tests, including backward-compat gate) - Bash: WSL not installed in this environment; T_skip_empty confirmed RED by code analysis (ARG_SKIP_SET fix addresses it); remaining WI-3 tests expected GREEN based on WI-2 validate_csv_shape parity. - ASCII purity verified (no non-ASCII in .ps1 files). - LF line endings enforced on .sh files (no BOM). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
WI-3:
--skipselective install +--only/--skipmutual exclusion (#468)Branch:
feat/468-wi3-skip-flagBase:developDate: 2026-07-12What changed
scripts/linux/setup.shARG_SKIP_SETsentinel; fix mutual exclusion to use sentinels; fix skip branch to useARG_SKIP_SET(so--skip=empty exits 1, not silent full install)scripts/windows/setup.ps1$PSBoundParameters.ContainsKey('Only') -and ContainsKey('Skip'); change skip branch toContainsKey('Skip')(spec compliance, mirrors--onlypattern)tests/test_setup_flags.shtests/test_setup_flags_pwsh.ps1Why
WI-3 of #468 flags-first: completes
--skip=tool1,tool2exclusion from DEFAULT_TOOLS (order preserved via DEFAULT_TOOLS iteration, same as--only), enforces--only+--skipmutual exclusion, proves--listprecedence over both flags, and proves no-selection-state persistence between independent runs.Two bugs fixed from the WI-2 scaffolded skeleton:
--skip=(empty) silently fell through to a full install. Fixed:ARG_SKIP_SETsentinel, mirroringARG_ONLY_SET.elseif ($Skip)was falsy for''; fixed to$PSBoundParameters.ContainsKey('Skip')per spec.Test evidence
PowerShell: 36/36 PASS (24 WI-1/2 + 12 WI-3, including backward-compat gate):
Bash: WSL not installed in local environment; suite could not be run. T_skip_empty is expected RED before fix and GREEN after (confirmed by code analysis). Remaining WI-3 tests expected GREEN based on
validate_csv_shapeparity with WI-2.Backward-compat gate: T_backward_compat_gate (no-arg run installs full defaults) -- PASS.
Pre-commit/pre-push: shellcheck PASS, ASCII purity PASS, LF-only on .sh files.
Do NOT merge
Awaiting Earl admin-merge to
developafter review.