docs(runbook): stale "out-of-date" PR after a stacked PR is retargeted #195

Open
opened 2026-10-02 10:55:34 +00:00 by not · 0 comments
Contributor

Document a Gitea 1.27 gotcha hit on PR #194 (2026-10-02).

What happened: #194 was stacked on #193. The rebased #194 branch was force-pushed in the same second that merging #193 deleted build/191-clamav and Gitea retargeted #194 to main. The retarget's syncCommitDivergence compared main against a not-yet-updated refs/pull/194/head and stored CommitsBehind = 1; the push handler's own resync ran against the deleted old base and never corrected it.

Symptom: the PR shows "This branch is out-of-date with the base branch" and the merge is blocked (block_on_outdated_branch), but Update branch fails with "Unable to update pull request" (API: HeadBranch of PR 194 is up to date) — the banner reads the stored count, the update recomputes it live from git.

Fix used: give the head a new SHA (git commit --amend --no-edit + git push --force-with-lease); the push recomputes the stored divergence.

Done when

  • Section added to docs/runbooks/gitea-actions-gotchas.md (symptom, why, fix, how to avoid)
  • Row added to the summary table
Document a Gitea 1.27 gotcha hit on PR #194 (2026-10-02). **What happened:** #194 was stacked on #193. The rebased #194 branch was force-pushed in the same second that merging #193 deleted `build/191-clamav` and Gitea retargeted #194 to `main`. The retarget's `syncCommitDivergence` compared `main` against a not-yet-updated `refs/pull/194/head` and stored `CommitsBehind = 1`; the push handler's own resync ran against the deleted old base and never corrected it. **Symptom:** the PR shows "This branch is out-of-date with the base branch" and the merge is blocked (`block_on_outdated_branch`), but *Update branch* fails with "Unable to update pull request" (API: `HeadBranch of PR 194 is up to date`) — the banner reads the stored count, the update recomputes it live from git. **Fix used:** give the head a new SHA (`git commit --amend --no-edit` + `git push --force-with-lease`); the push recomputes the stored divergence. ## Done when - [ ] Section added to `docs/runbooks/gitea-actions-gotchas.md` (symptom, why, fix, how to avoid) - [ ] Row added to the summary table
not added this to the Iteration 6 — Production Posture milestone 2026-10-02 10:55:34 +00:00
not added the area:docstype:chore labels 2026-10-02 10:55:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eho/register-referentie#195