Skip to content

fix: Identify broken network processes - #678

Merged
adamspofford-dfinity merged 1 commit into
mainfrom
spofford/consistent-start
Jul 27, 2026
Merged

fix: Identify broken network processes#678
adamspofford-dfinity merged 1 commit into
mainfrom
spofford/consistent-start

Conversation

@adamspofford-dfinity

@adamspofford-dfinity adamspofford-dfinity commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #577.

Copilot AI review requested due to automatic review settings July 27, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds gateway health probing so network start can replace defunct managed-network processes.

Changes:

  • Probes the gateway status endpoint with a timeout.
  • Stops unresponsive launchers and cleans stale descriptors.
  • Adds an integration test for defunct launcher recovery.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
crates/icp/src/network/config.rs Adds gateway responsiveness probing and errors.
crates/icp-cli/src/commands/network/start.rs Restarts alive but unresponsive networks.
crates/icp-cli/tests/network_tests.rs Tests defunct launcher replacement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/icp/src/network/config.rs
Comment thread crates/icp-cli/tests/network_tests.rs
@adamspofford-dfinity
adamspofford-dfinity marked this pull request as ready for review July 27, 2026 12:18
@adamspofford-dfinity
adamspofford-dfinity requested a review from a team as a code owner July 27, 2026 12:18

@marc0olo marc0olo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM — reviewed the logic (port-freeing via stop_launcher, descriptor-write-after-init so booting networks can't be misclassified) and the test. Solid, well-documented, and conventioned.

One small note, assuming it's a conscious decision: is_responsive() only maps connect/timeout errors to Ok(false), so any other probe error (e.g. a malformed HTTP response, or DNS failure for a non-localhost host) makes network start abort rather than fall through to recovery. That's clearly deliberate per the doc comment ("leaves the question unanswered"), just flagging it since the whole point of the feature is to recover from a wedged launcher. Happy either way.

@adamspofford-dfinity
adamspofford-dfinity merged commit 63da8b0 into main Jul 27, 2026
102 checks passed
@adamspofford-dfinity
adamspofford-dfinity deleted the spofford/consistent-start branch July 27, 2026 15:52
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.

Local network reports "already running" after host sleep, but PocketIC is defunct and gateway is unreachable.

3 participants