Skip to content

fix(core): offline on testnet or mainnet no longer blames a devnet name - #694

Merged
PastaPastaPasta merged 1 commit into
masterfrom
fix/quorum-hint-named-networks
Nov 24, 2026
Merged

PastaPastaPasta merged 1 commit into
masterfrom
fix/quorum-hint-named-networks

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

With no network, every dg read and every git fetch/git push on testnet ends E701 with this extra fix line:

or:    if the devnet name is wrong, `--devnet-name testnet` is the one that failed: its quorum service host `quorums.testnet.networks.dash.org` does not resolve

There is no devnet involved, and on mainnet the line would name --devnet-name mainnet. Found in the mainnet-readiness CLI QA, running dg repo view, dg issue create, git fetch and git push in a network namespace with no interfaces.

The hint exists for a mistyped devnet name (QW3-068), whose quorum host does not resolve. testnet and mainnet can never be devnet names (validate_devnet_name refuses them), so unresolved_quorum_devnet now returns None for them, and E701 keeps only its connection fixes.

Test: an_offline_testnet_or_mainnet_names_no_devnet. It fails without the change and passes with it (cargo test -p forge-core --lib user_error, 62 passed). Clippy and fmt are clean.

🤖 Generated with Claude Code

With no network, every read fails to resolve quorums.testnet.networks.dash.org, and E701
added "if the devnet name is wrong, `--devnet-name testnet` is the one that failed". The
hint is for a mistyped devnet name; testnet and mainnet are not devnet names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fea3efc3-da19-41e0-be3e-adb36f03ed4a
Commits

Reviewing files that changed from the base of the PR and between d582ba2 and 5fba59e.

Files selected for processing: 1

  • crates/forge-core/src/user_error.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve

The hint is now right on all three networks:

  • testnet / mainnet: unresolved_quorum_devnet returns None for quorums.testnet… / quorums.mainnet… (crates/forge-core/src/user_error.rs:1868), so an offline E701 keeps only its two connection fixes. These are the exact hosts Network::quorum_url builds for them (network.rs:92-93), in lowercase, so the case-sensitive match covers them.
  • real devnets: unchanged. A name that validate_devnet_name accepts can never be testnet/mainnet, so a devnet that won't resolve (a typo or offline) still gets the --devnet-name <name> line from QW3-068. The existing nosuchdevnet tests still cover that.

Verified on a clean Linux sandbox: an_offline_testnet_or_mainnet_names_no_devnet passes with the change. With the matches! line removed it fails (left: Some("testnet")). CI is green.

Nit (non-blocking): validate_devnet_name (network.rs:189-192) reserves mainnet | testnet | devnet | local | regtest, compared case-insensitively. This filter lists only two of them. Sharing one reserved-names list would keep the two from drifting, but nothing in the SDK resolves a quorum host for the other three today, so this is cosmetic.


🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta merged commit 5f8af7c into master Nov 24, 2026
17 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.

1 participant