Context
Part of the #860 runaway remediation (tracker: #926). A contributing factor: PR #860's branch carried a stale April base and was repeatedly merge main-d rather than rebased, inflating it to 378 commits for a net 18-file diff and generating recurring merge-conflict resolution work that itself triggered more fixup cycles (related to the #655 stale-base hazard).
Problem
Agent branches accumulate Merge branch 'main' into … commits instead of staying rebased, so commit count diverges from real change, conflict churn compounds, and a long-lived PR drifts further from a clean, reviewable state.
Fix (choose/scope during planning)
- Prefer rebase/squash over repeated
merge main for agent branches — ideally via the existing auto-rebase path rather than merge commits.
- Optionally add a lint/health smell: flag PRs whose commit count vastly exceeds their changed-file count (e.g. >50 commits with <20 files) as a candidate for rebase/squash — complements the detection in the runaway-health issue.
Respect AGENTS.md: auto-rebase.yml stays pinned to @auto-rebase/stable (do not repoint), and the #655 guards (test-deletion-guard + "require branches up to date before merging") must remain intact.
Acceptance criteria
References
Context
Part of the #860 runaway remediation (tracker: #926). A contributing factor: PR #860's branch carried a stale April base and was repeatedly
merge main-d rather than rebased, inflating it to 378 commits for a net 18-file diff and generating recurring merge-conflict resolution work that itself triggered more fixup cycles (related to the #655 stale-base hazard).Problem
Agent branches accumulate
Merge branch 'main' into …commits instead of staying rebased, so commit count diverges from real change, conflict churn compounds, and a long-lived PR drifts further from a clean, reviewable state.Fix (choose/scope during planning)
merge mainfor agent branches — ideally via the existingauto-rebasepath rather than merge commits.Respect
AGENTS.md:auto-rebase.ymlstays pinned to@auto-rebase/stable(do not repoint), and the #655 guards (test-deletion-guard + "require branches up to date before merging") must remain intact.Acceptance criteria
merge main(or a clear rationale + smell-detector if full automation is out of scope).idea:approvedstopped planning #655 stale-base guards or theauto-rebase/stablepin.References
idea:approvedstopped planning #655 (stale-base guard), auto-rebase workflows.github/workflows/auto-rebase.yml,scripts/auto-rebase-retry.sh,.github/workflows/lint.yml