Skip to content

fix: stop serializing stranded-PR healing behind each other's CI wait - #3

Merged
Mearman merged 2 commits into
mainfrom
fix/parallelize-heal-stranded-prs
Sep 7, 2026
Merged

Mearman merged 2 commits into
mainfrom
fix/parallelize-heal-stranded-prs

Conversation

@Mearman

@Mearman Mearman commented Sep 7, 2026

Copy link
Copy Markdown
Member

Splits heal-stranded-prs into discover-stranded-prs (fast git operations only -- rebase or regenerate each candidate branch, oldest-created first, never waiting on CI) and wait-and-merge-healed-prs (a matrix job, one per healed branch, waiting out its own CI cycle before rebase-merging).

Found while investigating why novus-power/hive#1584 stayed stuck: a backlog of several sibling-update PRs meant the single job's CI wait for the first one or two candidates ate its whole timeout, and it was cancelled before ever reaching the older, longer-stranded ones. Oldest-first ordering plus parallel per-PR merge jobs fixes the starvation regardless of how large the backlog gets.

heal-stranded-prs regenerated or rebased each stranded sibling-update PR
and then waited out that branch's full CI cycle before moving to the next
candidate, all inside one job with a single timeout. Once more than a
couple of PRs went stranded at once, the CI wait for the first one or two
candidates routinely consumed the whole timeout, and the job was cancelled
before reaching the rest -- starving whichever PRs sorted later, which
were consistently the oldest, most overdue ones.

Split into discover-stranded-prs (git operations only, oldest-candidate
first, never waits on CI) and wait-and-merge-healed-prs (one job per
healed branch via a matrix strategy, so however many PRs got healed wait
out their CI cycles in parallel instead of queued one behind another).
@Mearman
Mearman marked this pull request as ready for review September 7, 2026 09:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T10:15:20.972819Z 47c2235 Manual request
🔒 Security Review Completed 2026-09-07T10:09:03.734954Z 6ab3711 Draft marked ready

Security findings

Advisory findings (1)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 6ab3711663

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread .github/workflows/sibling-dependency-update.yml Outdated
…olation

wait-and-merge-healed-prs interpolated matrix.branch straight into a run:
script body. That branch name traces back to a PR's own headRefName, which
git accepts containing shell metacharacters, and GitHub splices ${{ }}
expressions into the script text before bash ever parses it -- a crafted
branch name could execute arbitrary commands with this job's write-capable
App token. Bind pr_url/head_sha/branch through the step's env block instead,
so they reach the script as data rather than as script text.
@Mearman

Mearman commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 47c2235657

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Mearman
Mearman merged commit f875cbe into main Sep 7, 2026
7 checks passed
@Mearman
Mearman deleted the fix/parallelize-heal-stranded-prs branch September 7, 2026 10:20
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant