Skip to content

chore(ai): Add java-sdk-review Warden skill - #6822

Draft
runningcode wants to merge 3 commits into
mainfrom
no/java-sdk-review-skill
Draft

runningcode wants to merge 3 commits into
mainfrom
no/java-sdk-review-skill

Conversation

@runningcode

@runningcode runningcode commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Adds java-sdk-review, a repo Warden skill that reviews PRs against sentry-java's own conventions and contracts. It only covers rules that need reading beyond the changed lines:

  • Concurrency: volatile, lazy init, lock ordering, executor self-submission, main-thread and init-path cost
  • Test coverage of new customer-facing behavior, including regression tests for fixes
  • Public API surface: visibility, @ApiStatus, deprecation before removal, opt-in options
  • Android, ProGuard, and module boundaries
  • Integration lifecycle and instrumentation conventions

It reviews **/src/main/** outside the samples and test-support modules, reports findings at medium and up, and never blocks a merge.

verification.enabled = false moves from [defaults] onto check-code-attribution. Warden supports this per skill now, so the new skill keeps the second verification pass that filters out false positives.

💡 Motivation and Context

The org config runs Warden's code-review on every repo, but that skill only reports generic bugs and knows nothing about the SDK's rules. The rules here come from REVIEWS.md and from six months of human review comments on this repo.

This is the first of several changes. The goal is that a PR is only ready for human review once automated review has passed. Rules a model can answer from one file go to decision-model-linter in a follow-up PR. REVIEWS.md is removed once both are in place.

💚 How did you test it?

Parsed warden.toml and checked it against Warden's config schema.

Backtested on 80 PRs merged in October and November, which were not used to write the rules. Each PR was reviewed as it looked at its first review comment. There was no model key, so agents emulated the skill. They found 18 problems: 9 correct, 9 plausible, no false positives. Concurrency, Public API and Integrations were precise (8 of 11 correct). Test coverage was not (1 of 7), so this PR now only reports a missing test in narrow cases.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

  • Run Warden's local trigger with the real model on a few of these PRs, then mark ready.
  • Add decision-model-linter with the rules that work on one file.

🤖 Generated with Claude Code

#skip-changelog

The org code-review skill only reports generic bugs and does not know
sentry-java's conventions. java-sdk-review covers the SDK rules that need
reading beyond the changed lines: concurrency, test coverage of new
behavior, public API surface, Android and ProGuard, and integration
lifecycle. It reports at medium and up and never blocks a merge.

Verification moves from the defaults onto check-code-attribution, so
the new skill keeps Warden's second verification pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 0769693.

The model rated this change low. It was raised to medium because:

  • R6: build or release configuration changed: .claude/skills/.gitignore, warden.toml
  • R7: the model was not confident enough that the change is low

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

Comment thread warden.toml
# sentry-java conventions and contracts that need reading beyond the changed lines.
# Rules that a model can check from one file belong in decision-model-linter instead.
[[skills]]
name = "java-sdk-review"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

java-sdk-review path filter excludes published sentry-compose sources

PRs changing only sentry-compose/src/androidMain/** do not trigger java-sdk-review, leaving the shipped Compose integration outside the Android and integration review rules.

Evidence
  • warden.toml filters this skill to **/src/main/**; src/androidMain/** does not match, and warden-findings.json records the skill being skipped with reason path_filter when changed paths do not match.
  • sentry-compose/build.gradle.kts configures androidMain as a production source set and applies the multiplatform publishing plugin; its public API is recorded under api/android.
  • SentryNavigationIntegration.kt is shipped under src/androidMain and implements Compose navigation lifecycle integration, which falls within the skill's Android and integration conventions.

Identified by Warden · code-review · E62-9UP

Formatting, unused imports, and banned calls are decided by Spotless,
detekt, Error Prone, and Android Lint. A model reviewing them only adds
noise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 1, 2026
A backtest on October and November PRs found 1 of 7 test coverage findings
worth a comment. Report only behavior shipped with no test at all, fixes
without a regression test, uneven sibling modules, and auto-configuration
conditions the change adds itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@runningcode
runningcode force-pushed the no/java-sdk-review-skill branch from 6f16ce8 to 0769693 Compare December 1, 2026 14:47
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant