Skip to content

Commit 32100a7

Browse files
runningcodeclaude
andcommitted
docs: Ask for @HybridSdkApi on new API for hybrid SDKs
Point agents and reviewers at the marker in the api rule, AGENTS.md, REVIEWS.md, and the PR template, so new hybrid-facing API gets it and changes to marked API are coordinated with the hybrid SDK teams. Refs JAVA-719 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 7238bb1 commit 32100a7

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎.cursor/rules/api.mdc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Public API is tracked via `.api` files generated by the [ABI validation](https:/
1212
- `./gradlew check` validates current code against `.api` files and fails on unintended changes.
1313
- `@ApiStatus.Internal` marks classes/methods as internal — they still appear in `.api` files but are not part of the public contract.
1414
- `@ApiStatus.Experimental` marks API that may change in future versions.
15+
- `@HybridSdkApi` marks non-customer API that a hybrid SDK (React Native, Flutter, .NET, Unity, Unreal, Godot, KMP, Capacitor) uses. Add it to new API that a hybrid SDK calls, and to an element a hybrid SDK calls when you mark it `@ApiStatus.Internal`. Customer-facing API doesn't need it.
16+
- Before changing, moving, or removing an element marked `@HybridSdkApi`, find the hybrid SDKs that use it and coordinate with their teams. They often call it through bindings, JNI, or reflection by name, so no compiler catches the break.
1517

1618
## Key Public API Classes
1719

‎.github/pull_request_template.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Include a link to Sentry when applicable:
2828
- [ ] I updated the wizard if needed.
2929
- [ ] Review from the native team if needed.
3030
- [ ] No breaking change or entry added to the changelog.
31-
- [ ] No breaking change for hybrid SDKs or communicated to hybrid SDKs.
31+
- [ ] No breaking change for hybrid SDKs or communicated to hybrid SDKs. New API for hybrid SDKs is marked `@HybridSdkApi`.
3232
- [ ] Public API changes reviewed by another Mobile SDK team member or implemented according to the [develop docs](https://develop.sentry.dev/) spec.
3333

3434

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rule file in `.cursor/rules/`:
99

1010
| Rule | Read it when working on |
1111
|---|---|
12-
| `api` | Public API surface, binary compatibility, `.api` files, `updateKotlinAbi`, `IScope`/`IScopes`/`Sentry` static API, protocol classes |
12+
| `api` | Public API surface, binary compatibility, `.api` files, `updateKotlinAbi`, `@HybridSdkApi`, API for hybrid SDKs, `IScope`/`IScopes`/`Sentry` static API, protocol classes |
1313
| `options` | `SentryOptions`, namespaced options, `ExternalOptions`, `sentry.properties`, `ManifestMetadataReader`, Spring Boot properties |
1414
| `scopes` | Scope management, forking, lifecycle, `ScopeType`, thread-local storage, scope bleeding, Hub → Scopes migration |
1515
| `deduplication` | Duplicate event detection, `DuplicateEventDetectionEventProcessor`, `enableDeduplication` |

‎REVIEWS.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ rule file in [`.cursor/rules/`](.cursor/rules) for the area the diff touches (`a
5757

5858
- New public API must be intentional: new classes/methods not for public use need
5959
`@ApiStatus.Internal`, new unstable API needs `@ApiStatus.Experimental`.
60+
- Non-customer API added for a hybrid SDK (React Native, Flutter, .NET, Unity, ...) needs
61+
`@HybridSdkApi`. Changing, moving, or removing an element marked `@HybridSdkApi` needs a callout
62+
that the hybrid SDK teams using it were told.
6063
- Removing or changing the signature of public API, or silently changing a default, sampling rate,
6164
or feature toggle, without a deprecation and a `CHANGELOG.md`/`MIGRATION.md` note.
6265
- New features must be **opt-in by default** via `SentryOptions` (or a namespaced options class).

0 commit comments

Comments
 (0)