Files
cozystack/docs/release/backport-tasks
Myasnikov Daniil c617a99453 fix(release): withhold or refuse a unit that does only part of its original on the line
A clean cherry-pick says nothing about whether the original landed
whole: git deletes a file the line never had without a conflict and
leaves a file the line lacks untouched. #5088 reached the 1.6 batch
that way, carrying only its test while the two deletions that are the
fix had no effect.

Every M and D path of an original is now judged at its counterpart on
the line, followed through renames on main, on the line, or both. A
modified path missing before and after, or left unchanged when the line
holds neither the original's blob nor a clean git merge-file result, is
omitted; a deleted path absent before is omitted. Content merge-file
refuses, mode changes and skipped rename detection become diagnostics
and never count as omissions; I/O failures stop the command.

The same guard runs in four places: the picker, which resets a partial
pick and parks the original; a check-time pass over every unit on the
open batch at its own first parent, whatever its label, which fails
check --cut and verify; the same pass over every unpicked original's
clean net merge, which parks a partial one with no record needed; and
fold. contained accepts the renamed path, so a fix of a renamed file
passes verify and fold. The unit mapping also closes the found() gap: a
merged original whose first pick came out empty is on the batch, not
missing.

The record moves to version 3 with parked entries and partial units,
and reports to format 2 with typed parked entries; format 1 reports
still read.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 10:58:32 +00:00
..

Backport tasks

The backport batch is built by backport-batch, and two steps around it need a maintainer's judgement. Each is a task with fixed inputs, one allowed output and a check in code that the result passes before anything is pushed. Both wait on the batch pull request: the batch's comment lists the deferred conflicts, and a failed batch CI shows on its checks.

Task Input Output Check
Resolve a conflict a deferred conflict on the batch pull request the original's commits picked under one merge on the batch branch, or one pick for a squash backport-batch fold, and backport-batch verify in CI
Attribute a failed batch CI the failing jobs of the batch pull request the culprit deferred to the next batch backport-batch run --defer

Rules for every task

  • Push nothing but the branch of the open batch pull request, backport-batch/<line>-<yyyymmdd> in this repository, and only what the task's check accepted. Never push to main or a release-* branch, and never open a second batch pull request: the scheduled run continues the open one.
  • Change no file the original pull request does not change, or the path a rename on main or on the line gave it. A conflict that cannot be resolved inside those files is not resolved: the original stays deferred.
  • Never rewrite the batch branch by hand. A plain push to it is a fast-forward; only backport-batch run --defer --push replaces it, leased on the head it rebuilt.
  • Leave the batch pull request's title and body to the tool: it rewrites both on every run, and a hand edit is lost or, inside the backport-batch block, makes run, check, fold and notify refuse the body, and inside the backport-batch-report block makes run --push and backport-batch report refuse it. Leave the tool's report comments as they are too: each keeps one classification of the line, and an edited one makes backport-batch report refuse it.
  • When the task cannot be done within these rules, push nothing and leave a comment on the batch pull request saying why, so the next maintainer to look finds it. Nothing is lost by waiting: a red batch does not merge, and a deferred original goes to the next batch.

Getting the tool

Build it from main, in a clean worktree of this repository whose origin is this repository and with gh authenticated as someone who can push to the batch branch:

git fetch origin
git worktree add --detach ../backport-task origin/main
cd ../backport-task
go build -o /tmp/backport-batch ./cmd/backport-batch

Run it from that worktree. Every command but notify and report fetches origin first, and run, check, fold and lines read the policy from origin/main.