Skip to content

Pin Python to 3.14 and remove bundled pip wheel from image - #470

Merged
irvingpop merged 5 commits into
masterfrom
irving/202611-pin-python-3.14
Nov 23, 2026
Merged

irvingpop merged 5 commits into
masterfrom
irving/202611-pin-python-3.14

Conversation

@irvingpop

@irvingpop irvingpop commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Keep pybot on Python 3.14 and stop Dependabot from proposing 3.15 (supersedes #469).

  • .github/dependabot.yml: ignore python major and minor updates (update-types: version-update:semver-major and version-update:semver-minor) for the docker ecosystem, the same form as back-end PR Python 3.14 upgrade #416. 3.14.x patch bumps still come through; bump the minor by hand.
  • .github/dependabot.yml cleanup: removed the labels blocks (the named labels do not exist here) and open-pull-requests-limit (default), added a 7-day cooldown to pip and github-actions, grouped github-actions into one PR, and dropped the redundant patterns from the pip group.
  • pyproject.toml: python = ">=3.14,<3.15" (was ^3.14, which allowed 3.15). poetry.lock changes only the content-hash and python-versions; no package versions changed.
  • docker/Dockerfile: also remove the pip wheel bundled for ensurepip in the final stage. It vendors msgpack 1.1.2, urllib3 2.7.0 and setuptools 70.3.0 with known HIGH CVEs. Nothing uses it at runtime (the app runs from /app/.venv).
  • README.md: say 3.14 is required, not "3.14 or greater".

The base image stays python:3.14.10-slim-trixie: that is the latest 3.14 patch on Docker Hub.

Why Dependabot kept proposing 3.15

Dependabot's docker ecosystem reads 3.14.10-slim-trixie as a version plus suffix and proposes the highest tag with the same suffix. It has no notion of Python minor lines. Closing a PR only ignores that exact version, so #462 (3.15.0) came back as #469 (3.15.2).

Image scan (Trivy 0.67.2)

Severity Count Notes
CRITICAL 0
HIGH 55 All Debian OS packages with no fixed version yet
HIGH (Python) 0

Trivy 0.58.0 also reports msgpack, urllib3 and setuptools HIGHs from the base image's pip. Those files are already removed in the final stage (pip uninstall); the old Trivy does not apply that deletion. Trivy 0.67.2 does not report them.

Test plan

  • poetry check --lock
  • Tests pass (291)
  • Image builds; import pybot works in the image; bundled wheel is gone
  • Trivy: 0 CRITICAL
  • No poetry.lock package changed, so nothing under 72 hours old
  • Next Monday's Dependabot run does not open a 3.15 PR

🤖 Generated with Claude Code

irvingpop and others added 3 commits November 23, 2026 07:58
- dependabot: ignore python >=3.15 for the docker ecosystem
- pyproject: python = ">=3.14,<3.15"; lock content-hash updated only
- Dockerfile stays on python:3.14.10-slim-trixie (latest 3.14 tag)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wheel vendors msgpack 1.1.2, urllib3 2.7.0 and setuptools 70.3.0,
which carry HIGH CVEs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🟢 All clear: Claude of Duty review passed

Mission: Review the code. Protect the branch. Deploy the future.

Tip

No findings. This review found no reason to block. Nothing to do for this review.
The merge box shows whether the other required checks pass.

File checks Review Security Supply chain Dependency review Coverage
✅ ok, 1 signal ✅ ran, 0 findings ✅ ran, 0 findings ✅ ran, 0 findings ✅ ok ✅ complete

Run 45215336673, attempt 1 for head d70ccb7 into master. The required workflow in the merge box is the result that counts.

Claude of Duty never approves a PR. A human reviewer gives the final approval.

📋 Full review record: reasons, checks, signals, finding details, model summaries, token usage

Reviewed snapshot

Head SHA Merge base SHA Base branch Run
d70ccb72a3020c10085227dafc8bc4c77291f266 3edff7a7ea34c79361e6fea8965f1baefa416672 master 45215336673, attempt 1

Reasons the gate failed

None. No reason applies.

Checks (code, no model)

Check Result Detail
Hard blocks ✅ none
Coverage ✅ complete files in comparison 5, files collected 5, trees complete
Model view full estimate 19,902 tokens, limit 200,000 tokens, multiplier 1x
Dependency changes ✅ none
Dependency review job ✅ success

Signals (context only, never block)

  • ⚠️ Sensitive path changed: change to Dockerfile, in docker/Dockerfile

Dependency changes

None.

Finding details

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Blocking is decided by code from category and severity, never by the model. A finding in a blocking category blocks only at high or critical severity.

No findings. All three passes completed.

Model summaries

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Pass Status Model Summary
Review ✅ ok claude-sonnet-5-5 The PR pins Python to >=3.14,<3.15, updates the Dependabot config, removes the ensurepip bundled wheel in the Docker final stage, and adjusts the README. I found no correctness bugs in the changed code. The Dockerfile glob and the pip uninstall chain are consistent, and the lockfile metadata matches pyproject.
Security ✅ ok claude-sonnet-5-5 The PR pins Python to 3.14, tidies Dependabot config, removes the bundled ensurepip wheel in the final Docker stage, and updates the README and lockfile metadata. I found no security vulnerabilities and no weakened controls. The only secret-like value is an example placeholder in the README. The Dockerfile change reduces attack surface by removing vendored wheels that carry known CVEs.
Supply chain ✅ ok claude-sonnet-5-5 This PR pins Python to >=3.14,<3.15 in pyproject.toml and poetry.lock, updates the README, edits Dependabot config (cooldowns, grouping, ignore python major/minor for docker, label removal), and in the Dockerfile's final stage also deletes the ensurepip bundled wheel. No dependency versions change, no new packages or sources, no workflow edits, and no obfuscation or reviewer-directed text. The Dockerfile change only removes files in the runtime image. The existing curl|python Poetry installer in the builder stage is untouched by this PR. No supply-chain concerns found.

Token usage

Pass Input Output Cache write Cache read Attempts
Review 722 130 0 17512 1
Security 1048 145 0 17512 1
Supply chain 1240 218 17512 0 1
Total 3010 493 17512 35024 3

Same form as OperationCode/back-end PR #416. Patch releases still flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@irvingpop

Copy link
Copy Markdown
Member Author

Feedback from the same fix in back-end (OperationCode/back-end#416). We checked our copy of this dependabot.yml against the Dependabot options reference. Suggested changes for this PR:

  1. Labels do nothing today. dependencies, python, github-actions and docker do not exist in this repo (the existing label is type: dependencies), and Dependabot ignores labels that do not exist. Either set labels: ["type: dependencies"] on each entry, or remove the labels blocks and let Dependabot create its default dependencies + ecosystem labels (that adds a new dependencies label next to type: dependencies).
  2. Remove open-pull-requests-limit: 5. It is the default.
  3. Add cooldown: { default-days: 7 } to the pip and github-actions entries. Fresh releases wait a week before a PR is opened. Cooldown does not apply to security updates.
  4. Group github-actions into one PR: groups: { actions: { patterns: ["*"] } }.
  5. Optional: in the pip group, patterns: ["*"] is redundant; a group with only update-types matches all dependencies.
  6. Dockerfile: rm -f /usr/local/lib/python3.14/ensurepip/_bundled/*.whl hardcodes the minor version, so with rm -f it silently stops working at the next minor move. Use /usr/local/lib/python3.*/ensurepip/_bundled/*.whl.
  7. CI: if the workflow sets python-version: "3.14", it must change together with the base image at the 3.15 move.

Already good here: the docker ignore with update-types: [semver-major, semver-minor]. Note that the python = ">=3.14,<3.15" constraint in pyproject.toml is never bumped by the pip ecosystem (dependabot-core skips the python entry).

For reference, back-end's resulting file:

version: 2
updates:
  # Poetry projects use the "pip" ecosystem; Dependabot reads pyproject.toml and poetry.lock
  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
    cooldown:
      default-days: 7
    groups:
      # One PR for routine bumps; majors stay separate so they get a real review
      python-minor-patch:
        update-types:
          - "minor"
          - "patch"

  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
    cooldown:
      default-days: 7
    groups:
      actions:
        patterns:
          - "*"

  - package-ecosystem: "docker"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
    ignore:
      # Stay on Python 3.14 until we decide to move; patch bumps only
      - dependency-name: "python"
        update-types: ["version-update:semver-major", "version-update:semver-minor"]

- remove labels (none of the named labels exist) and open-pull-requests-limit
- add 7-day cooldown to pip and github-actions
- group github-actions into one PR; drop redundant pip group patterns
- Dockerfile: match python3.* so the wheel removal survives a minor bump

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@irvingpop

Copy link
Copy Markdown
Member Author

Applied in d70ccb7:

  1. Labels: removed the labels blocks. dependencies, python, github-actions and docker do not exist here (checked with gh label list; only type: dependencies does).
  2. Removed open-pull-requests-limit: 5 from every entry.
  3. Added cooldown: default-days: 7 to pip and github-actions.
  4. github-actions now has groups: actions: patterns: ["*"].
  5. Dropped patterns: ["*"] from the pip group.
  6. Dockerfile now removes /usr/local/lib/python3.*/ensurepip/_bundled/*.whl. Rebuilt: the wheel is gone and import pybot works.
  7. ci.yml unchanged ("3.14").

@irvingpop
irvingpop merged commit 67ab105 into master Nov 23, 2026
10 checks passed
@irvingpop
irvingpop deleted the irving/202611-pin-python-3.14 branch November 23, 2026 16:26
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