Skip to content

ci(deps): scope the root pip updater to declared dependencies - #348

Merged
Brad-Edwards merged 1 commit into
devfrom
fix-dependabot-scope
Sep 12, 2026
Merged

Brad-Edwards merged 1 commit into
devfrom
fix-dependabot-scope

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Why

The / pip entry in .github/dependabot.yml is documented as covering the runtime dependencies that ship inside the installed package (PyYAML, raes). It also reaches requirements/runtime.txt, and with no allow filter it raises a separate ungrouped PR for every transitive line in that lock. #298 (pygments), #299 (idna) and #300 (python-dotenv) were all opened that way, and all three were closed unmerged in favour of the grouped #344.

Those PRs cannot land as raised:

  • runtime.txt and pip-audit.txt are installed into one environment by ci.yml:audit; runtime.txt and sbom.txt by release-please.yml:publish. Moving a shared package in runtime.txt alone fails test_co_installed_locks_agree_on_shared_packages — which is what happened on fix(deps): bump idna from 3.18 to 3.19 #299.
  • Moving it in all of them instead duplicates half the /requirements batch and forces that PR into a conflict rebase.

Splitting the transitive closure across ungrouped PRs is precisely what the /requirements group exists to prevent — its own comment says so ("splitting the bumps would land halves that disagree and fail --require-hashes"). The / entry was quietly undoing that.

What

allow: - dependency-type: "direct" on the / pip entry, limiting it to what pyproject.toml declares — which is what its own comment already says it is for. The transitive closure stays the /requirements group's job, batched and regenerated together.

The z3-solver / pydantic-core ignores stay. The pip updater reads a locked line as an independently requested pin, so they are cheap insurance rather than redundancy.

Verification

tests/test_dependency_pinning.py, test_ci_topology.py, test_pr_title_guard.py and test_workflow_permissions.py all pass. No lock file changes.

The `/` pip entry is documented as covering the runtime dependencies that ship
inside the installed package — PyYAML and raes — but it reaches
requirements/runtime.txt as well as pyproject.toml, and without an `allow`
filter it raises a separate ungrouped PR for every transitive line in that lock.
#298 (pygments), #299 (idna) and #300 (python-dotenv) were all opened that way
and all three were closed unmerged.

A single-lock PR like that cannot land. runtime.txt and pip-audit.txt are
installed into one environment by ci.yml:audit, and runtime.txt and sbom.txt by
release-please.yml:publish, so moving a shared package in one of them alone
fails test_co_installed_locks_agree_on_shared_packages. Moving it in all of them
duplicates half the /requirements batch and forces that PR to rebase. Splitting
the transitive closure is exactly what the group above this entry exists to
prevent; the `/` entry was quietly undoing it.

`allow: dependency-type: direct` limits this entry to what pyproject declares,
which is what its own comment already says it is for. The transitive closure
stays the /requirements group's job.

The z3-solver and pydantic-core ignores stay: the pip updater reads a locked
line as a requested pin, so they are cheap insurance rather than redundancy.
@Brad-Edwards
Brad-Edwards merged commit 7b52d5c into dev Sep 12, 2026
12 checks passed
@Brad-Edwards
Brad-Edwards deleted the fix-dependabot-scope branch September 12, 2026 22:26
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.

1 participant