deps: add upper bounds to agent framework and e2e test dependencies - #453
Closed
ling-senpeng13 wants to merge 1 commit into
Closed
deps: add upper bounds to agent framework and e2e test dependencies#453ling-senpeng13 wants to merge 1 commit into
ling-senpeng13 wants to merge 1 commit into
Conversation
Every dependency in the `agents` extra was declared floor-only, so conductor-python[agents] accepted any future major of langgraph, openai, anthropic and the rest. The e2e bundle's test deps were fully unpinned, and its run.sh pip-installs at run time — so a consumer resolved whatever was newest on the day their lane ran. A breaking upstream release therefore reached users, and downstream gating CI, with no change to this repo. The expensive part is that it presents as an SDK or server regression: triage starts by looking for a Conductor bug that is not there. Already real rather than hypothetical: a langgraph/pydantic interaction with typing.TypedDict fails suite11's test_messages_state_detection on Python < 3.12. Only the interpreter pin keeps that green today, not a dependency bound. Bounds, not a lockfile — this is a library, and a committed lock would over-constrain consumers. Policy is next-major for 1.0+ projects and next-minor for the pre-1.0 ones, whose minors are breaking by convention. No-op today: 99 packages resolve under these bounds and every capped package lands on the version already in use (langgraph 1.2.10, anthropic 0.120.2, pytest 9.1.1, mcp-testkit 1.0.3). Refs #452 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
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.
Closes #452.
What
Adds upper bounds to 14 dependency declarations. No new files, no lockfile, nothing to regenerate later.
pyproject.toml— theagentsextra, 9 lines:langchain>=1.2.13>=1.2.13,<2langchain-core>=1.2.20>=1.2.20,<2langchain-openai>=1.1.11>=1.1.11,<2langgraph>=1.1.3>=1.1.3,<2google-adk>=1.27.1>=1.27.1,<3openai>=2.28.0>=2.28.0,<3openai-agents>=0.12.2>=0.12.2,<0.13anthropic>=0.91.0>=0.91.0,<0.121claude-code-sdk>=0.0.25>=0.0.25,<0.1scripts/package-e2e-bundle.sh— the heredoc that writes the bundle'srequirements.txt, 5 lines:pytest>=8,<10,pytest-asyncio>=1,<2,pytest-xdist>=3,<4,pytest-rerunfailures>=16,<17,mcp-testkit>=1,<2.The rest of the diff is comments explaining why the ceilings exist, so they don't get stripped as noise.
Why
Floor-only declarations meant
conductor-python[agents]accepted any future major of its integration deps, and the bundle'srun.shresolves at run time — so a consumer got "whatever is newest today." A breaking upstream release reached users and downstream gating CI with no change here, presenting as an SDK or server regression. See #452 for the full write-up.Not hypothetical: a langgraph/pydantic interaction with
typing.TypedDictalready failstest_suite11_langgraph.py::test_messages_state_detectionon Python < 3.12. Only the interpreter pin keeps that green — not a dependency bound.Verification
uv pip compile --universal --python-version 3.12over the bounded set: 99 packages resolve, and every capped package lands on the version already installed in a known-good environment —langgraph 1.2.10,anthropic 0.120.2,openai-agents 0.12.5,claude-code-sdk 0.0.25,pytest 9.1.1,mcp-testkit 1.0.3.So this is a no-op today. It only takes effect when someone publishes a new major.
Draft — two things to settle first
1. The 0.x policy is the real decision here. Policy applied is next-major for 1.0+ and next-minor for pre-1.0, since 0.x minors are breaking by convention. That makes
anthropic>=0.91.0,<0.121genuinely protective but tight enough that the next anthropic release needs a bump. The looser alternative is<1for all three pre-1.0 deps — one-line change each, much less churn, but close to no protection given their cadence. I picked protection over convenience; happy to flip it. Renovate on this file would make the churn a reviewable PR rather than a chore.2. Ceilings have a cost. They can block a consumer who legitimately needs a newer langgraph, and over-capping is a well-known source of resolution pain in Poetry libraries.
<next-majoris the mainstream compromise, but it is a trade worth someone else's eyes.Considered and rejected: generating a lockfile inside
package-e2e-bundle.sh. That script documents being static — "no install, no network — the pinned version does not have to be on PyPI yet, so this can run before the publish job finishes" — and compiling a lock needs both, breaking release ordering.Out of scope, noted in #452
mcp-testkitrequires Python >= 3.11 while the bundle'sREADME.mdandrun.shadvertise 3.10–3.13; compiling at 3.10 is unsatisfiable. Not fixed here.