starknet_transaction_prover: add /health endpoint via HealthLayer#14163
starknet_transaction_prover: add /health endpoint via HealthLayer#14163avi-starkware wants to merge 1 commit into
Conversation
Adds a tower middleware that short-circuits `GET /health` ahead of
jsonrpsee (which would 405 a GET) and returns `{"status":"ok"}`. Wired
outermost in both the HTTP and HTTPS middleware chains so load balancers
can probe before any per-request work runs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit c26d49f. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c26d49f. Configure here.
| // Always ready: the health fast-path doesn't need the inner service. | ||
| // Inner backpressure is driven on demand by `inner.call` below. | ||
| Poll::Ready(Ok(())) | ||
| } |
There was a problem hiding this comment.
Inner service called without poll_ready violating tower contract
Medium Severity
poll_ready unconditionally returns Poll::Ready(Ok(())) without propagating to the inner service, yet call directly invokes self.inner.call(request) for non-health requests. This violates the tower Service contract — call may only be invoked after the service's own poll_ready has returned ready. The sibling OhttpService in crates/tower_ohttp/src/layer.rs handles this correctly by cloning the inner service and calling inner.oneshot(request) which internally polls readiness. If a backpressure-sensitive layer (e.g., ConcurrencyLimit or Buffer) is ever added to the middleware chain, this could cause panics or dropped requests.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c26d49f. Configure here.
avi-starkware
left a comment
There was a problem hiding this comment.
@avi-starkware resolved 1 discussion.
Reviewable status: 0 of 4 files reviewed, all discussions resolved.



Adds a tower middleware that short-circuits
GET /healthahead ofjsonrpsee (which would 405 a GET) and returns
{"status":"ok"}. Wiredoutermost in both the HTTP and HTTPS middleware chains so load balancers
can probe before any per-request work runs.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com