Skip to content

feat(flags): WI-3 --skip selective install + --only/--skip mutual exclusion (#468) - #499

Merged
primetimetank21 merged 1 commit into
developfrom
feat/468-wi3-skip-flag
Jul 13, 2026
Merged

feat(flags): WI-3 --skip selective install + --only/--skip mutual exclusion (#468)#499
primetimetank21 merged 1 commit into
developfrom
feat/468-wi3-skip-flag

Conversation

@primetimetank21

Copy link
Copy Markdown
Owner

WI-3: --skip selective install + --only/--skip mutual exclusion (#468)

Branch: feat/468-wi3-skip-flag Base: develop Date: 2026-07-12


What changed

File Change
scripts/linux/setup.sh Add ARG_SKIP_SET sentinel; fix mutual exclusion to use sentinels; fix skip branch to use ARG_SKIP_SET (so --skip= empty exits 1, not silent full install)
scripts/windows/setup.ps1 Change mutual exclusion to $PSBoundParameters.ContainsKey('Only') -and ContainsKey('Skip'); change skip branch to ContainsKey('Skip') (spec compliance, mirrors --only pattern)
tests/test_setup_flags.sh +12 WI-3 bash tests
tests/test_setup_flags_pwsh.ps1 +12 WI-3 PS tests (parity)

Why

WI-3 of #468 flags-first: completes --skip=tool1,tool2 exclusion from DEFAULT_TOOLS (order preserved via DEFAULT_TOOLS iteration, same as --only), enforces --only+--skip mutual exclusion, proves --list precedence over both flags, and proves no-selection-state persistence between independent runs.

Two bugs fixed from the WI-2 scaffolded skeleton:

  1. Bash: --skip= (empty) silently fell through to a full install. Fixed: ARG_SKIP_SET sentinel, mirroring ARG_ONLY_SET.
  2. PS: 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):

  • T_skip_single, T_skip_multi, T_skip_unknown, T_skip_empty
  • T_skip_conflict, T_skip_blank_trailing/leading/consecutive
  • T_list_plus_only, T_list_plus_skip, T_no_selection_persistence, T_git_hook_skip_path_safe

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_shape parity 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 develop after review.

…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>
@primetimetank21
primetimetank21 merged commit fae0b55 into develop Jul 13, 2026
10 checks passed
@primetimetank21
primetimetank21 deleted the feat/468-wi3-skip-flag branch July 13, 2026 00:00
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.

1 participant