Repository navigation
Pin the Python environment: requirements.in floors, generated requirements.txt lock - #192
Merged
Merged
Conversation
…ments.txt lock requirements.txt was lower bounds only, so every image build installed whatever was newest on PyPI that day. That is how openai 3.x reached production unreviewed and broke AI grading for a day (#191). - requirements.in now holds the direct dependencies with their safety floors (the old file, header rewritten, one duplicate removed). - requirements.txt is generated from it by `make lock` (uv pip compile, resolved for Python 3.11 with universal markers so the 3.12 CI matrix and local 3.14 install the same pins). Docker, CI, e2e and the README keep installing requirements.txt unchanged. - CI's lint job recompiles without --upgrade and fails if the lock is stale, so editing requirements.in without running `make lock` cannot land. The locked set was installed into a real Python 3.11 and the LLM client was exercised under gevent monkey-patching: expected 401, no handshake error. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
requirements.txtwas lower bounds only, so every image build installed whatever was newest on PyPI that day. That is how OpenAI SDK 3.x reached production unreviewed on the first deploy after its release and broke AI grading for a day (fixed by the pin in #191). Any future upstream release could do the same with no code change.What
requirements.inholds the direct dependencies with their safety floors. It is the oldrequirements.txtwith the header rewritten and one duplicatejaraco.contextentry removed. Nothing installs from it.requirements.txtis now generated from it bymake lock, which runsuv pip compile --python-version 3.11 --universal. 110 pinned packages, resolved for the Docker image's Python with universal markers so the 3.12 CI matrix and local 3.14 install the same pins. Docker, CI, e2e, security and the README all keep installingrequirements.txtunchanged.--upgrade(which keeps existing pins) and fails ifrequirements.txtdiffers, so editingrequirements.inwithout runningmake lock, or hand-editing the lock, cannot land. Verified locally that a recompile is a no-op.requirements.inadded to the CI path filter.Verification
gevent.monkey.patch_all()against the live OpenAI endpoint returns the expected 401 with the lockedopenai==2.54.0, no handshake error.How to change a dependency from now on
Edit
requirements.in, runmake lock, commit both files. To pick up newer releases deliberately, runuv pip compile --upgrade(or--upgrade-package <name>) and review the diff.🤖 Generated with Claude Code