fix: validate --loadout before the missing-config banner in min session activate - #1153
Conversation
`min session activate` printed the "No minimal.toml found ... Continuing without one" banner from the config-scaffold offer before resolving `--loadout`, so passing a nonexistent loadout file showed a "proceeding" notice immediately followed by a not-found error. Move the scaffold offer to after loadout resolution so argument validation fails before any output is emitted. The banner's order relative to the "Applying loadouts" notice is unchanged.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[inbox-patch:clobber] This PR would revert recently merged workSimulating this merge shows it undoing commits that landed on the base branch within the last 3 day(s):
Before merging, restore the reverted region to its state on the base branch. The rest of this PR is unaffected. If a listed commit is one this PR intends to supersede, say so and merge — this check reports, it does not block. |
The
|
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABKmgwZw
min session activateprinted the "No minimal.toml found ... Continuing without one" scaffold-offer banner before resolving the--loadoutargument, so passing a loadout file that does not exist produced a "proceeding" notice immediately followed by a not-found error — a contradictory sequence. The scaffold offer now runs after loadout resolution, so a bad--loadoutfails before any output is emitted; the banner's order relative to the "Applying loadouts" line is unchanged. The offer is a convenience, not a precondition (informed by #682), so moving it past argument validation preserves its behaviour. No unit test accompanies the change: the reorder lives in a daemon-driven async activation path the test harness does not exercise in isolation.Verification
cargo fmt --all --check --manifest-path target/Cargo.toml — clean, no drift
cargo clippy --workspace --locked --manifest-path target/Cargo.toml -- -D warnings — 0 warnings, finished in 9m 44s
cargo build --workspace --locked --manifest-path target/Cargo.toml — ok, finished in 3m 48s
cargo test --workspace --locked --manifest-path target/Cargo.toml — ok, exit 0, no failing tests
Note
Fix
--loadoutvalidation to run before the missing-config banner incmd_activatePreviously,
offer_mfile_scaffold()was called before loadout resolution incmd_activate, meaning a scaffold prompt could appear even when the--loadoutflag was invalid. The call is now deferred until after loadouts are resolved and options are composed, so a bad--loadoutvalue fails fast without printing the scaffold offer.Macroscope summarized 6cbb44a.