diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 44c8a0d7..3abf5f8d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,12 +18,10 @@ version: 2 # Policy notes: # 1. Cooldowns satisfy zizmor (`dependabot-cooldown` >= 7d). -# 2. The `uv` group scopes weekly PRs to `minor` + `patch` and suppresses routine -# `version-update:semver-major` PRs via `ignore` (so breaking major jumps that -# require code migrations are handled intentionally rather than turning the -# weekly PR red). Security/CVE updates bypass both `cooldown` and `ignore`, -# opening standalone PRs (including major bumps when required) outside the -# weekly group. +# 2. The `uv` workspace batches `minor` + `patch` into one weekly PR. Majors aren't +# ignored and aren't grouped: each gets its own PR, because each needs its own +# review (cap diff, changelog, contract or not) and one red major shouldn't +# block the others. Security/CVE updates bypass `cooldown` and open standalone PRs. updates: # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" @@ -38,6 +36,8 @@ updates: - "*" # Maintain dependencies for Python (uv workspace) + # Majors open one PR per dep instead of being ignored: a green one widens the + # cap, a red one is the migration ticket. See docs/dependencies.md. - package-ecosystem: "uv" directory: "/" schedule: @@ -45,13 +45,22 @@ updates: cooldown: default-days: 7 groups: - py-dependencies: + py-minor-and-patch: patterns: - "*" update-types: - "minor" - "patch" - ignore: - - dependency-name: "*" + # Majors open one PR per dep, except families that release in lockstep: + # splitting those would leave each PR unresolvable (sdk 2 needs api 2). + opentelemetry-major: + patterns: + - "opentelemetry-*" + update-types: + - "major" + aws-major: + patterns: + - "boto3" + - "botocore" update-types: - - "version-update:semver-major" + - "major" diff --git a/docs/dependencies.md b/docs/dependencies.md index a04cb1d7..6b68be1f 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -49,6 +49,11 @@ Don't bump floors just because a newer version is out. Only bump on purpose when 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 touches `uv.lock` (never `packages/*/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`). Check `packages/*/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: ```bash