Skip to content

ci: calmer regen alerts that name breaking tickets, three integration attempts - #185

Open
mogita wants to merge 5 commits into
mainfrom
chore/regen-alert-wording
Open

mogita wants to merge 5 commits into
mainfrom
chore/regen-alert-wording

Conversation

@mogita

@mogita mogita commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Problem

Regen alerts in #openapi-sdks look like incidents: every post carries a warning sign, and a flaky integration run on the shared test app pings the server-sdk group after one rerun. A breaking hold also does not say which approved tickets caused it.

Solution

  • Rerun a red or cancelled Regen integration run for up to three attempts instead of one rerun. The third red attempt posts stream-sdk-java regen #N is waiting: integration tests failed 3 times. SDK bot needs a human to check.
  • A breaking hold lists the approved tickets the PR's spec adds over the base branch's spec, linked to Linear (the first three, then "and N more"): stream-sdk-java regen #N is held as breaking: CHA-7525 (2026-12-02). Label sdk-not-breaking if no customer can hit them, otherwise hold for the next window. With no added ticket it says no approved ticket explains it; if the lookup fails, it points to the PR body and the Breaking changes check.
  • Drop :warning: and "auto-" from every post. Who gets mentioned is unchanged.
  • Update the rerun line in CONTRIBUTING.md.

How to verify

  1. actionlint .github/workflows/regen.yml reports the same findings as on the base branch, only with shifted line numbers.
  2. The new new_tickets and held helpers ran locally against real protocol specs with gh stubbed: openapi-v241.35.1 to openapi-v241.35.2 names CHA-7525 (2026-12-02), equal specs give the no-ticket line, a failed lookup gives the fallback line, and a base without a ticket list gives three tickets "and 30 more".
  3. After merge, the next held or thrice-red regen posts the new wording.

Note

Low Risk
Workflow-only changes to retry policy, notification copy, and shell helpers for breaking-ticket lookup; no runtime SDK or auth logic.

Overview
The Regenerate workflow is tuned so Slack heads-ups read less like incidents and give humans better context.

Integration flakes: A failed or cancelled Regen integration run is auto-rerouted up to three times (was one) before escalation; messages distinguish "could not rerun" vs three failures vs other conclusions.

Breaking holds: When a PR has BREAKING CHANGE: footers, hold() now uses new new_tickets() / held() helpers that diff approved breaking tickets between base and head protocol specs and list up to three Linear links (with overflow text), or explain when no ticket matches or lookup fails.

Alerts: Slack posts drop :warning: and the auto- prefix; @ rules are unchanged.

Docs: CONTRIBUTING.md matches the three-attempt integration behavior.

Reviewed by Cursor Bugbot for commit b98649f. Bugbot is set up for automated code reviews on this repo. Configure here.

@getstream-metis

getstream-metis Bot commented Dec 3, 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 only in the first two rounds. 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

@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 18fdc37.

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 3, 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.

Round 2 · ✅ 2 fixed · 🎉 Approved

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

@getstream-metis
getstream-metis Bot dismissed their stale review December 3, 2026 16:24

Withdrawing approval until 7bcf2c6 is reviewed.

@mogita

mogita commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

/jeffery review

getstream-metis[bot]
getstream-metis Bot previously approved these changes Dec 3, 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.

Round 3 · ✅ 2 fixed · 🎉 Approved

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

CI still running: Analyze (java-kotlin), Breaking changes check, Cursor Bugbot, unit / 🧪 Test & lint

@getstream-metis
getstream-metis Bot dismissed their stale review December 3, 2026 16:37

Withdrawing approval until b98649f 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 4 · 🆕 1 new · nothing blocking

spec=$RUNNER_TEMP/tickets-$ref.yaml
curl -fsSL "https://raw.githubusercontent.com/GetStream/protocol/$tag/openapi/v2/serverside-api.yaml" -o "$spec" || return 1
yq -e '.info."x-stream-breaking-changes"' "$spec" > /dev/null 2>&1 || return 1
{ yq -r '(.info as $i | ($i."x-stream-breaking-changes".wire // []) + [$i."x-stream-breaking-change-lines" // {} | to_entries | .[] | select(.value.sdk // [] | any_c(test("^stream-sdk-java "))) | .key]) + (.info."x-stream-breaking-changes".go // []) | .[]' "$spec" && yq -r '.info."x-stream-breaking-change-lines" // {} | to_entries | .[] | .key as $t | (.value.wire // []) + (.value.sdk // [] | map(select(test("^stream-sdk-java ")))) | .[] | $t + "\t" + .' "$spec"; } | sort -u > "$RUNNER_TEMP/tickets-$ref" || return 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

consider: Old tickets named as new when base spec lacks lines map
The guard on line 108 only checks x-stream-breaking-changes, so a base spec with that list but no x-stream-breaking-change-lines yields bare tickets only, while the head spec adds ticket<TAB>line entries and comm -13 | cut -f1 then reports tickets the base already had. Emitting the tab entries only when the lines map exists on both sides keeps the Slack note aligned with breaking_changes.yml, which compares bare tickets in that state.

Useful? React 👍 or 👎. Disagree? Reply here.

@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 4

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

Left open, your call:

This branch has not been deployed

No deployments
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