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

Open
not wants to merge 1 commits from docs/195-stale-outdated-pr into main
Contributor

What & why

Adds §10 to docs/runbooks/gitea-actions-gotchas.md (plus a summary-table row): a stacked PR that is retargeted to main in the same second its rebased branch is force-pushed can be left with a stale stored commits_behind. Gitea 1.27 then shows "out-of-date" and blocks the merge, while Update branch recomputes live and fails with "Unable to update pull request". Hit on #194; fixed there by amend + force-push.

Closes #195

Definition of Done

  • Linked Gitea issue (above).
  • Failing test committed before the implementation. — n/a, docs only
  • Implementation makes the test pass; refactor commit if structure improved. — n/a
  • Conventional Commits referencing the issue (refs #NN).
  • CI green — all Gitea Actions jobs (or make ci green while no runner exists). — pending; make docs (mkdocs build --strict) passes locally
  • docker compose up from a fresh clone reaches green health checks within 3 minutes. — n/a, no runtime change
  • Docs updated if behaviour, contracts, or operations changed.
  • ADR added in docs/architecture/ if a non-obvious decision was made. — n/a
  • Demo note in docs/demo-script.md if user-visible. — n/a

Notes for reviewers

The exact interleaving (retarget reading the not-yet-updated refs/pull/194/head, push resync running against the deleted old base) is inferred from the Gitea v1.27.0 source and the PR timeline timestamps, not from server logs. The outcome and the fix are verified: after the amend + force-push the banner and merge block disappeared.

🤖 Generated with Claude Code

## What & why Adds §10 to `docs/runbooks/gitea-actions-gotchas.md` (plus a summary-table row): a stacked PR that is retargeted to `main` in the same second its rebased branch is force-pushed can be left with a stale stored `commits_behind`. Gitea 1.27 then shows "out-of-date" and blocks the merge, while *Update branch* recomputes live and fails with "Unable to update pull request". Hit on #194; fixed there by amend + force-push. Closes #195 ## Definition of Done - [x] Linked Gitea issue (above). - [ ] Failing test committed before the implementation. — n/a, docs only - [ ] Implementation makes the test pass; refactor commit if structure improved. — n/a - [x] Conventional Commits referencing the issue (`refs #NN`). - [ ] CI green — all Gitea Actions jobs (or `make ci` green while no runner exists). — pending; `make docs` (`mkdocs build --strict`) passes locally - [ ] `docker compose up` from a fresh clone reaches green health checks within 3 minutes. — n/a, no runtime change - [x] Docs updated if behaviour, contracts, or operations changed. - [ ] ADR added in `docs/architecture/` if a non-obvious decision was made. — n/a - [ ] Demo note in `docs/demo-script.md` if user-visible. — n/a ## Notes for reviewers The exact interleaving (retarget reading the not-yet-updated `refs/pull/194/head`, push resync running against the deleted old base) is inferred from the Gitea v1.27.0 source and the PR timeline timestamps, not from server logs. The outcome and the fix are verified: after the amend + force-push the banner and merge block disappeared. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
not added this to the Iteration 6 — Production Posture milestone 2026-10-02 10:56:31 +00:00
not added the area:docstype:chore labels 2026-10-02 10:56:31 +00:00
not added 1 commit 2026-10-02 10:56:32 +00:00
docs(runbook): stale "out-of-date" PR after a stacked PR is retargeted (refs #195)
CI / lint (pull_request) Successful in 1m43s
CI / k8s (pull_request) Successful in 9s
CI / build (pull_request) Successful in 1m8s
CI / docs (pull_request) Successful in 44s
CI / unit (pull_request) Successful in 1m21s
CI / frontend (pull_request) Successful in 2m20s
CI / mutation (pull_request) Successful in 4m28s
CI / verify-stack (pull_request) Skipped
7baa5d2006
Gitea 1.27 blocks the merge on a stored commits_behind that a same-second
retarget + force-push can leave stale, while Update branch recomputes it
live and refuses. Record the symptom, the cause and the amend + force-push fix.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
All checks were successful
CI / lint (pull_request) Successful in 1m43s
Required
Details
CI / k8s (pull_request) Successful in 9s
CI / build (pull_request) Successful in 1m8s
Required
Details
CI / docs (pull_request) Successful in 44s
CI / unit (pull_request) Successful in 1m21s
Required
Details
CI / frontend (pull_request) Successful in 2m20s
Required
Details
CI / mutation (pull_request) Successful in 4m28s
Required
Details
CI / verify-stack (pull_request) Skipped
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin docs/195-stale-outdated-pr:docs/195-stale-outdated-pr
git checkout docs/195-stale-outdated-pr
Sign in to join this conversation.