[1/5] feat(router): model asynchronous worker lifecycle - #1801
Open
ashtonchew wants to merge 1 commit into
Open
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This was referenced Jul 26, 2026
ashtonchew
marked this pull request as ready for review
July 26, 2026 21:11
ashtonchew
requested review from
Shi-Dong,
Zhichenzzz,
fzyzcjy,
maocheng23,
yueming-yuan and
yushengsu-thu
as code owners
July 26, 2026 21:11
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
Summary
Context
The SGLang Model Gateway worker API queues worker registration and removal: a
202 Acceptedresponse means that the background job was accepted, not that the worker is active or absent. A lost or malformed submission response is also ambiguous; immediately repeating the request can duplicate an operation that the router is already processing.The recovery race reported in issue #1724 needs an observable publication boundary. This first layer isolates that router state machine so its version-specific identity handling, polling, and reconciliation can be reviewed independently from engine recovery.
Stack goal: This five-PR sequence addresses issue #1724: recovered updatable engines remain unroutable until actor-weight synchronization succeeds, and both rollout ingestion paths reject evidence that this invariant was violated.
All public drafts target
mainbecause external-fork branches cannot be selected as base refs in this repository. This matches the existing Miles external-stack convention: descendants appear cumulative until their parents merge, then GitHub removes shared commits from later diffs. Merge in order. If a parent is squash- or rebase-merged and commit identities change, rebase the descendants onto the updatedmainbefore continuing.Description
Validation
Layer checks
pytest tests/fast/backends/sglang_utils/test_router_worker_client.py: 23 passed. The tests cover accepted jobs, terminal failures, ambiguous submissions, transient observations, idempotent removal, and both worker identity formats.b202e61f54.Stack context
This PR does not change a runtime call site, so it does not make a standalone GPU claim. The controlled 8-B200 red/green test is documented in PR #1805, which owns the recovery ordering change. That test depends on the observable router activation boundary introduced here.
Risks and Follow-ups
The client accepts additional response fields but validates every field required by the supported 0.2.x and 0.3.x contracts. A future incompatible Router schema will require an explicit model update. Runtime behavior remains unchanged until the next layer adopts this client.