Skip to content

dev-lead retry sweep ignores dev-lead:hands-off: it posts retry markers and dispatch guards and dispatches passes on held PRs #2089

Closed

Description

@don-petry

Problem

scripts/dev-lead-retry.sh decides whether to resume a PR with pr_resume_suppressed (scripts/lib/pr-automation-budget.sh). That check only knows about needs-human-review, through pr_has_escalation_label. It never consults the shared hold set in scripts/lib/hold-gate.sh (needs-human-review, dev-lead:needs-human, dev-lead:hands-off). #1595 introduced that set so callers would stop drifting apart on which labels count as a hold.

So for a PR held with dev-lead:hands-off or dev-lead:needs-human, the sweep still:

  • posts dev-lead-bot-comment-retry markers,
  • posts dev-lead-dispatch-guard markers,
  • dispatches a dev-lead pass.

The dispatched pass is then skipped by dev-lead-intent.sh (hands-off-label). Nothing is pushed, so this is not a safety breach. But every sweep:

  • adds marker comments to a PR a human parked;
  • spends a retry attempt on a run that can't act, so the attempt count may already be used up when the hold is lifted;
  • starts a workflow run that only skips.

Evidence

Seen on 2026-10-09 on two PRs held with dev-lead:hands-off:

Fix

In pr_resume_suppressed, suppress when any hold-gate label is present, not only the escalation label. The labels JSON is already passed in, so this needs no extra API call. Something like:

local held
held=$(jq -r '.[]' <<< "$labels_json" 2>/dev/null | hold_gate_first_match "$(cat)") && {
  echo "  [suppress] PR #${pr} in ${repo} carries ${held} — human hold; not resuming (#1595)" >&2
  return 0
}

The library would need to source lib/hold-gate.sh.

Acceptance criteria

  1. With dev-lead:hands-off or dev-lead:needs-human on a PR, the retry sweep posts no retry marker or dispatch guard and dispatches nothing. A bats test covers each of the three retry paths: rate-limit/partial, bot-comment and bot-thread.
  2. needs-human-review keeps its current suppression message (P1 (#860 follow-up): retry crons must skip escalated/needs-human PRs before re-dispatching #946).
  3. Once the label is removed, the next sweep resumes the PR as usual.

Activity

  1. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Thanks so much for the detailed report and the clear evidence from #2085 and #1902 — it makes the problem easy to follow. To make sure the fix covers everything, could you confirm whether any other label-gated paths in the retry sweep (beyond the three listed: rate-limit/partial, bot-comment and bot-thread) also skip the hold-gate check, or whether pr_resume_suppressed is the only place it's missing?

  2. added a commit that references this issue on Oct 9, 2026
    91112b8
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

    bugBug reports

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions