Skip to content

ci(sdks): Warn against non-trivial changes to multiple SDKs#17397

Open
szokeasaurusrex wants to merge 3 commits intomasterfrom
szokeasaurusrex/single-sdk-change-enforcement
Open

ci(sdks): Warn against non-trivial changes to multiple SDKs#17397
szokeasaurusrex wants to merge 3 commits intomasterfrom
szokeasaurusrex/single-sdk-change-enforcement

Conversation

@szokeasaurusrex
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex commented Apr 20, 2026

Add a CI job which fails and posts a comment when non-trivial changes to multiple SDK docs pages are detected. We define non-trivial as affecting more than five lines.

We do not intend to make this CI job required; rather, I hope PR authors and reviewers will heed the comments posted by this workflow.

Example runs: The job fails against #17398 and passes against #17400.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Apr 20, 2026 4:36pm
sentry-docs Ready Ready Preview, Comment Apr 20, 2026 4:36pm

Request Review

Add a CI job which fails and posts a comment when non-trivial changes to multiple SDK docs pages are detected. We define non-trivial as affecting more than five lines.

We do not intend to make this CI job required; rather, I hope PR authors and reviewers will heed the comments posted by this workflow.
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/single-sdk-change-enforcement branch from 23f7ea8 to 51b9566 Compare April 20, 2026 16:12
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review April 20, 2026 16:13
Comment thread scripts/check-sdk-diff-scope.ts Outdated
Change the filter condition from >= to > so that SDKs with exactly
LINE_THRESHOLD (5) changed lines are not treated as non-trivial.
This aligns the code with the documented behavior stating changes
must 'exceed' the threshold ('more than five lines').

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Daniel Szoke <szokeasaurusrex@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

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

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

}
if (segs[0] === 'platform-includes') {
return segs.at(-1)!.split('.')[0];
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-SDK files misclassified as SDK names cause false positives

Low Severity

The sdkForPath function doesn't filter out non-SDK files, causing them to be counted as separate "SDKs." For platform-includes, files like _default.mdx (which exists in platform-includes/capture-error/) return _default as the SDK name. For docs/platforms, the file index.mdx returns index.mdx as the SDK name. If any of these non-SDK files accumulate >5 changed lines alongside a real SDK, the check produces a false-positive violation, which could erode trust in the advisory CI job.

Additional Locations (1)
Fix in Cursor Fix in Web

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

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.

2 participants