[5/6][rollout] feat: server admission control, rollout status, and cancel endpoints - #287
Merged
Merged
Conversation
mathewjhan
force-pushed
the
mathew/server-endpoints
branch
from
August 6, 2026 22:29
058c5de to
dd1535a
Compare
JoyboyBrian
approved these changes
Aug 6, 2026
mathewjhan
force-pushed
the
mathew/server-endpoints
branch
from
August 6, 2026 22:31
dd1535a to
21e5bdd
Compare
…endpoints Co-authored-by: Cursor <cursoragent@cursor.com>
mathewjhan
force-pushed
the
mathew/server-endpoints
branch
from
August 6, 2026 22:31
21e5bdd to
eebfe35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of splitting #272 into reviewable pieces (5/6). Builds on #286 (backend capabilities).
What this adds
Three server-level behaviors that let a trainer manage load and track rollouts over plain HTTP:
POST /rollout: when the backend's queue is atmax_queue_depth, the server answers429with aRetry-Afterheader instead of accepting work it cannot start. Accepted rollouts return202, which states what actually happens: the rollout is queued and runs after the response is sent.GET /rollout/{id}/status: reportsqueued,running, orgradingfor live rollouts, andsuccess/failure/cancelled(with reward and error message) for recently finished ones, retained for a fixed window. Anything else returnsunknown. A trainer polls this as a liveness signal instead of trusting a blind timeout.POST /rollout/cancel: takes exactly one selector —{"ids": [...]},{"prefix": "tenant-a::"}, or{"all": true}— and returns a disposition per rollout (cancelled_queued,cancelled_running,not_found). Prefix cancellation is what a controller uses to stop everything belonging to one adapter when it is deregistered. Cancelling an already-finished rollout returnsnot_found, so the call is safe to repeat.Example