Skip to content

fix(rpc): route --network through the enable prompt when Tooling Access is off (DX-6132)#55

Merged
johnpmitsch merged 1 commit into
mainfrom
dx-6132-qn-rpc-network-errors-instead-of-prompting-to-enable-tooling
Jul 10, 2026
Merged

fix(rpc): route --network through the enable prompt when Tooling Access is off (DX-6132)#55
johnpmitsch merged 1 commit into
mainfrom
dx-6132-qn-rpc-network-errors-instead-of-prompting-to-enable-tooling

Conversation

@johnpmitsch

Copy link
Copy Markdown
Collaborator

Summary

  • qn rpc --network on an account without Tooling Access enabled now offers to enable it (y/N prompt on a TTY, --yes to auto-enable, actionable error otherwise) instead of failing with "endpoint did not report an id".
  • The --network lane 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_networks now checks status.enabled, routes through the existing maybe_enable gate when off, re-fetches status, then requires the endpoint id.
  • The "did not report an id" error is reserved for the genuinely provisioned-but-idless case.

Closes DX-6132

Test plan

  • cargo test --test rpc — including the two new 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
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check

…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.
@johnpmitsch johnpmitsch merged commit a981b5b into main Jul 10, 2026
13 checks passed
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.

3 participants