fix: harden sdk auto-review gate - #26
Merged
Merged
Conversation
deny paths now clear stale auto-merge before commenting and fail the step if the disable errors, instead of best-effort || true. an empty changed-files listing no longer counts as an allowlist pass. renames are checked on both sides everywhere. approvals are pinned to the head commit.
pin the approval to the head captured before the allowlist run, then re-read the head after submitting; if it moved, dismiss the approval and deny. dismiss_stale_reviews (now enabled) covers pushes after the review; this covers the window before it.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1c9193f. Configure here.
a dismiss failure under set -e must not skip deny, which is the hard gate that clears stale auto-merge. dismiss_stale_reviews already covers the dismissal in the normal case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Follow-up to #25, applying the same review-gate hardening already on the other SDK repos' CI PRs.
Note
Medium Risk
Changes merge automation and approval logic in CI; mistakes could block safe regen merges or briefly affect auto-merge state, but scope is limited to the bot regen workflow.
Overview
Hardens the “Approve and enable auto-merge” step in
sdk_generation.yamlso regen PRs only get bot approval when stricter checks pass, and failed gates cannot leave a stale auto-merge enabled.A shared
deny()path now disables auto-merge before commenting on any rejection; withset -euo pipefail, a--disable-autofailure fails the step instead of leaving a bad head mergeable. New gates require basemain, PR head equals the commit this run pushed, and reject an empty changed-files API response when the run actually produced a diff.The generated-path allowlist now considers rename old and new paths (
previous_filename). Approvals are submitted withcommit_id, then the step re-reads head SHA and dismisses its own review +deny()if the head moved during submission. Gate failures route throughdeny()instead of ad-hoc comments.Reviewed by Cursor Bugbot for commit 4bfc8a4. Bugbot is set up for automated code reviews on this repo. Configure here.