Skip to content

feat: add stop cmd#700

Open
aspnxdd wants to merge 6 commits into
solana-foundation:mainfrom
aspnxdd:feat/add-stop-cmd
Open

feat: add stop cmd#700
aspnxdd wants to merge 6 commits into
solana-foundation:mainfrom
aspnxdd:feat/add-stop-cmd

Conversation

@aspnxdd

@aspnxdd aspnxdd commented Jun 25, 2026

Copy link
Copy Markdown

Closes #629

Add stop command that internally does an RPC request with "exit" - better UX

surfpool stop
image

I also tried the stop command in the PR #704 and it works with the --daemon flag : it stops the process.

@aspnxdd aspnxdd marked this pull request as ready for review June 26, 2026 10:51
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a surfpool stop command for requesting a running instance to exit.

  • New stop CLI subcommand with a configurable RPC URL.
  • JSON-RPC exit request sent to the selected endpoint.
  • Bounded HTTP client timeout for the stop request.
  • Response validation for JSON-RPC version, request id, result, and RPC errors.
  • Tests for stop command parsing and response handling.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
crates/cli/src/cli/mod.rs Adds the stop command, sends a bounded JSON-RPC exit request, validates the response shape, and covers the main parser and response cases with tests.

Reviews (4): Last reviewed commit: "Update crates/cli/src/cli/mod.rs" | Re-trigger Greptile

Comment thread crates/cli/src/cli/mod.rs Outdated
Comment thread crates/cli/src/cli/mod.rs
aspnxdd and others added 2 commits June 26, 2026 12:55
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Comment thread crates/cli/src/cli/mod.rs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.

No clean way to stop the daemon surfpool instance

1 participant