Skip to content

ci: report a stuck regen merge once per commit, with GitHub's reason - #399

Merged
mogita merged 3 commits into
mainfrom
fix/regen-timeout-alert-once
Dec 5, 2026
Merged

mogita merged 3 commits into
mainfrom
fix/regen-timeout-alert-once

Conversation

@mogita

@mogita mogita commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When a regen PR cannot merge, every Regenerate run that finds it open waits 45 minutes and posts "did not merge within 45 minutes" again, without saying why. GetStream/stream-sdk-java#195 posted three times for one commit (the openapi-release run, the run its integration finish started, and the daily run) while an unresolved Cursor Bugbot thread blocked the merge.

Solution

  • The first run to give up on a head commit leaves a PR comment naming that commit and GitHub's last merge refusal, then posts to Slack as before.
  • A later run that gives up on the same commit for the same reason finds the comment and only logs a notice. It still tries to merge for its 45 minutes, so a cleared blocker still lands. A new head commit, or a new reason such as a refusal after checks that were pending, posts again. Only the app's own comments count, so no one else can mute the heads-up.
  • The Slack line ends with GitHub's reason, for example stream-py regen #N did not merge within 45 minutes. GitHub says: All comments must be resolved. At least 1 approving review is required by reviewers with write access. Who gets mentioned is unchanged.

How to verify

  1. actionlint .github/workflows/regen.yml reports the same findings as on the base branch, only with shifted line numbers.
  2. land() ran locally with gh stubbed to refuse the merge: the first run commented once, wrote the note with the reason and exited 1; a second run on the same commit and reason logged the notice and exited 0 with no note; a first run that timed out on pending checks did not hide a later run's refusal; a matching comment by another author did not mute it; with the merge allowed it exited 0 and left no comment.
  3. After merge, the next regen that cannot merge posts once, with the reason.

Each Regenerate run that found an unmergeable regen PR waited 45 minutes and posted the same heads-up, so one stuck commit could post every day. The first run to give up now leaves a PR comment naming the commit and GitHub's last merge refusal; a later run on the same commit finds it and only logs a notice. The Slack line carries the refusal.
@getstream-metis

getstream-metis Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

👋 Thanks, 🌵! I'm on it.

How to work with me

  • 💬 Disagree with a finding? Reply in its thread and tell me why. I'll withdraw it, or answer with evidence.
  • 🔁 Fixed it? Just push. The next round checks your fix and resolves the thread.
  • 👍 👎 Rate my findings. I learn what your team doesn't want flagged.
  • ✅ I approve once nothing blocking is left: must-fix always blocks; should-fix blocks in the first two rounds, and after that until you fix it or reply in its thread. CI isn't part of that; branch protection still holds the merge until it's green. On repos that require a human approval, a teammate still has to approve too.
Commands

Comment any of these on the PR:

  • /jeffery review · start a review
  • /jeffery next-round · start the next round now
  • /jeffery pause · /jeffery resume · stop or restart reviews on this PR
  • /jeffery status · where things stand
  • /jeffery help · all commands

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e828c53. Configure here.

Comment thread .github/workflows/regen.yml Resolved
A run that gave up while checks were still pending left a reasonless comment, which kept a later run's GitHub refusal out of Slack. The comment is now matched on the commit and the reason together.

@getstream-metis getstream-metis 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.

Round 1 · 🆕 2 new · nothing blocking

➡️ Round 2 started on 6f60250.

Comment thread .github/workflows/regen.yml Resolved
Comment thread .github/workflows/regen.yml Resolved
getstream-metis[bot]
getstream-metis Bot previously approved these changes Dec 5, 2026

@getstream-metis getstream-metis 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.

🎉 Approved · round 1

Nice work, 🌵! Nothing blocking is left on a0bbfa2e9639. Ship it 🚀

Left open, your call:

Anyone who can comment on the PR could post the marker line and mute the heads-up for that commit.
@getstream-metis
getstream-metis Bot dismissed their stale review December 5, 2026 11:53

Withdrawing approval until 6f60250 is reviewed.

@getstream-metis getstream-metis 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.

Round 2 · 🎉 Approved

Nice work, 🌵! Nothing blocking is left on 6f60250dc32b. Ship it 🚀

@mogita
mogita merged commit 58f506a into main Dec 5, 2026
27 checks passed
@mogita
mogita deleted the fix/regen-timeout-alert-once branch December 5, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant