chore(ci): let Dependabot manage Python deps via the uv ecosystem - #229
Conversation
Adversarial reviewThe facts here are right and the change is a net improvement. My objection is to the framing, and it's load-bearing enough to fix before this goes in the git log. Verified
Finding 1: this is not the root-cause fix for #228, and #228 will recurThe opening says:
and then, further down:
Those contradict each other, and the second is the true one. Verified:
That pairing is the #228 mechanism: any hatchling release immediately reds every open PR, regardless of what the PR touches. Nothing in this diff intersects that path — the The PR is honest about this in the "not included" section; it's the top-line "root-cause fix" that oversells. That matters beyond wording: the next person to hit a red build-lock check will search the history, find "root-cause fix" attached to this commit, and conclude the recurrence is something new. Please reword to what it actually is — a fix for uv.lock rot, which is a real and separate problem. The one-line fix for the recurrence is the one this PR names and defers: requires = ["hatchling>=1.27,<2"]If only one of the two lands, I'd take that one. They're complementary, so ideally both. Finding 2: the manual
|
Fixes uv.lock rot. Python was the one ecosystem here nothing watched, and it shows: 19 packages behind (mypy 2.1→2.3, ruff 0.15.18→0.15.21, numpy 2.4.6→2.5.1, …), noticed only because CI went red for an unrelated reason. This is NOT the fix for #228 and does not stop it recurring. #228 was `requirements-build.lock`, which is `uv pip compile`d from the *unpinned* `[build-system].requires` and re-resolved against live PyPI on every CI run — so the next hatchling release reds every open PR again, exactly as before. The `uv` ecosystem reads `[project]` deps + uv.lock and never touches `[build-system].requires`; no ecosystem scans that file at all. Pinning a floor (`requires = ["hatchling>=1.27,<2"]`) is what retires that, and it is a separate change. Saying otherwise here would send the next person to hit a red build-lock check hunting for a new bug instead of a known one. The omission being reversed was deliberate and correctly reasoned when written — Dependabot couldn't update uv.lock. That stopped being true when uv version updates went GA on 2025-03-13. Stale premise, not a judgment call. Monthly + grouped like the other three: one Python PR a month. Known rough edge, documented in the file rather than left to be discovered: Dependabot rewrites uv.lock but not requirements-prod.lock, which CI diffs against a fresh `uv export`, so a grouped PR bumping any runtime dep lands red until someone regenerates it on the branch — six of the current nineteen qualify. The sharper reason not to let that sit is that pip-audit reads requirements-prod.lock, not uv.lock: until the export is regenerated, a security bump to a runtime dep isn't actually being audited. Automating it away is not cheap either — Dependabot-triggered workflows get a read-only GITHUB_TOKEN, so pushing the export back needs pull_request_target or a PAT. The manual export is the sane option, not a stopgap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RR6LwVdry9fmXkEhkC9Cbi
f3f92be to
eeae5df
Compare
|
Framing objection accepted — it was a real contradiction, not a wording nit. The PR said "root-cause fix" up top and "requirements-build.lock stays outside any ecosystem" further down, and you're right that the second is the true one. Description and commit message both rewritten to say what this actually fixes: uv.lock rot, with an explicit table separating it from #228's mechanism. Your reasoning about the next person hitting a red build-lock check and finding "root-cause fix" in the history is exactly why it mattered. #230 opened for the recurrence — but not with the fix you proposed, and I want to flag why.
The range only narrows the window from "any release" to "any 1.x release" — and 1.x is where hatchling ships, so it's approximately no change. #230 pins
On automation — likewise added. The read-only — Claude · Opus-4.8(1M) · x-high |
Fixes uv.lock rot. Python is the one ecosystem here nothing watches.
What this does and doesn't fix
uv.lockrot — 19 packages behind (mypy 2.1→2.3, ruff 0.15.18→0.15.21, numpy 2.4.6→2.5.1, geopandas, pyogrio, coverage, hypothesis…)requirements-build.lockdrift — #228, and it will recur#228 was
requirements-build.lock, which isuv pip compiled from the unpinned[build-system].requiresand re-resolved against live PyPI on every CI run. Theuvecosystem reads[project]deps +uv.lockand never touches[build-system].requires; no ecosystem scans that file. So the next hatchling release reproduces #228 exactly — unless #230 lands. They're complementary; neither substitutes for the other.Why this reverses a deliberate choice
The comment being removed said, correctly:
True when written. It stopped being true on 2025-03-13, when Dependabot version updates for
uvwent GA — theuvecosystem readspyproject.toml+uv.lockdirectly, unlike thepipecosystem that couldn't. So this reverses a stale premise, not a judgment call.uvis a documentedpackage-ecosystemvalue in the options reference.Monthly + grouped (
patterns: ["*"], limit 3), matching the other three — one Python PR a month.Rough edge — please read before merging
Dependabot rewrites
uv.lockbut notrequirements-prod.lock, and CI diffs that export (added by #190 so dependency resolution can't happen at deploy time). A grouped PR bumping any runtime dep lands red until the export is regenerated on the branch:Six of the current nineteen qualify —
aiohappyeyeballs,cffi,charset-normalizer,greenlet,nh3,typing-extensions. Dev-only bumps don't touch it.Two things surfaced in review that make this sharper than "a red X is annoying", both now in the file's comment block:
pip-auditreadsrequirements-prod.lock, notuv.lock(verified —ci.ymlrunspip-audit -r requirements-prod.lock --require-hashes). So until the export is regenerated, a Dependabot security bump to a runtime dep isn't actually being audited; the audit still reads the old pins. That's the real reason not to let a red export sit.GITHUB_TOKEN, so pushing the export back needspull_request_targetor a PAT — real risk on an auto-generated branch. The manual export is the sane option, not a stopgap. Don't merge this expecting to automate it in five minutes later.Grouped and monthly, that's at most one
uv exporta month. If that's not a trade you want, the alternative is manualuv lock --upgrade— say so and I'll close this.Not included
The 19 actual bumps.
ruffandmypyminors routinely surface new findings, and that shouldn't land tangled with the LAPO3 work. Happy to open it once this merges — or just let Dependabot do it next cycle.Verified: YAML parses, all four ecosystems resolve as intended.
— Claude · Opus-4.8(1M) · x-high