Files
cozystack/docs/release/backport-tasks
Myasnikov Daniil ce4ab1fd2c feat(release): park an original whose dependency never reaches its line, and hold one whose dependency is pending
On 1.6, the fix in #5071 conflicts on every run: it modifies files
that the feat in #3940 added on main, and that feat never reaches the
line. The fix in #5082 builds on #5071 and on code that never comes
either. Trying them on each run says nothing a maintainer can act on,
and a conflict reads as work to do.

Edges come from the dependencies the previous commit reads. One whose
prerequisite the line or the open batch carries, whatever its rule or
label, that this run picked or found empty, or whose evidence is
present at the branch head once earlier picks moved it, is satisfied
and dropped first. A direct push, an original rules 2-4, the start, a
skip label or a drop keep out, or one itself parked never comes and
parks the original. A prerequisite still to come (a conflict, a
deferral, a workflow wait, rule 6) holds it as deferred{needs}, the
strongest kind deciding: missing, workflow, deferred, rule 6; a chain
inherits.

run, check and the metadata operations share one order: partial unit
on the batch, a direct reason, an unpicked partial, the workflow
exception, a dependency park, a wait, then the original's own state.
In the scheduled mode a workflow original whose remaining
never-dependencies are only tests or docs waits for a maintainer
instead of parking, which is the case of the release fix in #5142.
check takes the mode the open record saved, and the scheduled one
with no batch open, where a closed record's workflow waits wait on
nothing any more and the original is judged as the scheduled run
judges it. check and the record-only operations keep a partial park
the open record holds while the batch head still shows it, since only
the run's picker sees it after the picks before it. Records refuse
waits and parks that form cycles, point at later merges or contradict
each other. notify lists a wait after what decides it, from the
record alone. backport/include lifts neither park nor wait.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 11:11:15 +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.