[1/5][BREAKING][rollout][server] refactor: replace callbacks with leased long polling - #345
Draft
mathewjhan wants to merge 2 commits into
Draft
[1/5][BREAKING][rollout][server] refactor: replace callbacks with leased long polling#345mathewjhan wants to merge 2 commits into
mathewjhan wants to merge 2 commits into
Conversation
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.
What
Replaces completion/grader callbacks with server-owned result futures and
GET /rollout/{id}/result. Adds polling leases, result retention, and duplicate rollout ID rejection. Local and Harbor backends now return anExecutionOutcomecontaining the workflow result and optional grader result.Why
The caller can retrieve rollout outcomes without exposing callback endpoints. A polling lease also lets the server stop work when the caller stops polling.
Migration and dependencies
This is a breaking wire and backend API change: callback request/result models,
ControllerAuth,controller_api_key, andGET /rollout/{id}/statusare removed; callers must supplyllm_api_keyexplicitly when the inference endpoint requires authentication. Custom backends must implement the new return-value contract, andgradecontrols whether grading runs.This layer accepts a caller-provided polling lease; #346 changes admission to issue the lease on the server and adds the client. #347 migrates local eval. Stack: #345 → #346 → #347 → #348 → #349.
Existing TrainGate consumers still use callbacks. Osmosis-AI/osmosis-traingate#300 changes a MILES recipe, and Osmosis-AI/osmosis-traingate#301 adds recovery through the old status endpoint; neither migrates to this protocol. Rollout servers and their consumers need a coordinated migration before rollout.
How to Test
Run the lease, result registry, server admission, and Local/Harbor backend unit tests, then exercise admission → repeated polling → terminal result, lease expiry, and explicit cancellation.
Current CI is not green. Review of the complete stack also identified result serialization and workflow-error propagation issues in this layer; those fixes remain pending.