Skip to content

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

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

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

Conversation

@mogita

@mogita mogita commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

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 getstream-php 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

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 4f19a93.

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 aede2e792c5b. 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 4f19a93 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 4f19a936d049. Ship it 🚀

@mogita
mogita merged commit 640b03b into master Dec 5, 2026
13 checks passed
@mogita
mogita deleted the fix/regen-timeout-alert-once branch December 5, 2026 12:09
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