Skip to content

fix(pr-pipeline): branch-cleanup starts every run at the same branch when the count divides the stride #11301

Closed

Description

@kyle-sexton

Summary

When the branch count divides the branch-cleanup plan stage's stride, plan() in .github/scripts/branch-cleanup/cleanup.mjs starts every run at the same branch. Kept branches early in the listing that cost many reads then spend the evaluation share every run, and the branches after them are never evaluated. A review of the copy in pr-pipeline-sandbox#254, part of #8957's adoption, found it; that copy shipped with the fix, and this repository's source script still has the bug.

Done when

  • Successive runs start at every branch in turn when the branch count divides the stride, shown by a test that fails before the fix.
  • The start does not change when the count and the stride are already coprime.

Related

Activity

  1. added
    needs-triage
    on Oct 30, 2026
  2. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: when the branch count divides the stride, plan() in .github/scripts/branch-cleanup/cleanup.mjs starts every run at the same branch. Expensive early branches then use up the evaluation share each run, and later branches are never evaluated. The done-when items are clear: a test that fails before the fix and rotates the start across every branch, and no change in behavior when the count and stride are coprime. Nothing is missing. I found no duplicate among the open issues. #8957 is the related parent.

    Automated triage, applied by the lanes App.

  3. added and removed
    needs-triage
    on Oct 30, 2026
  4. added
    status: ready
    admission-deferred
    on Oct 30, 2026
  5. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: open pull request #11276 is for it.

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

    admission-deferredstatus: ready

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions