ci: drop Python 3.11, test on 3.12 + 3.14, add job timeouts - #10
Merged
Merged
Conversation
tests/unit/test_query_stream.py::test_cancelled_stream_reader_cancels_worker deadlocks on Python 3.11 only. gateway/query_stream.py::query_events cancels its worker and then awaits it inside an anyio.CancelScope(shield=True) in the finally block; on 3.11 that shielded await never completes when the consumer task is cancelled, so the cancelled reader never finishes and the loop sits idle with nothing runnable. Reproduced in a 3.11 venv; passes on 3.12 and 3.14. Introduced by fa50bfb (dathere#7) — every CI run since has hung, and with no timeout-minutes on any job each one ran toward the 6-hour default. 3.14 stays in the matrix because the Dockerfile ships python:3.14-slim, so the deployed interpreter was the one version CI never exercised. This removes the interpreter that exposes the deadlock; it does not fix query_events. Restoring 3.11 would meet it again. Verified: 802 passed, 2 skipped on both 3.12 and 3.14; ruff clean under the new py312 target; uv lock --check clean. Co-Authored-By: Claude Opus 5 (1M context) <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.
Drop Python 3.11, move the test matrix to 3.12 + 3.14, and stop a hung job from
burning a full runner day.
Why
tests/unit/test_query_stream.py::test_cancelled_stream_reader_cancels_workerdeadlocks on Python 3.11 only.
gateway/query_stream.py::query_eventsdoesworker.cancel()and thenawait workerinside ananyio.CancelScope(shield=True)in its
finally; on 3.11 that shielded await never completes when the consumertask is cancelled, so the cancelled reader never finishes and the event loop sits
idle with nothing runnable. Reproduced locally in a 3.11 venv; passes on 3.12 and
3.14.
This was introduced by fa50bfb (#7) and has hung every CI run since — the last
green run was the commit immediately before it. Three runs were cancelled at
roughly 6h, 1.5h and 6h, because no job carried a
timeout-minutes.3.14 joins the matrix because the Dockerfile ships
python:3.14-slim, so thedeployed interpreter was the one version CI never exercised.
Changes
requires-python = ">=3.12"; rufftarget-version = "py312"; mypypython_version = "3.12"["3.12", "3.14"], andtimeout-minuteson all three jobsuv.lockregenerated (dropsasync-timeoutandtomli, both 3.11-only backports).roborev.toml, issue-template placeholderVerified
802 passed, 2 skippedon both 3.12 and 3.14 locally;ruff checkclean under thenew target;
uv lock --checkclean.Not fixed here
query_eventsstill has the shielded-cleanup bug. Restoring 3.11 would meet it again.
Dockerfile:62still copies/usr/local/lib/python3.11/site-packageswhile thebase image is
python:3.14-slim, so that path does not exist in the builder stageand the image build almost certainly fails. No workflow builds the image, which is
why docker: bump python from 3.11-slim to 3.14-slim #3 shipped it unnoticed. Separate bug, separate PR — unverified here because no
Docker daemon was available.
🤖 Generated with Claude Code