Skip to content

shakedown: wave 14: guided picker for ./run (interactive, builds the run from answers)#11

Merged
ugglr merged 1 commit into
mainfrom
wave-14-picker
Jun 3, 2026
Merged

shakedown: wave 14: guided picker for ./run (interactive, builds the run from answers)#11
ugglr merged 1 commit into
mainfrom
wave-14-picker

Conversation

@ugglr

@ugglr ugglr commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Asked for by the user: with no flags on a terminal, ./run now guides you instead of making you remember flags.

What it does

  • interactive_picker(): bare ./run on a TTY detects the SKU for a header, then asks "verify a new Mac (thorough) vs quick check", and for the thorough path two follow-ups (strict gating, and the opt-in AI/LLM load). It echoes the command it built (-> ./run --store --strict), prints a one-line heads-up, and flows straight into the run.
  • Sets the same variables the flags would, then the existing --store expansion and export STRICT pick them up (no reordering).
  • The picker is the confirmation, so it sets SHAKEDOWN_YES=1 to skip the second "Proceed?" prompt.

Skipped cleanly (unchanged behavior)

Any explicit flag (ARGC > 0), a non-interactive stdin (-t 0 false: pipe / < /dev/null / CI), or SHAKEDOWN_YES=1 bypasses the picker entirely. Scripted and flag-driven use is identical to before.

Verification

  • Picker logic (extracted function, piped answers): choice 1+y+n -> --store --strict; 1+n+y -> --store --llama; 2 -> default; 3 -> prints --help pointer and exits 0; all of 1/2 set SHAKEDOWN_YES=1 so the second prompt is skipped.
  • PTY test (real terminal): the picker fires only on a TTY, shows the detected SKU + menu, and choice 3 exits 0 with no set -u error (the trap is installed ~300 lines later, after the picker).
  • Non-interactive regression: ./run --no-sudo < /dev/null skips the picker (0 menu lines) and completes normally.
  • Lint clean (shellcheck, bash -n, all PYEOF heredocs ast.parse, zero em dashes). Docs updated (README quickstart, Store Day Checklist now leads with ./run + "pick option 1", CHANGELOG).

Passed dad review: correctness clean (a flagged "will-break" trap-vs-set-u issue was a false positive, verified by ordering + the live PTY run); applied the consistency fixes (read -r -p, lowercase shakedown: header) and the simplicity fix (flow into the run instead of double-prompting).

@ugglr
ugglr merged commit 840d7e6 into main Jun 3, 2026
1 check passed
@ugglr
ugglr deleted the wave-14-picker branch June 3, 2026 10: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.

1 participant