diff --git a/.github/renovate.json5 b/.github/renovate.json5 index d971cd33..4d2a6705 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -8,6 +8,12 @@ ], schedule: ["after 11am and before 1pm on Friday"], prHourlyLimit: 0, + // Hand merging to GitHub's native auto-merge so green PRs merge the moment + // checks pass, on any day, rather than being gated by the Friday `schedule` + // window above (Renovate's own merge only runs during scheduled processing). + // Requires the repo's "Allow auto-merge" setting plus branch protection on + // `main` with the CI checks marked required (MegaLinter, source-tests). + platformAutomerge: true, customManagers: [ { customType: "regex", diff --git a/home/dot_agents/AGENTS.md b/home/dot_agents/AGENTS.md index 3ccabeac..bcbf6bdf 100644 --- a/home/dot_agents/AGENTS.md +++ b/home/dot_agents/AGENTS.md @@ -62,6 +62,7 @@ Always edit the source, not the deployed file. When updating any memory file: re - **Inspecting a PR's diff.** Always diff the remote PR branch against `origin/main` (e.g. `git diff origin/main...origin/`), not local HEAD. Local HEAD may be on an unrelated branch, so a diff against it is meaningless and returns empty output without any error. - **Before opening a PR: clean up history.** Squash messy work-in-progress or AI-attributed commits into a clean, atomic commit sequence on the branch. The branch is yours until `gh pr create` succeeds. - **Once a PR is open: never amend or force-push.** Use follow-up commits so reviewers see exactly what changed between their review and your response. The branch now belongs to the reviewer; rewriting it erases the diff they expect to see. Preserve every change as a separate commit. +- **Renovate auto-merge needs platform prerequisites, not just `automerge: true`.** With a restrictive top-level `schedule`, Renovate's own merge step only runs inside that window, so green PRs can sit unmerged for days. To merge whenever checks pass, rely on GitHub-native auto-merge (`platformAutomerge`, default true): it requires the repo's "Allow auto-merge" setting enabled AND branch protection on the target branch with the CI checks marked required. Set those required checks non-strict (do not require the branch be up to date) so a rebase schedule cannot deadlock merges, and leave admins exempt so the owner's direct pushes still work. Diagnose "automerge configured but PRs piling up" by correlating the last successful auto-merge against recent `schedule`/config commits, then verify the fix non-destructively by enabling auto-merge on a failing PR: GitHub should accept it but hold it (BLOCKED), not merge. ---