Repository navigation
fix(cli): re-prompt for Control API URL when discovery fails - #178
Draft
cubeorgdev[bot] wants to merge 1 commit into
Draft
cubeorgdev[bot] wants to merge 1 commit into
cubeorgdev[bot] wants to merge 1 commit into
Conversation
A well-formed but wrong Control API URL passed inline validation, then failed discovery and exited 1, forcing a full restart of `blue setup`. Wrap prompt + discovery in a shared retry loop used by setup(), start() first-run, and run() newly-configured: report the error, offer to try a different URL (pre-filled), cancel cleanly on decline, cap at 5 attempts. Non-TTY fail-fast and inline URL validation are unchanged. Fixes #90 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
This pull request was created from a Blocks session. View in dashboard | View on desktop
|
Contributor
Author
|
Test from the |
This branch has not been deployed
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.
Fixes #90
If discovery fails during
blue setup(DNS/TLS/timeout, non-2xx, bad JSON, invalid discovery document), Blue now shows the error and asks "Try a different Control API URL?" with the previous URL pre-filled. Before this change it exited 1.discover_with_retry/discover_control_api, used in all three places:setup(), first run ofstart(), andrun()when not yet configured. The issue lists two of these;run()had the same bug.outro_cancel("Setup cancelled; no files were changed.")and exits 0, the same as theresetcancel path.MAX_DISCOVERY_ATTEMPTS). After the last failure it returns the last error and exits 1.commands::tests::discovery_retry. They use injected fake prompt/discover/confirm/report closures, so they need no TTY or network.cargo test --workspace,cargo clippy --all-targetsandcargo fmt --all -- --checkall pass locally.🤖 Generated with Claude Code