Skip to content

Add a health check method to JSON RPC#3223

Merged
konnov merged 3 commits intomainfrom
igor/health-check
Nov 21, 2025
Merged

Add a health check method to JSON RPC#3223
konnov merged 3 commits intomainfrom
igor/health-check

Conversation

@konnov
Copy link
Copy Markdown
Collaborator

@konnov konnov commented Nov 21, 2025

This is a simple PR, adding a health check method, to help the external callers see, whether the service is up.

  • Tests added for any new code
  • Ran make fmt-fix (or had formatting run automatically on all files edited)
  • Documentation added for any new functionality
  • Entries added to ./unreleased/ for any new functionality

@konnov konnov requested review from Copilot and thpani November 21, 2025 08:49
@konnov konnov marked this pull request as ready for review November 21, 2025 08:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a health check endpoint to the JSON RPC server to allow external callers to verify that the service is operational.

  • Introduces a new health method that returns a simple "OK" status
  • Adds comprehensive documentation for the new endpoint
  • Includes test coverage for the health check functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
json-rpc/src/main/scala/com/github/apalachemc/apalache/jsonrpc/ExplorationServiceResult.scala Adds HealthCheckResult case class to represent the health check response
json-rpc/src/main/scala/com/github/apalachemc/apalache/jsonrpc/JsonRpcServer.scala Implements the health() method in ExplorationService and adds the method to the JSON-RPC dispatcher
json-rpc/src/test/scala/com/github/apalachemc/apalache/jsonrpc/TestExplorationService.scala Adds test case to verify the health check functionality
json-rpc/README.md Documents the new health check method with input/output examples and curl command
.unreleased/features/health-check.md Adds changelog entry for the new feature

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

@@ -30,6 +30,8 @@ object NextModelStatus {
val UNKNOWN = "UNKNOWN"
}

Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

The HealthCheckResult case class should have documentation similar to other result classes in this file. Consider adding a ScalaDoc comment that describes the purpose and the status parameter. For example:

/**
 * The result of a health check.
 * @param status
 *   the health status, typically "OK"
 */
case class HealthCheckResult(status: String) extends ExplorationServiceResult
Suggested change
/**
* The result of a health check.
* @param status
* the health status, typically "OK"
*/

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@thpani thpani left a comment

Choose a reason for hiding this comment

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

If it always returns "OK", I'd prefer to call it "ping" and return some generic value, but that's probably nitpicking 😄

@konnov konnov merged commit 29b0bab into main Nov 21, 2025
16 checks passed
@konnov konnov deleted the igor/health-check branch November 21, 2025 12:27
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