Repro (gt 1.1.0 + HEAD-d7868cc, macOS): a rig was created while the repo's GitHub default branch pointed at a stale lineage, so a polecat's gt done created an MR with target: beta. The witness edited the MR bead's target to main BEFORE the refinery picked it up (gt mq list showed TARGET=main, status ready). The refinery still merged into beta — the PR base had been stamped from the bead at queue-scan time, and the corrected target was never re-read at processing time.
Consequences: work lands on a dead branch; the refinery then deletes/loses track of the work branch; recovery needs manual PR surgery.
Suggested fix: re-read the MR bead's target at processing time (or validate it against the rig's default_branch and flag mismatches instead of merging).
Related hardening seen useful locally: gt rig add inheriting the remote's default branch is a footgun when the remote default is stale — a post-create warning when default_branch ≠ main would have prevented the whole chain.
Repro (gt 1.1.0 + HEAD-d7868cc, macOS): a rig was created while the repo's GitHub default branch pointed at a stale lineage, so a polecat's
gt donecreated an MR withtarget: beta. The witness edited the MR bead's target tomainBEFORE the refinery picked it up (gt mq listshowed TARGET=main, status ready). The refinery still merged intobeta— the PR base had been stamped from the bead at queue-scan time, and the corrected target was never re-read at processing time.Consequences: work lands on a dead branch; the refinery then deletes/loses track of the work branch; recovery needs manual PR surgery.
Suggested fix: re-read the MR bead's target at processing time (or validate it against the rig's
default_branchand flag mismatches instead of merging).Related hardening seen useful locally:
gt rig addinheriting the remote's default branch is a footgun when the remote default is stale — a post-create warning whendefault_branch≠mainwould have prevented the whole chain.