Skip to content

Release 1.4.2: reproducible image builds - #28

Merged
DimaMolod merged 1 commit into
mainfrom
release/1.4.2
Aug 10, 2026
Merged

Release 1.4.2: reproducible image builds#28
DimaMolod merged 1 commit into
mainfrom
release/1.4.2

Conversation

@DimaMolod

Copy link
Copy Markdown
Collaborator

Makes future release images reproducible, and cuts the first release that will exercise the release: trigger merged in #27.

Why

Rebuilding a released tag previously resolved whatever dependency stack was current:

Layer Before After
Base image python:3.11-slim (floating) pinned by digest sha256:90744cff…
Python deps biopython, numpy, scipy, matplotlib — unbounded docker/constraints.txt lock, exact versions

Backfilling the 0.3.0–1.4.1 images made this concrete: every one pairs its tagged source with an August 2026 dependency stack rather than the original. That is unavoidable retroactively, but it should not keep happening.

What changed

  • docker/constraints.txt records the exact resolved versions (numpy 2.4.6, scipy 1.17.1, biopython 1.88, matplotlib 3.11.1 and transitives), applied in both the test and runtime stages so what the tests validate is what ships.
  • Base image pinned by digest in both stages.
  • pyproject.toml gains upper bounds only: biopython<2, numpy<3, scipy<2, matplotlib<4.

On not exact-pinning pyproject

Deliberate. alphajudge is installed alongside other scientific packages, so == constraints in a library's metadata cause resolver conflicts for consumers. Reproducibility belongs in the image, which is what the constraints file provides. Lower bounds are omitted because older versions are untested — asserting numpy>=1.24 would be a guess. The caps guard against the next breaking major.

Validation

The docker job builds the test stage on this PR, running pytest inside the image against the pinned stack.

🤖 Generated with Claude Code

Rebuilding a released tag previously resolved whatever dependency stack was
current: the base image was an unpinned python:3.11-slim and pyproject
declared biopython, numpy, scipy and matplotlib without bounds. Backfilling
the 0.3.0-1.4.1 images made that concrete - each one pairs its tagged source
with an August 2026 stack rather than the original.

The image build now pins the base by digest and installs under
docker/constraints.txt, which records the exact resolved versions. Both the
test and runtime stages use it, so what the tests validate is what ships.

pyproject gains upper bounds only (biopython<2, numpy<3, scipy<2,
matplotlib<4). Exact pins would be wrong here: alphajudge is installed
alongside other scientific packages, and == constraints in a library's
metadata cause resolver conflicts for consumers. Lower bounds are omitted
because older versions are untested; the caps guard against the next
breaking major, and reproducibility is handled by the constraints file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@DimaMolod
DimaMolod merged commit b3dd9ab into main Aug 10, 2026
12 checks passed
@DimaMolod
DimaMolod deleted the release/1.4.2 branch August 10, 2026 15:46
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