Repository navigation
fix(pr-pipeline): rotate the branch-cleanup start across every branch - #11276
Conversation
When the branch count divided the stride, every run started at the same branch, and costly kept branches early in the listing hid the later ones from every run. The step is now the stride moved up to the nearest value coprime with the branch count. Refs: #8957 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review needs no new review of No security issues found. The change only alters which branch
critical-findings: 0 |
|
claude-review needs no new review of No findings. I read the full diff and the PR context, and checked the change against Correctness of the step fix (
Test (
Closing issue
Other checks
|
|
The pr-verify verifier failed head What it wrote (21 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
Closes #11301
A review of the copy in pr-pipeline-sandbox#254 found this bug. That copy shipped with the fix, so this PR brings the source script in line with it and keeps the two identical.
Summary
When the branch count divided the branch-cleanup plan stage's stride, every run started at the same branch. Kept branches early in the listing that cost many reads then spent the evaluation share every run, and the branches after them were never evaluated.
Fix
plan()in.github/scripts/branch-cleanup/cleanup.mjsnow moves the step up fromstride % branchesto the nearest value coprime with the branch count. Each run's start isrun number × stepmod the count, so successive runs start at every branch in turn. When the count and the stride were already coprime, the start does not change.Verification
node --test cleanup.test.mjs workflow.test.mjs: 29 pass, 0 fail.scripts/check-affected.sh --tests: 9 checks pass, 7 skipped; nothing fails.Related
🤖 Generated with Claude Code