CI installs from uv.lock (uv sync --frozen). Users don't get the lockfile; they resolve the ranges in packages/*/pyproject.toml. This page covers both.
Cap a published dependency at the next major (<N+1, or <1 while 0.x) only if it meets one of two criteria:
- Integration target: the package exists to wrap it (
openaiingenkit-openai,flaskingenkit-flask,boto3ingenkit-amazon-bedrock). - Contract: users write types or files against it and pass them to Genkit (
pydanticmodels,dotpromptz.promptfiles).
Leave everything else floor-only (starlette, anyio, structlog, uvicorn, ...). Capping internal deps blocks upstream security fixes and creates version conflicts with the rest of a user's app.
Enforcement (scripts/check_consistency.py):
REQUIRED_CAPS: caps a dep in every package that uses it. CI fails on a missing cap or an unlisted one.SCOPED_CAPS: caps a dep in one package only. For example,genkit-google-genaicapshttpx<1becausehttp_client_factoryreturns anhttpx.AsyncClient, while coregenkitkeepshttpxfloor-only.- Known-bad version: exclude it with
!=x.y.z, not a cap.
A floor promises Genkit works at that version. When a PR uses a newer API, the floor must rise in the same PR.
- CI gate:
tests-minimum-depsinpython.ymlresolves direct deps at their declared>=floors (uv lock --resolution lowest-direct) and runs tests on Python 3.10. It runs automatically on every PR. - When
tests-minimum-depsfails on your PR: regulartestspassed onuv.lock(newest), so the PR relies on an API or fix newer than a declared>=floor. The failed CI log prints a self-contained prompt you can copy-paste straight into a coding agent, or follow the same steps by hand:-
Check whether a small code tweak keeps the current floor working. Prefer keeping compatibility over raising a floor when the fix is simple.
-
Otherwise, find the lowest passing release: check the failing dependency's release notes/changelog for the missing API or fix (and probe candidate versions if the cutoff isn't obvious).
- Shared deps (
pydantic,anyio,httpx,fastapi,opentelemetry-*): avoid jumping straight touv.lock, since users often pin these in their apps. - Leaf provider SDKs (
openai,anthropic,google-genai,ollama): finding the exact cutoff is preferred, or bumping straight to theuv.lockversion is fine if unclear (overshooting fails cleanly atpip installtime instead of crashing at runtime).
- Shared deps (
-
Update
>=inpackages/<pkg>/pyproject.toml(keep any<Ncap intact), verify locally, and refresh the lockfile:just test-min-deps packages/<pkg>/tests # runs lowest-direct and restores uv.lock on exit uv lock && just check
-
Don't bump floors just because a newer version is out. Only bump on purpose when:
- Dropping support: do it in a Genkit minor release and note it in the release notes.
- Reachable CVE: our code path hits the vulnerable code. Comment the reason next to the floor.
- Dev and lint groups (root
pyproject.toml): cap at the next major. They never ship; caps only bounduv lock --upgrade. - Tests and samples: declare every package you import. Don't rely on transitive pulls. Samples are workspace members, so keep their lists minimal.
Don't run uv lock --upgrade in feature PRs—it moves every uncapped dep at once and hides what broke.
-
Weekly minor/patch PR (
py-minor-and-patch): one grouped Dependabot PR after a 7-day cooldown. CI enforces that this PR only touchesuv.lock(neverpackages/*/pyproject.toml), so if checks are green you can merge immediately. If red, fix our code rather than adding a cap. -
Weekly major PRs: one PR per dep so a broken major doesn't block the rest. Lockstep families (
opentelemetry-major,aws-major) stay grouped so they can resolve.- Floor-only dep: users already resolve the new major. Green: merge. Red: users are already broken—fix immediately.
- Capped dep: widens the cap (
<3-><4). Checkpackages/*/pyproject.toml, skim the changelog for behavior mocked tests miss (exceptions, transport, defaults), merge, and release so users get the wider range. - Contract dep (
pydantic,dotpromptz): widening affects user code. Merge deliberately with a release note. - Red capped PR: leave it open as the migration ticket; the cap protects users meanwhile.
-
Security alerts: Dependabot security PRs bypass cooldown and grouping. To clear a batch manually:
# 1. Audit locked packages uv export --frozen --all-packages --all-groups --no-hashes --no-emit-workspace -o /tmp/req.txt uvx pip-audit -r /tmp/req.txt --no-deps --disable-pip # 2. Upgrade only the flagged packages within current bounds uv lock --upgrade-package urllib3 --upgrade-package cryptography
If a package won't budge, find what holds it back with
uv tree --invert --package <name>and upgrade that too.