Skip to content

check for binaries in PR diff#897

Merged
Soph merged 6 commits intomainfrom
soph/binary-check-ci
Apr 9, 2026
Merged

check for binaries in PR diff#897
Soph merged 6 commits intomainfrom
soph/binary-check-ci

Conversation

@Soph
Copy link
Copy Markdown
Collaborator

@Soph Soph commented Apr 9, 2026

Entire-Checkpoint: 3bec2ffc341d


Note

Medium Risk
Adds a new CI workflow that can block pull requests if the binary-size detection misclassifies files or the base/head SHAs aren’t available in the checkout, potentially causing unexpected PR failures.

Overview
Introduces a new GitHub Actions workflow (PR Binary Size) that runs on pull requests (and manually) to detect newly added/modified binary files over a configurable size limit (default 1 MiB).

Adds scripts/check-pr-binaries.sh, which diffs the PR range against the base SHA, identifies binary diffs via git diff --numstat, checks the blob size at HEAD, and fails the job with a clear error listing any oversized files.

Reviewed by Cursor Bugbot for commit 6d51671. Configure here.

@Soph Soph requested a review from a team as a code owner April 9, 2026 12:27
Copilot AI review requested due to automatic review settings April 9, 2026 12:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions safeguard to detect oversized binary files introduced by a pull request, using a repo script that inspects git diff output and fails the workflow when binaries exceed a size limit.

Changes:

  • Introduce scripts/check-pr-binaries.sh to detect binary diffs and enforce a maximum blob size.
  • Add .github/workflows/pr-binary-size.yml to run the binary-size check on PRs (and manual dispatch).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/check-pr-binaries.sh Implements binary detection via git diff --numstat and checks blob sizes at the head ref.
.github/workflows/pr-binary-size.yml Runs the script in CI for PRs with a 1MB default size limit.

Copy link
Copy Markdown

@cursor cursor bot left a comment

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

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6d51671. Configure here.

Soph added 6 commits April 9, 2026 18:35
Entire-Checkpoint: 3bec2ffc341d
Entire-Checkpoint: 6ad0cfc5e0ea
Entire-Checkpoint: 9459df72520c
Entire-Checkpoint: acbed376913a
Entire-Checkpoint: 21fa66faf4c8
Entire-Checkpoint: ace571abdfe6
@Soph Soph force-pushed the soph/binary-check-ci branch from 480a697 to f2b7ba8 Compare April 9, 2026 16:39
@Soph Soph merged commit d2310b3 into main Apr 9, 2026
9 checks passed
@Soph Soph deleted the soph/binary-check-ci branch April 9, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants