Skip to content

fix(doctor): use configured localnet port instead of hardcoded 3040#41

Open
teyrebaz33 wants to merge 1 commit into
logos-co:masterfrom
teyrebaz33:fix/doctor-uses-configured-port
Open

fix(doctor): use configured localnet port instead of hardcoded 3040#41
teyrebaz33 wants to merge 1 commit into
logos-co:masterfrom
teyrebaz33:fix/doctor-uses-configured-port

Conversation

@teyrebaz33
Copy link
Copy Markdown
Contributor

Closes #40

Problem

doctor hardcodes 127.0.0.1:3040 for the sequencer port check, ignoring the localnet.port value in scaffold.toml. This means projects using a non-default port always see the sequencer reported as unreachable in doctor output.

Fix

Use project.config.localnet.port to build the address and label dynamically — consistent with how localnet start, localnet status, and localnet stop already behave.

Changes

  • src/commands/doctor.rs: derive localnet_addr and sequencer_port_label from project config
  • tests/cli.rs: new test verifying doctor uses configured port, not hardcoded 3040

Testing

cargo test doctor_uses_configured_localnet_port

@teyrebaz33 teyrebaz33 requested a review from a team April 6, 2026 17:22
Comment thread src/commands/localnet.rs
Start { timeout_sec: u64 },
Stop,
Status { json: bool },
Logs { tail: usize },
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

json parameter seems to be from another change/PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, thanks for catching that! The json field on Logs is part of PR #39 (feat: add --json flag to localnet logs). This PR (#41) only changes src/commands/doctor.rs to use project.config.localnet.port instead of the hardcoded 3040. The extra commit appeared here because this branch was created from the same base. I can rebase to isolate just the doctor fix if that would help.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

seems the unrelated change is still here

@teyrebaz33
Copy link
Copy Markdown
Contributor Author

I've rebased this PR onto master so it now contains only the doctor fix commit — the json field on Logs is no longer included here (that belongs to #39). The branch has been updated to fix/doctor-uses-configured-port-v2.

@teyrebaz33
Copy link
Copy Markdown
Contributor Author

Branch has been force-pushed and now contains exactly 1 commit with 2 files changed: src/commands/doctor.rs (the port fix) and tests/cli.rs (the test). No unrelated changes remain.

@teyrebaz33 teyrebaz33 force-pushed the fix/doctor-uses-configured-port branch from 0f9a304 to 616bb1f Compare April 11, 2026 12:29
@teyrebaz33 teyrebaz33 force-pushed the fix/doctor-uses-configured-port branch from 616bb1f to 6ebface Compare April 11, 2026 12:33
@fryorcraken
Copy link
Copy Markdown
Collaborator

Thanks @teyrebaz33. Holding off on a detailed review — what review is finding points at process gaps worth closing first. Please revise against the points below, then ping me for another pass. The repo's CONTRIBUTING.md is the contract these come from, in particular the "What Makes a High-Quality PR" section.

  • Read your own diff and run the local checks before pushing
  • Keep the PR to a single concern
  • Make sure the PR description and commits match what the diff actually does
  • Walk the repo's validation flow before asking for review

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.

bug: doctor uses hardcoded port 3040 instead of configured localnet port

3 participants