Skip to content

Decide How upstream-contribution-workflow Updates the Clean Branch Where an Upstream Forbids Rewriting a Published Pull Request #4176

Closed

Description

@ptr727

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

  1. 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.
  2. 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.
  3. 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.

Activity

  1. added
    decision
    on Nov 13, 2026
  2. ptr727 commented on Nov 16, 2026

    @ptr727
    OwnerAuthor

    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.

  3. removed
    decision
    on Nov 16, 2026
  4. ptr727 commented on Nov 22, 2026

    @ptr727
    OwnerAuthor

    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.

  5. ptr727 commented on Nov 22, 2026

    @ptr727
    OwnerAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions