fix(rpc): route --network through the enable prompt when Tooling Access is off (DX-6132)#55
Merged
johnpmitsch merged 1 commit intoJul 10, 2026
Conversation
…ss is off (DX-6132) The --network lane resolved the per-network URL map in ensure_networks before reaching the enable-recovery flow, so an account that hadn't enabled Tooling Access hit a hard 'endpoint did not report an id' error instead of the enable gate the default lane offers. ensure_networks now checks status.enabled and, when off, routes through the existing maybe_enable gate (TTY prompt / --yes auto-enable / actionable error), re-fetches status, then requires the endpoint id. The 'did not report an id' error is reserved for the provisioned-but-idless case. Reuses maybe_enable verbatim so gating matches the default lane. Adds two tests: disabled + non-TTY without --yes fails with the enable hint and makes zero enable/URL-fetch/RPC calls; disabled + --yes enables, re-fetches, and routes to the mapped URL.
alehlopeh
approved these changes
Jul 10, 2026
ErikTech
approved these changes
Jul 10, 2026
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
qn rpc --networkon an account without Tooling Access enabled now offers to enable it (y/N prompt on a TTY,--yesto auto-enable, actionable error otherwise) instead of failing with "endpoint did not report an id".--networklane resolved the per-network URL map before reaching the enable-recovery flow, so it never hit the enable gate the default-network lane already offers.ensure_networksnow checksstatus.enabled, routes through the existingmaybe_enablegate when off, re-fetches status, then requires the endpoint id.Closes DX-6132
Test plan
cargo test --test rpc— including the two new tests: disabled + non-TTY without--yesfails with the enable hint and makes zero enable/URL-fetch/RPC calls; disabled +--yesenables, re-fetches, and routes to the mapped URLcargo clippy --all-targets -- -D warningscargo fmt --check