Skip to content

Commit 290a80b

Browse files
jqnatividadclaude
andcommitted
ci: drop Python 3.11, test on 3.12 + 3.14, add job timeouts
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 (#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>
1 parent 459b002 commit 290a80b

9 files changed

Lines changed: 26 additions & 450 deletions

File tree

‎.github/ISSUE_TEMPLATE/bug_report.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ body:
6262
id: python
6363
attributes:
6464
label: Python version
65-
placeholder: "3.11.x"
65+
placeholder: "3.12.x"

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ jobs:
1717
test:
1818
name: tests (py${{ matrix.python-version }})
1919
runs-on: ubuntu-latest
20+
# A deadlocked test otherwise runs to GitHub's 6-hour default; three runs
21+
# burned ~14 hours of runner time that way before anyone noticed.
22+
timeout-minutes: 15
2023
strategy:
2124
fail-fast: false
2225
matrix:
23-
# 3.11 is the floor (`requires-python`); 3.14 is what the Dockerfile
26+
# 3.12 is the floor (`requires-python`); 3.14 is what the Dockerfile
2427
# ships, so it must stay in the matrix or the deployed interpreter is
2528
# the one version never tested. Bump both together.
26-
python-version: ["3.11", "3.12", "3.14"]
29+
python-version: ["3.12", "3.14"]
2730

2831
steps:
2932
- uses: actions/checkout@v7
@@ -53,6 +56,7 @@ jobs:
5356
lockfile:
5457
name: lockfile
5558
runs-on: ubuntu-latest
59+
timeout-minutes: 10
5660

5761
steps:
5862
- uses: actions/checkout@v7
@@ -72,6 +76,7 @@ jobs:
7276
types:
7377
name: types & formatting (advisory)
7478
runs-on: ubuntu-latest
79+
timeout-minutes: 10
7580
# Advisory only. Both checks carry a backlog inherited from before this
7681
# project was open sourced; they report so the debt stays visible, but they
7782
# do not block a pull request. See CONTRIBUTING.md.

‎.roborev.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ review_guidelines = """
2626
Verikan — a FastAPI + LangGraph service that answers natural-language questions about public
2727
statistical data and emits a reproducible Jupyter notebook, with citations, for every answer.
2828
29-
Python 3.11, Pydantic v2, ruff (line length 100). `src/data_concierge/ui/web.py` is the real
29+
Python 3.12, Pydantic v2, ruff (line length 100). `src/data_concierge/ui/web.py` is the real
3030
entrypoint; `api/main.py` is a secondary REST-only app.
3131
3232
Flag these project-specific defects. They are recurring, they pass tests, and they are the

‎.serena/memories/task_completion.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Run from the repo root (see the cwd trap in `mem:suggested_commands`):
44

55
```bash
66
ruff check src/ tests/ scripts/ # must pass — CI gate
7-
pytest -q --no-cov # must pass on 3.11 and 3.12 — CI gate
7+
pytest -q --no-cov # must pass on 3.12 and 3.14 — CI gate
88
```
99

1010
Advisory, run on code you touched but do not chase repo-wide:

‎.serena/memories/tech_stack.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Tech Stack
22

3-
- Python `>=3.11`; CI matrix 3.11 + 3.12. `target-version = "py311"`, mypy `python_version = "3.11"`. Do not use 3.12+-only syntax.
3+
- Python `>=3.12`; CI matrix 3.12 + 3.14. `target-version = "py312"`, mypy `python_version = "3.12"`. Do not use 3.13+-only syntax.
4+
- **3.11 was dropped deliberately.** `tests/unit/test_query_stream.py::test_cancelled_stream_reader_cancels_worker` deadlocks on 3.11 only: `gateway/query_stream.py::query_events` does `worker.cancel()` then `await worker` inside `anyio.CancelScope(shield=True)` in its `finally`, and on 3.11 that shielded await never completes when the *consumer* task is cancelled. Introduced by `fa50bfb` (PR #7). The suite passes on 3.12 and 3.14. If anyone proposes restoring 3.11, that deadlock is the blocker.
5+
- 3.14 is in the matrix because the Dockerfile ships `python:3.14-slim`. Bump the two together or the deployed interpreter goes untested.
46
- FastAPI + uvicorn + Jinja2 templates; Pydantic v2 (`pydantic-settings` for `core/config.py`).
57
- LangGraph for agent orchestration; `anthropic` SDK directly (no LangChain LLM wrappers).
68
- pandas / numpy for computation; `nbformat` + `nbclient` + `ipykernel` for notebook generation and execution.
@@ -20,7 +22,7 @@
2022
Check locally with `uv lock --check` — read-only, writes neither the lockfile nor `.venv`.
2123

2224
CI enforces it in the **`lockfile` job — blocking**, a third gate alongside `test`'s `pytest` and `ruff check`. Same rationale as `ruff check`: no backlog, so keeping it clean is free.
23-
- Its own job, not a step in `test`: the lock does not vary by Python version (so the 3.11/3.12 matrix would check it twice) and the check needs no project install, making it ~15s instead of a full dep install.
25+
- Its own job, not a step in `test`: the lock does not vary by Python version (so the 3.12/3.14 matrix would check it twice) and the check needs no project install, making it ~15s instead of a full dep install.
2426
- Changes under `[tool.ruff]`, `[tool.mypy]`, etc. do not invalidate the lock — only dependency metadata does. False positives are unlikely.
2527
- `.roborev.toml` still lists `uv.lock` in `exclude_patterns`, so the adversarial PR reviewer never reads the file; the gate is the only thing watching it.
2628

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ boundary, or make it a manual script.
2323

2424
| Check | Blocking | Notes |
2525
|---|---|---|
26-
| `pytest` | **Yes** | Must stay green on 3.11 and 3.12 |
26+
| `pytest` | **Yes** | Must stay green on 3.12 and 3.14 |
2727
| `ruff check src/ tests/ scripts/` | **Yes** | Currently clean — please keep it that way |
2828
| `ruff format --check` | No — advisory | Pre-existing drift across many files |
2929
| `mypy src/` | No — advisory | ~90 pre-existing errors, mostly missing annotations |

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
**Verikan takes the friction out of turning data into verifiable answers. Ask questions about your data in plain English – the system finds the right dataset – and Verikan enriches it with data from high-value data sources, runs real Python code against it, and explains the results clearly. Every answer is reproducible, citable, independently verifiable, and yours to keep. Over time, this positive feedback loop creates a Knowledgebase of Verified, Evidence-based Answers.**
88

99
[![CI](https://github.com/dathere/Verikan/actions/workflows/ci.yml/badge.svg)](https://github.com/dathere/Verikan/actions/workflows/ci.yml)
10-
[![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
10+
[![Python](https://img.shields.io/badge/python-3.12%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
1111
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1212
[![FastAPI](https://img.shields.io/badge/FastAPI-009688?logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com/)
1313
[![LangGraph](https://img.shields.io/badge/LangGraph-1C3C3C)](https://langchain-ai.github.io/langgraph/)
@@ -105,7 +105,7 @@ starting over, then puts the revision through the same execution and review pass
105105

106106
### Prerequisites
107107

108-
- **Python 3.11+**
108+
- **Python 3.12+**
109109
- An **Anthropic API key** ([console.anthropic.com](https://console.anthropic.com/))
110110

111111
No other credential is required. The default data source — [WPRDC](https://data.wprdc.org)

‎pyproject.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "data-concierge"
33
version = "0.1.0"
44
description = "Verikan — the verified Data Concierge: citation-backed answers about public statistical data, with a reproducible notebook for every answer"
55
readme = "README.md"
6-
requires-python = ">=3.11"
6+
requires-python = ">=3.12"
77
license = {text = "MIT"}
88
authors = [
99
{name = "datHere"}
@@ -13,8 +13,8 @@ classifiers = [
1313
"Development Status :: 3 - Alpha",
1414
"Intended Audience :: Science/Research",
1515
"License :: OSI Approved :: MIT License",
16-
"Programming Language :: Python :: 3.11",
1716
"Programming Language :: Python :: 3.12",
17+
"Programming Language :: Python :: 3.14",
1818
]
1919

2020
dependencies = [
@@ -90,7 +90,7 @@ build-backend = "setuptools.build_meta"
9090
where = ["src"]
9191

9292
[tool.ruff]
93-
target-version = "py311"
93+
target-version = "py312"
9494
line-length = 100
9595

9696
[tool.ruff.lint]
@@ -119,7 +119,7 @@ ignore = [
119119
known-first-party = ["data_concierge"]
120120

121121
[tool.mypy]
122-
python_version = "3.11"
122+
python_version = "3.12"
123123
warn_return_any = true
124124
warn_unused_configs = true
125125
disallow_untyped_defs = true

0 commit comments

Comments
 (0)