fix(deploy): check auth before init dialog#99
Merged
JosiahParry merged 4 commits intomainfrom Mar 4, 2026
Merged
Conversation
Move resolve_server call before the _ricochet.toml check so users without an API key get an actionable error immediately instead of going through the entire init dialog first. Also show the target server URL in the init prompt so users know where the deploy will go.
Member
|
I've pulled out the We can now use let server_config = config.resolve_server(server_ref)?;
let client = RicochetClient::new(&server_config)?;
client.preflight_key_check().await?;wherever we need to check a key. Edit: some toml tests are failing—checking |
JosiahParry
approved these changes
Mar 4, 2026
Member
JosiahParry
left a comment
There was a problem hiding this comment.
Added a helper preflight_key_check() that can be used in all auth-needed commands to ensure we don't have duplicate code.
Due to putting checks first, some tests failed. Addressed these failures with mocks and serial ordering.
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
resolve_servercall to before the_ricochet.tomlcheck so users without an API key get an actionable error immediately, instead of going through the entire init dialog only to hit "No API key configured" at the end.resolve_servercall at the old location sinceserver_configis already in scope.fix #97