fix(init): skip interactive prompts when --resume is passed (closes #2098) - #2147
fix(init): skip interactive prompts when --resume is passed (closes #2098)#2147Larslllllll wants to merge 1 commit into
Conversation
…powise-dev#2098) When --resume is passed, the interactive gate was bypassed for the git-tier check but all other prompts (mode menu, provider selection, etc.) ran again. This changes the is_interactive expression to include `and not resume` so that resume runs fall through to the non-interactive path that reads stored configuration from .repowise/config.yaml and state.json. Also prints a one-line notice naming the mode being resumed so the user can confirm the run was picked up rather than restarted.
|
Thanks @Larslllllll, and sorry for the collision: #2106 was opened against #2098 two days before this and is already through review, so that is the one I am going to land. Nothing wrong with your read of the bug, you landed on the same one-line gate. Two differences worth knowing for next time, since neither is obvious from the issue. #2106 lifts the predicate out into a small If you want another one in the same area, #2137 is open and unassigned: I am leaving this open rather than closing it today: if #2106 goes quiet on the string change I asked for, yours is the fallback and I will merge it instead. Either way you will hear which on this thread. |
Summary
When
repowise init --resumeis run on a TTY, the entire interactive questionnaire runs again (banner, mode menu, provider selection, etc.), defeating the purpose of--resume.The git-tier is already handled correctly by
effective_run_mode_for_resume()(computed before the interactive gate, so a fast resume never re-prompts for it). All other prompts were not similarly gated.Root cause
is_interactiveat line 1010 had no check forresume:Fix
and not resumeto theis_interactiveexpression, so resume runs always fall through to the non-interactive path.[dim]Resuming a full run — reusing stored configuration.[/dim]) so the user can see the run was picked up rather than restarted.The non-interactive path reads stored configuration from
.repowise/config.yamlandstate.json, so the prior run's provider, model, language, and other choices are reused automatically.Fixes #2098