Skip to content

fix: harden sdk auto-review gate#7

Merged
mekilis merged 3 commits into
mainfrom
ci/harden-sdk-auto-review
Jul 20, 2026
Merged

fix: harden sdk auto-review gate#7
mekilis merged 3 commits into
mainfrom
ci/harden-sdk-auto-review

Conversation

@mekilis

@mekilis mekilis commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • deny paths in the auto-review step now clear any stale auto-merge before commenting, and fail the step if the disable errors instead of swallowing it
  • an empty changed-files listing no longer counts as an allowlist pass
  • approvals are pinned to the head commit this run pushed (base + head-sha checks), and renames are checked on both sides

Follow-up to #5, applying the same review-gate hardening already on the other SDK repos' CI PRs.


Note

Medium Risk
Changes only CI merge/approval automation but affect whether SDK regen PRs auto-merge; misconfiguration could block merges or leave stale auto-merge enabled if disable failed (now intentionally fails the step).

Overview
Tightens the “Approve and enable auto-merge” step in sdk_generation.yaml so regen PRs only get bot approval and auto-merge when several new checks pass.

A shared deny() helper runs on every rejection: it disables auto-merge first (step fails if disable errors), then posts the explanation comment. Gate failures now also require base is main, PR head matches the commit this run pushed, and a non-empty changed-files list when the run actually produced a diff.

The generated-path allowlist now considers renames (filename and previous_filename). Approvals are pinned to commit_id, with a post-approve head re-read that dismisses the review and calls deny if the head moved during submission.

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

mekilis added 2 commits July 20, 2026 20:32
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.

@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 default 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 e2f54d0. Configure here.

Comment thread .github/workflows/sdk_generation.yaml
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.
@mekilis
mekilis merged commit cc96ff9 into main Jul 20, 2026
3 checks passed
@mekilis
mekilis deleted the ci/harden-sdk-auto-review branch July 20, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant