Repository navigation
fix(py): enforce dependency bounds policy and raise declared floors - #154
Merged
huangjeff5 merged 4 commits intoNov 30, 2026
Merged
Conversation
This was referenced Nov 19, 2026
huangjeff5
force-pushed
the
fix/py-dep-bounds-and-floors
branch
from
November 19, 2026 02:15
8a2e7c7 to
924dfa0
Compare
This was referenced Nov 19, 2026
# Conflicts: # packages/genkit-a2ui/pyproject.toml # packages/genkit-amazon-bedrock/pyproject.toml # packages/genkit-anthropic/pyproject.toml # packages/genkit-django/pyproject.toml # packages/genkit-fastapi/pyproject.toml # packages/genkit-flask/pyproject.toml # packages/genkit-google-cloud/pyproject.toml # packages/genkit-google-genai/pyproject.toml # packages/genkit-ollama/pyproject.toml # packages/genkit-openai/pyproject.toml # packages/genkit-otel/pyproject.toml
This was referenced Nov 19, 2026
huangjeff5
added a commit
that referenced
this pull request
Nov 19, 2026
…together Two bugs surfaced re-deriving #154's floors with this script: - Test envs skipped optional extras, so genkit-google-cloud's firestore tests failed even at uv.lock versions and the search aborted. - opentelemetry-sdk pins opentelemetry-api with ==, so bisecting api alone paired it with the locked sdk and returned 1.45.0 instead of 1.39.0.
MichaelDoyle
approved these changes
Nov 19, 2026
Merged
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.
Part 2 of 4 in the dependency hygiene stack: #153 -> #154 -> #156 -> #157.
Published packages now cap only the deps users can break on, and every declared floor is the oldest version our tests pass against.
Main Changes
openaiandanthropicwere capped, butpydantic,boto3,fastapi,django,flaskandopentelemetry-*weren't, so a fresh install could pull an untested major.check_consistency.pynow requires a next-major cap (<1while 0.x) on deps inREQUIRED_CAPS(a genkit package wraps it, or users write code against it) andSCOPED_CAPS(a contract in one package only, e.g.httpxingenkit-google-genai), and rejects caps (<,~=,==) on anything else. Capping internal deps likestarlette,anyiooruvicornwould block users from upstream fixes and cause solver conflicts with no compatibility upside.tests-minimum-deps(ci(py): gate PRs on oldest supported deps and document dependency policy #156) flagged every stale floor, and testing PyPI releases between each old floor anduv.lockpinned the exact cutoffs:anthropic>=0.98.0,openai>=1.99.2,google-genai>=2.17.0,ollama>=0.6.0,anyio>=4.12.0ingenkit-mcp, andopentelemetry-api/sdk>=1.39.0+opentelemetry-exporter-gcp-logging>=1.12.0a0ingenkit-google-cloud.version_bounds_guard_test.py: Parametrized cases for a missing floor, a missing required or scoped cap, a cap on an unlisted dep, and scoped caps not leaking into other packages.How the floors were found
tests-minimum-deps(uv lock --resolution lowest-direct, full suite, Python 3.10) fails in all six packages below: 28 failed, 14 errors. CI only testsuv.lock(newest), so none of this showed up before; a user on an older version could install the package and fail at runtime.uv.lockidentified the exact last-failing / first-passing release for all 8 deps.tests-minimum-depspasses cleanly.Why each floor moved
Each boundary is the last FAIL / first PASS, tied to the symbol our code uses.
genkit-google-cloud
opentelemetry-sdk1.20.0 → 1.39.0 (1.38.0 FAIL, 1.39.0 PASS):_telemetry/_config.pyimportsLogRecordExporter, which OpenTelemetry renamed fromLogExporterin 1.39.0 ([logs-api/sdk] Rename several classes from Log to LogRecord open-telemetry/opentelemetry-python#4647). On anything older the telemetry module raisesImportError.opentelemetry-api1.20.0 → 1.39.0 (1.38.0 FAIL, 1.39.0 PASS): The sdk pins the api to its own version, so the old api floor advertised support that can't install.opentelemetry-exporter-gcp-logging1.9.0a0 → 1.12.0a0 (1.11.0a0 FAIL, 1.12.0a0 PASS): 1.11.0a0 requiresopentelemetry-sdk<1.39.0; 1.12.0a0 is the first release that accepts sdk 1.39.Provider plugins
anthropic0.96.0 → 0.98.0 (0.97.0 FAIL, 0.98.0 PASS):_plugin.pyreadsclient.credentials, added in 0.98.0. At 0.97.0, 10 tests fail withAttributeError: 'AsyncAnthropic' object has no attribute 'credentials', so a blank per-request key reports INTERNAL instead of INVALID_ARGUMENT.google-genai2.14.0 → 2.17.0 (2.16.0 FAIL, 2.17.0 PASS):_interactions/_converters.pyreadsinteraction.errors, added in 2.17.0. At 2.16.0, 4 tests fail; a failed Interactions job never exits the poll loop (test_failed_exits_poll_loop).openai1.60.0 → 1.99.2 (1.99.1 FAIL, 1.99.2 PASS):_models/_audio.pypassesinstructions(added in 1.68.0), and chat completions passprompt_cache_key(added in 1.99.0) andverbosity(added in 1.99.2). At 1.99.1,test_openai_host_keeps_openai_only_settingsfails withTypeError: AsyncCompletions.create() got an unexpected keyword argument 'verbosity'.ollama0.5.3 → 0.6.0 (0.5.4 FAIL, 0.6.0 PASS): The README documentsOLLAMA_API_KEY, but the SDK only reads it from 0.6.0 (client: load OLLAMA_API_KEY on init ollama/ollama-python#583). At 0.5.4 the env key is silently dropped (test_generate_ollama_secrets_key_does_not_leak_to_next_callsees['Bearer tenant', None]).genkit-mcp
anyio4.9.0 → 4.12.0 (4.11.0 FAIL, 4.12.0 PASS):_connection.pytreatsanyio.BrokenResourceErroras a transport error. Before 4.12.0 (ClosedResourceErrorvs.BrokenResourceErroris sometimes backend-dependent, and is sometimes not raised at all (in favor of a non-AnyIO exception type) agronholm/anyio#671), writing to a dead server's stdin didn't raise it on asyncio, so a crashed MCP server went undetected. At 4.11.0, 3 tests fail, includingtest_a_caller_cut_off_by_a_broken_stdin_carries_the_transport_error.