fix(examples): sync requirements.txt with uv.lock; guard drift in CI - #966
Merged
Conversation
…ls ag-ui-protocol 0.1.22 PR #964 bumped pyproject.toml/uv.lock to ag-ui-protocol>=0.1.22 but left requirements.txt (what the Dockerfile actually installs from) pinned to 0.1.19. The new SubagentStartedEvent import doesn't exist in 0.1.19, so the Railway ag-ui-demo container fails at boot, /ok never comes up, and `railway up --detach` silently leaves the old deployment live. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
requirements.txt is what the Dockerfile actually installs from, but uv sync/ uv.lock is what's kept in sync during normal dependency bumps — nothing previously caught the two falling out of sync (see the prior commit). Add a `uv export --no-hashes` + diff step to the examples/ag-ui e2e job and the per-cap cockpit e2e job (skipped for caps that don't check in a requirements.txt) so drift fails CI with a clear fix-it message instead of surfacing as a silent production boot failure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
blove
enabled auto-merge (squash)
September 2, 2026 21:57
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
blove
added a commit
that referenced
this pull request
Sep 2, 2026
…port (#967) * fix(ci): compare requirements.txt drift against git, not a scratch export The guard added in #966 exports to /tmp/requirements.check.txt and diffs it against the checked-in file. uv stamps the -o path it was given into the export's header comment, so the two files differ on line 2 no matter how fresh the checked-in export is: -# uv export --no-hashes -o requirements.txt +# uv export --no-hashes -o /tmp/requirements.check.txt Every lane that has a requirements.txt fails: examples/ag-ui e2e and the six cockpit/ag-ui cockpit e2e caps. Regenerate in place with the exact command the error message tells you to run, and let `git diff --exit-code` decide — that compares against the committed file, so real drift is still caught. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(ci): honour what each requirements.txt actually is Follow-up to the header fix in this branch. Two more ways the guard disagreed with reality: - Three lanes export with --no-dev (their header records it), but the guard always ran a bare --no-hashes export, so it demanded that pytest and pytest-asyncio be committed into the files the Railway images install from. - cockpit/langgraph/streaming/python/requirements.txt is hand-maintained loose pins, not a uv export at all; the guard would have replaced it wholesale with a 257-line resolved export. The guard now reads the command uv stamps into each file's own header: it skips files that aren't uv exports, and mirrors --no-dev when the header used it. aws-strands and microsoft-agent-framework are re-exported so their headers record the --no-dev they were actually built with. Content is byte-identical — the change is one header line each, no package added or removed from any image. Verified across all 12 lanes that have a requirements.txt: 9 clean, 1 skipped as hand-maintained, 2 corrected here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
examples/ag-ui/python/Dockerfileinstalls fromrequirements.txt(auv export --no-hashessnapshot), not fromuv.lockdirectly. PR #964 bumpedpyproject.toml/uv.locktoag-ui-protocol>=0.1.22and added aSubagentStartedEventimport that only exists in 0.1.22+, but leftrequirements.txtpinned toag-ui-protocol==0.1.19.Chain of failure:
requirements.txtdrifts fromuv.lock(nothing catches this).ag-ui-demoimage builds fine (pip installs the stale pins) but the container fails to import at boot (ImportError: cannot import name 'SubagentStartedEvent')./okhealthcheck never comes up.railway up --detach, which reports success regardless of whether the new deployment actually became healthy — so the OLD deployment stays live and the break is silent.Fix
uv sync && uv export --no-hashes -o requirements.txtinexamples/ag-ui/python. The only substantive change isag-ui-protocol==0.1.19→0.1.22(plus its# viacomment picking up the directpyproject.tomlpin). Autogenerated header preserved.requirements.txt(stripping the local-e .line exactly like the Dockerfile does) and importedsrc.server:app(and the narrowersrc.streaming.subagent_emitting_agent.SubagentEmittingAgent) fromexamples/ag-ui/python— both import cleanly now.cockpit/ag-ui/subagents/python/requirements.txt— it already pinsag-ui-protocol==0.1.22(landed via feat(cockpit): ag-ui subagents demo emits the protocol's SUBAGENT_* events #962), so no change needed there.uv export --no-hashes+diffstep in theexamples/ag-ui — e2ejob, and in the per-capCockpit — e2ematrix job (skipped for caps that don't check in arequirements.txt, since most cockpit python caps aren't Docker-deployed). Both fail with an::error::pointing at the exactuv exportcommand to fix it.Test plan
uv export --no-hashes -o requirements.txtdiff reviewed — only the expected version bumprequirements.txt+import src.serversucceedscockpit/ag-ui/subagents/python/requirements.txtconfirmed already at 0.1.22.github/workflows/ci.ymlYAML validated withyaml.safe_load🤖 Generated with Claude Code