Skip to content

CLI-117: pr land --update-branch leaves a stale red check to a manual update #2497

Open

Description

@mlorentedev

Problem

dotf pr land <N> --update-branch updates a PR only when BEHIND is its only failing condition (prland.go, onlyBehind). On 2026-10-14 #2491 was red on from-zero (macos-latest) from BUG-138, which #2495 had just fixed on main. pr land 2491 --wait --update-branch answered [NOT MERGED] from-zero (macos-latest): fail; merge state is UNKNOWN and left the branch as it was. Landing it took a manual gh pr update-branch 2491, then a second pr land. CI went green on the updated head.

That manual step goes against the rule that every repeatable step is a dotf behaviour. The refusal does not say that the failing check ran on a head older than the base, or what to do about it.

Options (a decision, so it may need a spec)

  1. With --update-branch, when the PR is behind and some checks are red, update once and decide again on the new head's checks. The maxUpdates bound still applies, and a check that stays red still refuses.
  2. Keep the rule, and have the refusal name the case: "behind main and red: gh pr update-branch N reruns CI on the current base".

Option 1 spends one CI run on a PR that is red for its own reasons. Option 2 keeps the manual step.

Evidence

Activity

  1. mlorentedev commented on Oct 14, 2026

    @mlorentedev
    OwnerAuthor

    Decision (owner delegated to the advisor, 2026-10-14): option 1

    --update-branch updates a PR that is behind its base even when some of its checks are red. It updates once, then decides again on the new head's checks. A check that stays red still refuses, and maxUpdates still bounds the loop.

    • Option 2 keeps the manual gh pr update-branch, which the standing rule against repeatable manual steps excludes.
    • The flag cannot meet its own help text ("when BEHIND is the only failing condition") while every check ran on a stale head: whether BEHIND is the only failure is unknowable until the checks run on the current base.
    • No authority is widened. A merge still needs green checks and a ## Review triage; the flag only spends one CI run.

    It changes a documented flag's semantics, so it goes through a spec. That waits for the active-spec count to drop under the ADR-043 limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew capability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions