Skip to content

fix: stop stranding sibling-update PRs on non-required checks, stale duplicates, and merge commits - #2

Merged
Mearman merged 1 commit into
mainfrom
fix/supersede-stale-bumps-and-required-check-merge-gate
Sep 7, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/supersede-stale-bumps-and-required-check-merge-gate

Conversation

@Mearman

@Mearman Mearman commented Sep 7, 2026

Copy link
Copy Markdown
Member

Fixes three confirmed root causes behind every automated documents.js bump PR sitting unmerged in novus-power/hive today (15 open PRs, oldest 18+ hours old):

  1. Merge gated on every check-run's conclusion, not just required ones. novus-power/hive's own Claude Review action refuses to run at all for a bot-authored PR unless the bot's login is in allowed_bots (a caller-side config gap, being fixed separately in that repo). That review check-run then concludes FAILURE on every bump PR -- not because of a real finding, just because the action refused to start -- and this workflow treated any non-success/skipped check-run as a hard failure, so it never even attempted the merge once GitHub's own actually-required checks had passed. Both merge paths now just attempt gh pr merge --rebase once every check-run stops being pending, and let GitHub's real required-status-checks list decide.
  2. No supersede on a new release. A burst of releases from the same sibling package left one open PR per version side by side, since nothing ever closed an older one once a newer release superseded it. bump-and-open-pr now closes and deletes the branch of any other open sibling-update/<package>-* PR before opening the new one.
  3. update-branch creates a real merge commit. heal-stranded-prs' behind-but-mergeable healing path called the update-branch REST endpoint, which only performs a merge update (no rebase mode). On a repo with a required_linear_history ruleset, that merge commit permanently blocks the PR from ever being rebase-merged -- confirmed directly against novus-power/hive#1600, which accumulated two such merge commits during today's release burst and could no longer merge at all. Replaced with a real git fetch + rebase + --force push.

Test plan

  • actionlint -ignore 'property "automerge_app_private_key" is not defined' -- clean (had to fix one genuine shellcheck false positive on the new jq filter along the way, # shellcheck disable=SC2016 with an explanation)
  • npx prettier --check . -- clean
  • Real end-to-end verification happens the moment this merges and releases: novus-power/hive's own stranded PRs get healed by the next heal-stranded-prs run (a push to its main), and the next documents.js release should open, and actually merge, a single clean bump PR.

…duplicates, and merge commits

Three related defects left every automated documents.js bump PR unmerged in
novus-power/hive today: the merge step treated ANY non-success check-run
conclusion as a hard failure, so a bot-authored PR whose review check refuses
to run at all (a caller-side allowed_bots gap) could never merge even once
every check GitHub actually requires had passed. Both merge paths now attempt
the rebase-merge once checks stop being pending and let GitHub's own
required-status-checks decide, rather than pre-judging every check-run's own
conclusion.

bump-and-open-pr never closed an older open PR for the same package when a
newer release superseded it mid-flight, leaving one PR per version piling up
during a burst of releases. It now closes and deletes the branch of any other
open sibling-update/<package>-* PR before opening the new one.

heal-stranded-prs' behind-but-mergeable path called the update-branch REST
API, which only performs a merge update -- it has no rebase mode -- leaving a
real merge commit on the PR branch. A repo requiring linear history (hive's
required_linear_history ruleset, its Staged-file guard) then permanently
refuses to rebase-merge that PR at all. Replaced with a real git
fetch+rebase+force-push.
@Mearman
Mearman marked this pull request as ready for review September 7, 2026 06:46
@Mearman
Mearman merged commit 3b81d5d into main Sep 7, 2026
7 checks passed
@Mearman
Mearman deleted the fix/supersede-stale-bumps-and-required-check-merge-gate branch September 7, 2026 06:46
@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
🔒 Security Review Completed 2026-09-07T06:55:27.216110Z 6202c20 Draft marked ready
ℹ️ 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.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.1 🎉

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