chore(renovate): rebase dependency PRs when they fall behind main #675

Merged
tobru merged 1 commit from chore/renovate-rebase-behind-base into main 2026-09-16 18:30:14 +00:00
Member

Summary

Sets "rebaseWhen": "behind-base-branch" in renovate.json, so Renovate rebases every open dependency PR that main has moved past.

Why

.forgejo/workflows/tests.yaml runs on push and tests the branch as pushed, not merged with main. With Renovate's default (rebaseWhen: auto), a PR without automerge is only rebased once it conflicts. So a dependency PR that went red because of a failure on main stays red after main is fixed, until someone ticks its rebase checkbox.

This happened with PR 674: three staff view tests expired on 2026-09-11, so any Renovate PR whose tests ran after that failed, and stays failed after the fix lands.

Cost

  • One extra CI run per open Renovate PR for each merge to main, bounded by prConcurrentLimit: 5. The test suite takes about a minute.
  • Each rebase is a force push, so PR timelines get noisier.
  • Rebases happen at the next Renovate run (daily 03:00, or run the "Renovate Dependency Bot" workflow manually), not immediately.
  • A Renovate branch with manual commits is still not rebased automatically.

Testing

  • renovate-config-validator renovate.json: "Config validated successfully".
  • The effect shows at the first Renovate run after merge: open Renovate PRs that are behind main get rebased and retested.

Design Decisions

  • behind-base-branch for this repo only: it pays off because CI tests the branch head and Python dependency PRs are not automerged. Repos whose CI tests the merge with main (GitHub pull_request) gain little and keep the default.
  • No automerge added: out of scope; rebaseWhen alone gets stale PRs retested.

🤖 Generated with Claude Code

https://claude.ai/code/session_014S5eLBkR9DQyhYAG11hBZw

## Summary Sets `"rebaseWhen": "behind-base-branch"` in `renovate.json`, so Renovate rebases every open dependency PR that `main` has moved past. ## Why `.forgejo/workflows/tests.yaml` runs on `push` and tests the branch as pushed, not merged with `main`. With Renovate's default (`rebaseWhen: auto`), a PR without automerge is only rebased once it conflicts. So a dependency PR that went red because of a failure on `main` stays red after `main` is fixed, until someone ticks its rebase checkbox. This happened with PR 674: three staff view tests expired on 2026-09-11, so any Renovate PR whose tests ran after that failed, and stays failed after the fix lands. ## Cost - One extra CI run per open Renovate PR for each merge to `main`, bounded by `prConcurrentLimit: 5`. The test suite takes about a minute. - Each rebase is a force push, so PR timelines get noisier. - Rebases happen at the next Renovate run (daily 03:00, or run the "Renovate Dependency Bot" workflow manually), not immediately. - A Renovate branch with manual commits is still not rebased automatically. ## Testing - `renovate-config-validator renovate.json`: "Config validated successfully". - The effect shows at the first Renovate run after merge: open Renovate PRs that are behind `main` get rebased and retested. ## Design Decisions - **`behind-base-branch` for this repo only**: it pays off because CI tests the branch head and Python dependency PRs are not automerged. Repos whose CI tests the merge with `main` (GitHub `pull_request`) gain little and keep the default. - **No automerge added**: out of scope; `rebaseWhen` alone gets stale PRs retested. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014S5eLBkR9DQyhYAG11hBZw
The test workflow runs on push and tests the branch as pushed, not merged
with main. Renovate's default (rebaseWhen: auto) only rebases an
unautomerged PR once it conflicts, so a dependency PR that went red because
of a failure on main stayed red after main was fixed, until someone ticked
the rebase checkbox.

behind-base-branch rebases every open Renovate PR that main has moved past,
at the next Renovate run, which retests it against current main. The cost is
one extra CI run per open PR per merge to main, bounded by
prConcurrentLimit: 5.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S5eLBkR9DQyhYAG11hBZw
tobru merged commit 7ca8fd66ea into main 2026-09-16 18:30:14 +00:00
tobru deleted branch chore/renovate-rebase-behind-base 2026-09-16 18:30:14 +00:00
Sign in to join this conversation.
No description provided.