You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decide How upstream-contribution-workflow Updates the Clean Branch Where an Upstream Forbids Rewriting a Published Pull Request #4176
Question for the maintainer (away-mode backlog-burndown planner, round 7, 2026-11-13). Split out of #2274, the part of it that needs a decision.
The Problem
upstream-contribution-workflow has two branches. The work happens on a dirty branch on the maintainer's fork. A clean branch carries only the intended history, and that clean branch is the upstream pull request. Each time a reviewer asks for changes, step 5 re-squashes the clean branch and pushes it with --force-with-lease.
Some upstream projects forbid rewriting a published pull request branch. On such a project step 5 breaks the upstream's own rule. Today's only fallback is opening a fresh upstream pull request for each round.
The rest of #2274 is decided, and it is about the dirty branch, not the clean one. Where an upstream's CI rejects merge commits, the dirty branch is rebased. That part stays ordinary work.
Options, Recommended First
Append-only clean branch where rewriting is forbidden (recommended). On such an upstream, the clean branch takes each round as a new commit on top. The squash then happens once, at the end or through the upstream's own squash merge. Everywhere else, step 5 is unchanged. Reason: one upstream pull request keeps its review history and its reviewers' context, and the upstream's rule is honored. Many such upstreams squash on merge anyway.
Keep the fresh-pull-request fallback. Open a new upstream pull request for each round, closing the previous one. No skill change is needed. The cost is that reviewers lose their thread history every round.
Ask per upstream. The skill says to stop and ask the maintainer the first time an upstream forbids rewrites, and to record the choice for that upstream.
Answered by the maintainer, 2026-11-16: option 1, an append-only clean branch where rewriting is forbidden. On such an upstream the clean branch takes each round as a new commit on top, and the squash happens once, at the end or through the upstream's own squash merge. Everywhere else, step 5 is unchanged. The decision label comes off, and this issue is now ordinary work in upstream-contribution-workflow.
Backlog burndown claim (round 3, 2026-11-22): branch burndown/upstream-branch-rewrite. Predicted files: .agents/skills/upstream-contribution-workflow/SKILL.md and .agents/skills/git-commit-conventions/SKILL.md (and their generated copies). Shared by #2274 and #4176. No other group may edit these files while this claim stands.
Maintainer's answer, 2026-11-22, on #4339: when the upstream base moves under an append-only clean branch, upstream-contribution-workflow stops and asks him, as #4339 built it. No fixed policy is set, since the case is rare and depends on each upstream's own rules.
Activity
ptr727 commentedon Nov 16, 2026
Answered by the maintainer, 2026-11-16: option 1, an append-only clean branch where rewriting is forbidden. On such an upstream the clean branch takes each round as a new commit on top, and the squash happens once, at the end or through the upstream's own squash merge. Everywhere else, step 5 is unchanged. The
decisionlabel comes off, and this issue is now ordinary work inupstream-contribution-workflow.ptr727 commentedon Nov 22, 2026
Backlog burndown claim (round 3, 2026-11-22): branch
burndown/upstream-branch-rewrite. Predicted files:.agents/skills/upstream-contribution-workflow/SKILL.mdand.agents/skills/git-commit-conventions/SKILL.md(and their generated copies). Shared by #2274 and #4176. No other group may edit these files while this claim stands.Rebase or Append Where an Upstream Rejects Merges or Rewrites (#4339)
ptr727 commentedon Nov 22, 2026
Maintainer's answer, 2026-11-22, on #4339: when the upstream base moves under an append-only clean branch,
upstream-contribution-workflowstops and asks him, as #4339 built it. No fixed policy is set, since the case is rare and depends on each upstream's own rules.