Skip to content

deps: add upper bounds to agent framework and e2e test dependencies - #453

Closed
ling-senpeng13 wants to merge 1 commit into
mainfrom
deps/bound-agent-dependencies
Closed

deps: add upper bounds to agent framework and e2e test dependencies#453
ling-senpeng13 wants to merge 1 commit into
mainfrom
deps/bound-agent-dependencies

Conversation

@ling-senpeng13

@ling-senpeng13 ling-senpeng13 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Closes #452.

What

Adds upper bounds to 14 dependency declarations. No new files, no lockfile, nothing to regenerate later.

pyproject.toml — the agents extra, 9 lines:

Package From To
langchain >=1.2.13 >=1.2.13,<2
langchain-core >=1.2.20 >=1.2.20,<2
langchain-openai >=1.1.11 >=1.1.11,<2
langgraph >=1.1.3 >=1.1.3,<2
google-adk >=1.27.1 >=1.27.1,<3
openai >=2.28.0 >=2.28.0,<3
openai-agents >=0.12.2 >=0.12.2,<0.13
anthropic >=0.91.0 >=0.91.0,<0.121
claude-code-sdk >=0.0.25 >=0.0.25,<0.1

scripts/package-e2e-bundle.sh — the heredoc that writes the bundle's requirements.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's run.sh resolves 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.TypedDict already fails test_suite11_langgraph.py::test_messages_state_detection on Python < 3.12. Only the interpreter pin keeps that green — not a dependency bound.

Verification

uv pip compile --universal --python-version 3.12 over 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.121 genuinely protective but tight enough that the next anthropic release needs a bump. The looser alternative is <1 for 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-major is 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-testkit requires Python >= 3.11 while the bundle's README.md and run.sh advertise 3.10–3.13; compiling at 3.10 is unsatisfiable. Not fixed here.

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

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ling-senpeng13
ling-senpeng13 deleted the deps/bound-agent-dependencies branch July 29, 2026 00:22
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.

Agent deps are unbounded (>=X, no ceiling) — a breaking upstream major can silently break consumers and downstream CI gates

1 participant