Skip to content

feat(cli): confirm before configure collapses an existing config#18

Open
flobernd wants to merge 1 commit into
profile-routingfrom
configure-collapse-confirm
Open

feat(cli): confirm before configure collapses an existing config#18
flobernd wants to merge 1 commit into
profile-routingfrom
configure-collapse-confirm

Conversation

@flobernd

Copy link
Copy Markdown
Owner

Summary

llmconduit configure now 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 the Confirm prompt itself is interactive.

Testing

Full cargo test green (743+ tests, 0 failed), cargo fmt --check clean, cargo clippy --all-targets zero 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.

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
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