Skip to content

ci(risk): Grade PRs with sentry-java risk guidance and core-first diffs - #6644

Closed
sentry-junior[bot] wants to merge 1 commit into
mainfrom
ci/pr-risk-repo-guidance
Closed

sentry-junior[bot] wants to merge 1 commit into
mainfrom
ci/pr-risk-repo-guidance

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

The PR Risk (Jev) workflow grades every PR with a generic rubric. It knows nothing about what .cursor/BUGBOT.md says is dangerous here. For example, #6588 changes how ANR, tombstone and app-exit timestamps are read, and it was labeled risk: low.

This PR:

  • Adds .github/pr-risk.md, a ~3 KB summary of BUGBOT's critical rules, written as mechanisms to look for: crashing or hanging the host app, locks across re-entrant calls, work on the init path, default-on behavior, public API and InternalSentrySdk breaks, PII without sendDefaultPii, transport and protocol changes, version-matrix bumps, and clock misuse. It also lists what is usually low. The workflow passes it as risk-guidance-path. The action reads it from the base branch, so a PR can't rewrite the rules it's graded by.
  • Sets prioritize-paths and deprioritize-paths. On PRs too large for the context budget, Jev currently sees code in path order. Every sentry-* module sorts before sentry/, so core SDK changes are cut first. Now sentry/ and sentry-android-core/ main sources keep their budget first, and tests, samples, .api dumps and the changelog are cut first.
  • Adds a Bugbot rule to flag PRs that change BUGBOT's risk rules without updating .github/pr-risk.md, so the two don't drift.

Blocked on getsentry/pr-risk-action#9 and getsentry/pr-risk-action#10. Those PRs add the three inputs used here. Before this merges, the getsentry/pr-risk-action@1cdeab5… pin needs to move to a main commit that includes both. Until then the action ignores the inputs with an "unexpected input" warning. Like any pull_request_target workflow, this one runs from main, so it takes effect only after merge. The guidance file is read from the base branch, so it starts applying to the PRs opened after this merges.

#skip-changelog

via no.

--

View Session [Sentry]

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
@sentry

sentry Bot commented Nov 17, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.64.0 (1) release

⚙️ sentry-android Build Distribution Settings

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