Skip to content

Run the Python the tests actually use - #8

Merged
GstMirabal merged 1 commit into
mainfrom
fix/align-container-python-to-tested-version
Aug 2, 2026
Merged

Run the Python the tests actually use#8
GstMirabal merged 1 commit into
mainfrom
fix/align-container-python-to-tested-version

Conversation

@GstMirabal

Copy link
Copy Markdown
Owner

What this changes

docker/DockerFile moves from python:3.12-slim to python:3.13-slim.

Why

Layer Was Now
Container 3.12 3.13
CI 3.13 3.13
Local environment 3.13 3.13

Every verification in the Sprint #3 audit — 71 tests, the production boot under a real DEBUG=False, gunicorn actually serving — ran on 3.13. The container shipped 3.12. The repository that moves money was tested on a Python it does not deploy.

The audit missed it

AUDIT_003 has a Not covered section naming live-exchange behaviour, concurrency and the API key's scope. None of those is this. The gap was nearer than any of them: the report never compared the runtime it tested against the runtime it ships. Recorded as T-011, including that the audit did not find it.

Found by declining a Dependabot bump

Dependabot proposed 3.14-slim. Taken at face value that would have widened the divergence — container 3.14, tests 3.13. The useful answer was not the version it offered but the question it raised.

The same check found Django-Pro-Template already consistent at 3.13 (its 3.14-slim PR is closed for the same reason) and django-users-app correctly shipping no container at all.

How it was verified

By building the image and running Python inside it, not by reading the tag:

$ docker run --rm --entrypoint python tv2exch:py313 -V
Python 3.13.14

The app also imports inside the container — Django 6.0.7, binance-connector present — which the image build alone does not prove.

$ pytest -q
71 passed

🤖 Generated with Claude Code

The image pinned python:3.12-slim while CI and every local environment ran
3.13. Every verification in the Sprint #3 audit — 71 tests, the production
boot under a real DEBUG=False, gunicorn actually serving — was performed on a
runtime this project does not deploy. The repository that moves money was
tested on a Python it does not ship.

The audit missed it. Its "not covered" section named live-exchange behaviour,
concurrency and the API key's scope; none of those is this. The gap was nearer
than any of them: the report never compared the runtime it tested against the
runtime it ships.

Found because Dependabot proposed 3.14-slim. Taken at face value that bump
would have widened the divergence — container 3.14, tests 3.13 — so the useful
answer was not the version it offered but the question it raised.

Verified by building the image and running `python -V` inside it (3.13.14),
rather than by reading the tag. The same check found Django-Pro-Template
already consistent and django-users-app correctly shipping no container.

Recorded as T-011 in the audit report, including that the audit did not find it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@GstMirabal
GstMirabal merged commit ecf1a4d into main Aug 2, 2026
7 checks passed
@GstMirabal
GstMirabal deleted the fix/align-container-python-to-tested-version branch August 2, 2026 07:36
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