feat(cli): confirm before configure collapses an existing config#18
Open
flobernd wants to merge 1 commit into
Open
feat(cli): confirm before configure collapses an existing config#18flobernd wants to merge 1 commit into
flobernd wants to merge 1 commit into
Conversation
build_configured_persisted_config always writes exactly one upstream and one profile, so running `llmconduit configure` against a hand-edited config with more upstreams or profiles silently dropped the rest at write time. Add configure_collapse_warning, a pure helper that flags configs with more than one upstream or profile and names what would be lost, and wire it into run_configure_flow ahead of the wizard's prompts: on a warning, require an explicit (default-no) confirmation before continuing, and exit without writing or prompting further on decline. Closes local-inference-lab#35
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.
Summary
llmconduit configurenow asks for confirmation before rewriting a config that has more than one upstream or more than one profile, printing the entries whose data the collapse would discard. The confirmation defaults to no; declining exits without writing and without further prompts. The decision logic lives in a pure, unit-tested helper; only theConfirmprompt itself is interactive.Testing
Full
cargo testgreen (743+ tests, 0 failed),cargo fmt --checkclean,cargo clippy --all-targetszero warnings. Three new unit tests cover the no-warning case, the multi-upstream summary, and the multi-profile summary.Closes local-inference-lab#35.
Notes
Stacked on local-inference-lab#36's branch; retarget or rebase once that merges.