docs(agents): mandate rebase onto upstream/main before every PR push#2945
docs(agents): mandate rebase onto upstream/main before every PR push#2945M8WLO wants to merge 1 commit into
Conversation
PR branch hygiene rule: always `git rebase upstream/main` on the PR branch before pushing, then `git push --force-with-lease`. Prevents scope-creep diffs (commits already on upstream are automatically skipped), keeps PR titles honest about what actually changed, and avoids review friction from stale branch bases. Prompted by PR aethersdr#2859 review where a QSO MIDI commit that was already merged (aethersdr#2845) appeared as new additions because the branch was not rebased before submission. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Thanks @M8WLO — the rule is sound and the motivation (PR #2859's stale-base diff inflation) is a real workflow problem worth documenting. Placement under CI/CD right after git ship reads naturally.
One small thing worth confirming with the maintainers before merge:
upstream/main (ten9876/AetherSDR) parenthetical — The PR base for this very PR is aethersdr:main, i.e. the canonical upstream is aethersdr/AetherSDR (the org). ten9876 appears in AGENTS.md only as the owner of the CI Docker image (ghcr.io/ten9876/aethersdr-ci), not as the host of the source-of-truth repo. If a contributor literally follows git remote add upstream against ten9876/AetherSDR, they may be rebasing onto a different ref than the one CI/branch-protection actually merges into.
Suggested tweak (only if my reading is right):
Always rebase each PR branch onto `upstream/main` (the canonical
`aethersdr/AetherSDR` repo) before pushing or force-pushing.
Otherwise this looks good to ship. Non-blocking from my side — defer to @jensenpat / @ten9876 on the upstream-owner naming since they'd know which fork is authoritative for the rebase target.
|
Thanks for opening this @M8WLO — the underlying problem you're solving is real, and #2859's diff inflation was a genuinely confusing review experience. The documentation impulse is the right one. Closing this PR rather than merging it, because the policy our project actually wants is a little more nuanced than "always rebase," and I'd rather not codify the rule as worded: How we got here on rebase vs. mergeI had your exact instinct a few weeks back. Then I got bitten by it on a PR touching What happened: I did The same scenario with
This is the kind of rule that's hard to discover by reading — you only learn it by getting burned. Which is exactly why I should have documented it months ago and didn't. Two smaller things
What's nextI'll write up the full rebase/merge/hot-files policy in Sorry for the close — it's not a reflection on your contribution. The motivation was right; we just need to capture the nuance so the rule doesn't push the next contributor into the failure mode I already walked into. Hope you'll keep contributing. 73, |
Summary
AGENTS.md: alwaysgit rebase upstream/mainbefore pushing a PR branch, thengit push --force-with-leaseWhy
PR #2859 (MIDI MOX fix) had a stale base — the QSO MIDI commit from #2845 (already merged on upstream/main) still appeared in the diff, making the PR look like 47+/1- when the intended change was 1+/1-. A rebase fixed it immediately, but the rule wasn't documented. This prevents the same issue on future PRs.
No code changes
Documentation only —
AGENTS.mdupdated with a "PR branch hygiene — mandatory before every push" block under the CI/CD section.🤖 Generated with Claude Code