Skip to content

CI dry-run for upstream PR #214 (do not merge) - #1

Closed
Alexander230 wants to merge 2 commits into
mainfrom
ci-dryrun-38
Closed

Alexander230 wants to merge 2 commits into
mainfrom
ci-dryrun-38

Conversation

@Alexander230

Copy link
Copy Markdown
Owner

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.

Alexander230 and others added 2 commits July 15, 2026 11:49
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant