Skip to content

Refinery: MR target stamped at queue-scan time — later retarget of the MR bead is silently ignored #4385

Description

@theabcreators

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_branchmain would have prevented the whole chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions