[2/5] fix(sglang): confirm router worker activation - #1804
Open
ashtonchew wants to merge 2 commits 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,
guapisolo,
jybsuper,
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
Router 0.2.2 and later use the asynchronous worker lifecycle. The existing
SGLangEnginepath treated a successful registration or removal request as the completed state. That can expose an engine before activation is confirmed, lose the identity required for cleanup, or submit the same operation again after an ambiguous response.This second layer integrates the typed lifecycle from PR #1801 with engine startup and shutdown. It establishes a callable publication boundary while leaving the Ray recovery ordering to PR #1805.
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
register_with_routerinitialization decision so a caller can start an engine without making it routable.finallypath even when router cleanup raises.Validation
Layer checks
4f4056c872.Stack check
At fixed stack head
5fdef0252e, the recovered engine stayed out of router membership while weight transfer was held. It appeared only after transfer completed and activation was confirmed. The paired baseline and fixed method, results, and proof boundary are documented in PR #1805.This layer establishes the boundary used by that fix: Miles can start a recovered engine privately and wait until the router confirms activation.
Risks and Follow-ups
Router 0.3.x URL-to-UUID reconciliation is bounded. If an accepted registration never becomes observable before the cleanup deadline, recovery must replace that engine generation with a fresh worker URL rather than retrying an operation with an unknown outcome.