Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .agents/skills/verify-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Android emulator and iOS simulator. Real devices and CI are out of scope for now
- **Review questions** (optional): concerns from a code review, e.g. "does a non-fatal still go through the old path?". Each becomes an unchanged-behavior check (step 1.6), never a conclusion.
- **Mode:**
- **Full** (default): every step below.
- **Gate only**: the claim (step 1.1), the gate, then the rest of step 1 only if the gate passes. Nothing is built, checked out, or changed in the tree. Returns the gate report from the template: *Not verifiable this way* with the reason, or *Verifiable* with the platforms, scenario and evidence a full run would use. Takes a few minutes; meant for a review or a cheap per-PR check.
- **Gate only**: the claim (step 1.1), the gate, then the rest of step 1 only if the gate passes. Answer the gate questions in order; the first "no" decides the answer. Nothing is built, checked out, or changed in the tree. Returns the gate report from the template: *Not verifiable this way* with the reason, or *Verifiable* with the platforms, scenario and evidence a full run would use. Takes a few minutes; meant for a review or a cheap per-PR check.
- Note the start time when you begin; the report's timing counts from it.
- Running as a subagent: return the report text as your answer; the caller saves it.

Expand Down Expand Up @@ -50,7 +50,7 @@ Write down, before touching anything:
- iOS: the `sentryDisableNativeStart: true` launch argument switches to JS init (the iOS e2e tests use it).
- Android: building with `SENTRY_DISABLE_NATIVE_START=true` did **not** work in a release build (JS still saw it as off); don't rely on it.
- **Check the sample's defaults don't hide the symptom.** Its default tracing syncs the JS trace to native on the first navigation span, which hid a trace-sync bug until tracing was turned off for the run. `App.tsx` sets `ignoreErrors: ['should', /(.)*2(.)*/]`: an error whose message contains "should" or the digit 2 is dropped, so never put a run id or a date in a scenario's error message (events captured natively don't go through it). `profilesSampleRate: 1.0` keeps the Hermes sampler busy during profiled transactions, which can starve a feature that shares it (e.g. JS hang stacks). `maskAllText: true` stops touch labels and text from being read. Turn off what's in the way for the run and list it under sample changes.
- **Build-configuration claims** (a module excluded, a Gradle property, a Pod subspec): make the change in the sample's build files, then confirm it took effect in the built app before running, e.g. Android: `unzip -o app.apk 'classes*.dex' -d <out-dir>/dex && $ANDROID_HOME/build-tools/<version>/dexdump <out-dir>/dex/classes*.dex | grep -c '<class path>'`.
- **Build-configuration claims** (a module excluded, a Gradle property, a Pod subspec) whose effect shows up at runtime, in Sentry events or on device. E.g. #7035: excluding `sentry-android-replay` changes the native SDK's init, which shows in `sdk.name` and in logcat. Make the change in the sample's build files, then confirm it took effect in the built app before running, e.g. Android: `unzip -o app.apk 'classes*.dex' -d <out-dir>/dex && $ANDROID_HOME/build-tools/<version>/dexdump <out-dir>/dex/classes*.dex | grep -c '<class path>'`. That check only confirms the build change; the evidence still comes from the run. When the build change's only effect is what's shipped, the gate stops it (runtime behavior).
4. **Evidence** — what you'll read in Sentry (or on device) to tell the two runs apart, and what each run should show. See [references/evidence.md](references/evidence.md).
5. **Build type** — release when the scenario needs a native crash (Android: `Sentry.nativeCrash()` only crashes in release; iOS: a debugger catches the crash first, so never run the scenario from Xcode) or when the PR is about release behavior; otherwise debug is fine.
- Android: the sample's `release` build type sets `debuggable true` (`android/app/build.gradle`), so the SDK skips the synchronous hard-crash write (#6937) and queues a JS fatal instead. The event is then delivered only when the process outlives the crash (crash dialog shown), never when the OS kills it at once (#7113). When the evidence is a JS fatal event (capture or delivery), build with `debuggable false`. `run-as` doesn't work on that build, so read the cache from in-app logs.
Expand All @@ -62,14 +62,14 @@ If you can't state the evidence that would separate the two runs, stop and ask;

### Gate: can this be verified on a device?

Answer these before building. Any "no" ends the run with **Not verifiable this way** for that platform; write the gate report (see the template) with the reason and what would verify it instead, and build nothing. In **gate-only** mode, stop after the gate either way and write the gate report.
Answer these before building, in order. The first "no" ends the run with **Not verifiable this way** for that platform; write the gate report (see the template) with the reason and what would verify it instead, and build nothing. Write the questions after that "no" as "not reached", and Without side and Also check as "not needed". Don't answer them anyway. In **gate-only** mode, stop after the gate either way and write the gate report.

- **Is the claim about runtime behavior?** Build fixes, dependency bumps, Metro/bundler config, type-only changes, and performance claims don't produce a difference in Sentry events. A run can only show nothing broke; say so instead of running.
- **Is the claim about runtime behavior?** Build fixes, dependency bumps, Metro/bundler config, type-only changes, and performance claims don't produce a difference in Sentry events. A run can only show nothing broke; say so instead of running. A change whose only effect is what's shipped (bundle contents, APK or app classes, size) is **Not verifiable this way**: the gate report names a bundle or APK content check as what would verify it, with the command. Android: `unzip -p app.apk assets/index.android.bundle | LC_ALL=C grep -a -c '<string>'`, and `dexdump` for classes (step 1.3). iOS: `LC_ALL=C grep -a -c '<string>' sentryreactnativesample.app/main.jsbundle`.
- **Can the trigger happen on a simulator/emulator?** For example, MetricKit reports, real-device hardware, OS-scheduled background work, and store-only behavior can't.
- **Do the bundled native SDKs and the sample's React Native have what the PR relies on?** Check the pinned versions on the checkout you'll build (for an open PR, its head) (`packages/core/RNSentry.podspec` `sentry_cocoa_version`, `packages/core/android/build.gradle` `sentryAndroidVersion`) against the release where the **path the PR uses** landed, which can be later than the API itself (e.g. an options-dictionary key). Find it with `gh release view <version> --repo getsentry/sentry-cocoa` (or `sentry-java`) and grep the notes for the native PR. Check the sample's `react-native` version (and Hermes) the same way when the PR depends on a React Native or Hermes behavior. A PR waiting on a native bump can't be built on that platform yet. For an open PR in gate-only mode, read the head's files without checking it out: `git fetch origin pull/<N>/head`, then `git show <headRefOid>:<path>` (`FETCH_HEAD` is overwritten by the next fetch).
- **Is there enough disk?** `df -h /System/Volumes/Data` — stop under ~15 GB free. Clean iOS and Android sample builds together take ~13 GB. Skip this one in gate-only mode: it's about this machine, not the PR.

Not a gate question, but part of the plan (in gate-only mode too): **how the "without" side will be built.**
Not a gate question, but part of the plan in either mode, only when the gate passes: **how the "without" side will be built.**

- Open PR: the head with its own diff reversed. That always applies. Note instead what a full run would have to add or watch: whether the head has the run tagging (`samples/react-native/src/verifyRun.ts`) and this skill's `flows/steps/`, how far its base is behind `main`, and whether `main` has since changed the PR's files or the pinned native versions.
- Merged PR: save the merge commit's SDK patch (step 2) and run `git apply -R --check` on the current checkout. It's read-only. If it fails, plan the slower parent-commit fallback. Either way the run goes ahead.
Expand Down
12 changes: 6 additions & 6 deletions .agents/skills/verify-pr/references/report-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,22 @@ For a run the gate stopped, and for every **gate-only** run. Nothing was built.
**Platform:** <platforms the claim affects; others not applicable and why>
**Not covered:** <what even a full run wouldn't show>
**Prior evidence:** <events or recordings linked in the PR or issue, and runs it only describes (say "unlinked"), with what they show (one side only, untagged…) — or "none">
**Without side:** <open PR: the head with its diff reversed, plus what it lacks (run tagging, flows) | merged PR: the reverse patch applies / needs the parent commit>
**Also check:** <the step 1.6 paths and review questions, or "none planned">
**Without side:** <open PR: the head with its diff reversed, plus what it lacks (run tagging, flows) | merged PR: the reverse patch applies / needs the parent commit | not needed (Not verifiable this way)>
**Also check:** <the step 1.6 paths and review questions, or "none planned" | not needed (Not verifiable this way)>

## Gate

| Question | Answer |
|---|---|
| Runtime behavior? | <yes / no: why> |
| Trigger possible on a simulator/emulator? | <yes / no: why> |
| Native APIs in the pinned SDKs? | <yes / no: the pinned version and where the path the PR uses landed> |
| Enough disk? | <yes / no / not checked (gate-only)> |
| Trigger possible on a simulator/emulator? | <yes / no: why / not reached> |
| Native SDKs and React Native have what it needs? | <yes / no: the pinned versions and where the path the PR uses landed / not reached> |
| Enough disk? | <yes / no / not checked (gate-only) / not reached> |

## <If verifiable: Planned run | If not: What would verify it>

<Verifiable: the scenario, the evidence and expectation for each side, the step 1.6 paths, build type, estimated time.
Not verifiable: a unit test, a real device, a native SDK release, a manual check — or "nothing beyond CI".>
Not verifiable: a unit test, a real device, a native SDK release, a bundle or APK content check (with the command), a manual check — or "nothing beyond CI".>

## Timing

Expand Down
Loading