Repository navigation
CI dry-run for upstream PR #214 (do not merge) - #1
Closed
Alexander230 wants to merge 2 commits into
Closed
Alexander230 wants to merge 2 commits into
Alexander230 wants to merge 2 commits into
Conversation
…n#38) The @with_request_lock() decorator releases the global request lock when the handler returns, but for stream=true requests Starlette iterates the StreamingResponse body after that, so a streaming steer request ran as two separate critical sections: validation/tokenization under the decorator, then generation under a second acquire buried inside run_batched_generate (stream_lock). Between the two, other requests could interleave — a request's validation and generation were not atomic, acquisition order could invert, and on client disconnect the inner lock's release depended on async-generator finalization. Acquire the lock in the handler and release it in the streaming generator's finally (the pattern the lens endpoint already uses), so each request is one continuous critical section. Remove the now redundant stream_lock re-acquire — with the lock already held for the stream's lifetime it would deadlock the first chunk. The regression tests drive the real handlers with a stubbed model: streaming must yield its first chunk promptly (deadlock guard), hold the lock while streaming, and release it on exhaustion, on early close, and on the non-streaming path. Fixes hijohnnylin#38. Signed-off-by: Aleksandr Popov <alexander230r@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the 3.10 matrix leg (pyproject requires-python is >=3.11, so uv sync fails there and fail-fast cancels the other legs), disable fail-fast, make the app-wide lint/format/typecheck steps informational (they have months of pre-existing failures), and add a blocking step for the PR hijohnnylin#214 regression tests so the job verdict keys to this branch's change. Signed-off-by: Aleksandr Popov <alexander230r@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fork-internal rehearsal of hijohnnylin#214 with the broken 3.10 matrix leg removed and pre-existing-red steps made informational, so the runs reach pytest. The blocking final step runs the PR's regression tests. Do not merge.