chore(docker): pin Python base image to 3.12 to match CI (#87) #163

Merged
claude-bot merged 1 commit from chore/87-python-pin-v2 into main 2026-07-15 23:08:43 +00:00
Contributor

Rebased replacement for #160 (which conflicted with #20 in renovate.json after #20 merged first). Conflict resolved by keeping both the ruff pin (#20) and the python-image pin (#87) as separate Renovate rules.

Summary

The Dockerfile shipped python:3.14-slim for both runtime images while all CI runs Python 3.12 — so tests, lint, and audits ran on a different interpreter than production.

Why 3.12 (not 3.14)

  • CI, migrations, and the dependency audits already run 3.12 everywhere; bot/requirements.txt is pip-compiled with 3.12.
  • Latent breakage caught: 3.13+ removed the stdlib audioop module discord.py voice relies on, and there is no audioop-lts pin — so the recording path would fail on a 3.14 image. Staying on 3.12 keeps audioop built in.

Changes

  • Dockerfile: backend-base and bot-basepython:3.12-slim.
  • renovate.json: hold the python image on the 3.12 line (alongside the ruff pin from #20).
  • Align Python-version mentions in root / webapp / bot CLAUDE.md.

The docker CI job builds all three prod images and is the gate here.

Closes #87

🤖 Generated with Claude Code

Rebased replacement for #160 (which conflicted with #20 in `renovate.json` after #20 merged first). Conflict resolved by keeping both the ruff pin (#20) and the python-image pin (#87) as separate Renovate rules. ## Summary The Dockerfile shipped `python:3.14-slim` for both runtime images while **all** CI runs Python 3.12 — so tests, lint, and audits ran on a different interpreter than production. ## Why 3.12 (not 3.14) - CI, migrations, and the dependency audits already run 3.12 everywhere; `bot/requirements.txt` is pip-compiled with 3.12. - **Latent breakage caught:** 3.13+ removed the stdlib `audioop` module discord.py voice relies on, and there is no `audioop-lts` pin — so the recording path would fail on a 3.14 image. Staying on 3.12 keeps `audioop` built in. ## Changes - `Dockerfile`: `backend-base` and `bot-base` → `python:3.12-slim`. - `renovate.json`: hold the `python` image on the 3.12 line (alongside the ruff pin from #20). - Align Python-version mentions in root / `webapp` / `bot` `CLAUDE.md`. The `docker` CI job builds all three prod images and is the gate here. Closes #87 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chore(docker): pin Python base image to 3.12 to match CI (#87)
All checks were successful
CI / Frontend tests, audit, and build (pull_request) Successful in 1m11s
CI / Backend lint (ruff) (pull_request) Successful in 35s
CI / Bot tests and audit (pull_request) Successful in 1m51s
CI / Backend migration, tests, and audit (pull_request) Successful in 3m28s
CI / Docker image build (pull_request) Successful in 2m58s
d3d09aa4e1
The Dockerfile shipped python:3.14-slim for both runtime images while all
CI (ci.yml + dependency-audit.yml) runs Python 3.12 — tests, lint, and
audits ran on a different interpreter than production, so a 3.14-only
behaviour change could ship untested.

Pin both backend-base and bot-base to python:3.12-slim, the tested
target. This also fixes a latent breakage: 3.13+ removed the stdlib
`audioop` module that discord.py voice depends on, and there is no
audioop-lts pin — so the recording path would fail on a 3.14 image.

- Dockerfile: backend-base and bot-base -> python:3.12-slim
- renovate.json: hold the python image on the 3.12 line (disable
  minor/major) so the generic docker automerge rule can't drift it back
- Align version mentions in root/webapp/bot CLAUDE.md

CI already runs 3.12 everywhere; no workflow changes needed. The docker
build job validates the pinned images.

Closes #87

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
claude-bot scheduled this pull request to auto merge when all checks succeed 2026-07-15 23:04:07 +00:00
claude-bot deleted branch chore/87-python-pin-v2 2026-07-15 23:08:44 +00:00
Sign in to join this conversation.
No description provided.