Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

#196

P2: Move followed change requests when a landing moves the branch

closed · opened by keenan 5d ago

keenan opened this 5d ago

Landing a change through the forge moves its base branch without running the Git hooks. A push to that branch would move the head: of every open request that follows it; a landing does not, so those requests keep reviewing the pre-merge tip.

Why

  • A change request follows the branch it was opened from. post-receive calls metadata.SyncBranchHead after a push so the request names the tip a reviewer will see.
  • landing.Land moves the base ref with update-ref, so no hook runs. The open requests that follow the moved branch are left on their old head.
  • The symptoms are misleading: the request page says “branch moved”, its Runs tab lists runs for the old commit (the new run exists, but under the base branch), and head: is no longer the reviewed code.
  • Approvals are bound to a commit, so a follower with approvals would be holding ones that name code the branch no longer has.
  • This is exactly the stacked workflow: land the upper request into the lower’s branch, and the lower request must move with the branch.

CI itself is not missing: the ref reconciler queues the new tip within 30s. Only the follower sync is skipped.

Scope

  • MarkMerged moves the open requests following the request’s base branch onto the landed commit, in the same metadata commit that marks the request merged (so the landing and its followers cannot disagree).
  • Share the follower-update body with SyncBranchHead instead of keeping two copies of the rule.
  • Cover it with a landing test: a lower request following a branch, an upper request landing into that branch, and the lower request’s head moving.

Acceptance criteria

  • Landing a request moves head: of every open request whose head_ref is the base branch that just moved.
  • The mark, the linked-issue closures and the follower moves are one commit; a failure writes none of them.
  • A follower’s approvals are not carried: they still name the commit they were given for.
  • go test -tags sqlite_fts5 ./metadata ./forge/landing passes.

Comments (0)

No comments yet.