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

Closed
claude-bot wants to merge 1 commit from chore/87-align-python-3.12 into main
Contributor

Summary

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.

Per the issue's recommendation, pin both images to python:3.12-slim — the actually-tested target — rather than bumping CI to 3.14.

Why 3.12 (not 3.14)

  • CI, migrations, and the dependency audits already run 3.12 everywhere.
  • bot/requirements.txt is pip-compiled with Python 3.12.
  • Latent breakage caught: 3.13+ removed the stdlib audioop module that 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 (+ updated header comments).
  • renovate.json: new rule holding the python image on the 3.12 line (disable minor/major) so the generic "automerge Docker patch/minor" rule can't silently drift it back to 3.13/3.14.
  • Align Python-version mentions in root / webapp / bot CLAUDE.md.

No workflow changes needed (CI is already 3.12). The docker CI job builds all three prod images and is the gate here.

Closes #87

🤖 Generated with Claude Code

## Summary 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. Per the issue's recommendation, pin both images to `python:3.12-slim` — the actually-tested target — rather than bumping CI to 3.14. ## Why 3.12 (not 3.14) - CI, migrations, and the dependency audits already run 3.12 everywhere. - `bot/requirements.txt` is pip-compiled with Python 3.12. - **Latent breakage caught:** 3.13+ removed the stdlib `audioop` module that 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` (+ updated header comments). - `renovate.json`: new rule holding the `python` image on the 3.12 line (disable minor/major) so the generic "automerge Docker patch/minor" rule can't silently drift it back to 3.13/3.14. - Align Python-version mentions in root / `webapp` / `bot` `CLAUDE.md`. No workflow changes needed (CI is already 3.12). 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)
Some checks failed
CI / Backend migration, tests, and audit (pull_request) Failing after 3s
CI / Backend lint (ruff) (pull_request) Successful in 44s
CI / Frontend tests, audit, and build (pull_request) Successful in 2m10s
CI / Bot tests and audit (pull_request) Successful in 2m22s
CI / Docker image build (pull_request) Successful in 14m31s
06e11e34b5
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 22:46:24 +00:00
Author
Contributor

Superseded by #163 — rebased onto current main and resolved the renovate.json conflict with #20 (both pins kept). Closing this in favour of #163.

Superseded by #163 — rebased onto current `main` and resolved the `renovate.json` conflict with #20 (both pins kept). Closing this in favour of #163.
claude-bot closed this pull request 2026-07-15 23:04:06 +00:00
Some checks failed
CI / Backend migration, tests, and audit (pull_request) Failing after 3s
Required
Details
CI / Backend lint (ruff) (pull_request) Successful in 44s
Required
Details
CI / Frontend tests, audit, and build (pull_request) Successful in 2m10s
Required
Details
CI / Bot tests and audit (pull_request) Successful in 2m22s
Required
Details
CI / Docker image build (pull_request) Successful in 14m31s
Required
Details

Pull request closed

Sign in to join this conversation.
No description provided.