Skip to content

Verify one recent fix on Android with an agent, end to end against real Sentry #7098

Done

Description

@antonis

Goal

Find out whether an agent can verify a fix the way a maintainer does, using only what exists today, and learn what the verify-pr skill has to contain.

What to do

Have an agent verify #7087 (empty native scope tags, merge commit a9886436e) locally on an Android emulator:

  1. Start the sample app with the SDK at the parent commit.
  2. Change the sample app if no existing screen triggers the bug. The scenario: use a TurboModule so the turbo_module.* tags are set and cleared, trigger a native crash, relaunch.
  3. Tag the run (PR, commit, run id) so its event can be found in the shared project.
  4. Look the event up in the sentry-sdks org through the API or MCP and confirm the bug: empty turbo_module.* tags or the processing error they cause.
  5. Switch the SDK to a9886436e, run the same scenario, and confirm the event is clean.
  6. Write a draft report: the check made, both event links, screenshots, and the sample app diff.

If #7087 does not reproduce on Android, use #6967 (enableLogs option mapping) instead.

What to record

  • Every step where a human had to step in, and why.
  • Time per step: builds, waiting for the event, total.
  • How the agent queried Sentry and what access it needed.
  • Anything flaky: emulator, app launch, event not arriving.

Done when

  • There is a report for one fix showing the bug on the base commit and not on the fix, with event links.
  • The list of manual steps and problems is written down. It is the input for the verify-pr skill and for milestone 2.

Not in this issue

The skill itself, iOS, CI, and anything using the mock server.

Activity

  1. self-assigned this
    on Nov 24, 2026
  2. linear-code commented on Nov 24, 2026

    @linear-code
  3. antonis commented on Nov 24, 2026

    @antonis
    ContributorAuthor

    Verification report: #7087 on Android (RN-884 / #7098) — DRAFT

    Fix: #7087 fix(core): Remove native scope tags set to an empty value (merge a9886436e)
    Result: Bug reproduced without the fix, absent with the fix. ✅
    Platform: Android 11 emulator (ci_api30_atd, arm64), RN sample, New Architecture, release build.

    Check made

    Scenario (no sample screen changes needed; the existing UI covers it):

    1. Launch app → Errors tab → TurboModule Playground → Run TurboModule calls.
      turboModuleTracker sets turbo_module.name / turbo_module.method, then clears them with "" after the calls.
    2. Back → Native Crash (Sentry.nativeCrash(); RNSentry is not wrapped, so it does not re-set the tags).
    3. Relaunch → the Java SDK sends the crash event, built from the native scope.

    Expectation: without the fix the native scope holds "" for both tags and they reach the event; with the fix they are removed.

    Base (fix reverted) Fix (a9886436e)
    run id rn884-base-1 rn884-fix-1
    Native scope after calls (logcat, persisted scope) "turbo_module.name": "", "turbo_module.method": "" no empty values
    Event a34407f3 145a600f
    turbo_module.* tags on event present, value null (empty dropped at ingestion) absent

    Discover query: verify.run_id:rn884-base-1 / verify.run_id:rn884-fix-1 in sentry-sdks.

    What "base" means here

    The issue asked for the SDK at the parent commit. Instead, base = main (ef29eac1a) with only the #7087 hunk in
    RNSentryModuleImpl.java reverse-applied (git show a9886436e -- <file> | git apply -R). That file on main is identical
    to a9886436e, and the fix touches no JS, so the code under test matches; the rest of the SDK is newer than the parent.
    This avoided a full checkout + yarn install + rebuild per side.

    Sample app diff (run tagging only)

    +// samples/react-native/src/verifyRun.ts
    +export const VERIFY_RUN = { pr: '7087', commit: 'a9886436e', runId: 'rn884-fix-1' };
    +export function tagVerifyRun(): void {
    +  Sentry.setTag('verify.pr', VERIFY_RUN.pr);
    +  Sentry.setTag('verify.commit', VERIFY_RUN.commit);
    +  Sentry.setTag('verify.run_id', VERIFY_RUN.runId);
    +}
    // App.tsx: call tagVerifyRun() right after Sentry.init(...)

    Tags set from JS sync to the native scope, so native crash events carry them too.

    Screenshots

    None. The ci_api30_atd image returns all-black screencap output (headless ATD rendering). The UI was driven and
    checked through uiautomator dump instead. A non-ATD AVD (e.g. Pixel_8) is needed for screenshots.

    Timing

    Step Time
    Read issue + PR, find scenario in sample ~2 min
    Base release build (clean, assembleRelease) 5m20s
    Install + scenario + relaunch ~2 min (incl. one retry, see below)
    Base event visible in Sentry < 1 min after relaunch
    Fix release build (incremental, Java-only change) 36s
    Install + scenario + relaunch ~1 min
    Fix event visible in Sentry < 1 min after relaunch
    Total ~12 min (13:38 → 13:50)

    Human intervention

    None required to reach the result. (The user only asked for a status update mid-run.)

    Problems / flakiness (input for verify-pr skill)

    1. Screenshots black on ATD emulator. Skill should prefer a full AVD, or fall back to uiautomator dump text as evidence.
    2. adb shell monkey -p <pkg> -c LAUNCHER 1 did not start the app (exit -5). am start -n <pkg>/.MainActivity works; resolve with cmd package resolve-activity --brief <pkg>.
    3. Tap-by-text needs scrolling both ways. The helper scrolled down only and missed "Native Crash" at the top of a scrolled list (TurboModule screen push/pop kept the list offset). Fix: scroll to top first, then search downwards.
    4. Button text is upper-cased in the Android UI tree (NATIVE CRASH); match case-insensitively.
    5. sentry-cli can't read events: no api subcommand, and the local token is org:ci only. All Sentry reads went through the Sentry MCP.
    6. MCP lookup by bare event ID failed (get_sentry_resource with resourceType: event: "No issue found for Event ID"). Passing the issue-event URL works. Flow that works: search_errors with verify.run_id:<id> → get issue short ID → get_sentry_resource with /issues/<short>/events/<id>/.
    7. Discover tags[x] column can't distinguish "missing" from "empty" (both show ""). The event detail is needed: empty-at-SDK shows up as tag present with null value.
    8. Processing-error list (event.errors) not visible through the MCP. I couldn't confirm the "Discarded invalid value" processing error by API; the null tag value is the indirect evidence. A token with event:read (or MCP support for errors) would close this gap.
    9. -PreactNativeArchitectures=arm64-v8a passed via yarn build-android-release still built armeabi-v7a CMake tasks. Clean build cost could likely be cut by limiting ABIs properly.
    10. Sentry.nativeCrash() only crashes in release builds, so each side needs a release build (no Metro hot swap for tag changes).

    Access needed

    • Local: Android SDK + running emulator, JDK 17 (JAVA_HOME override; default is 11), SENTRY_DISABLE_AUTO_UPLOAD=true for release builds.
    • Sentry: MCP authenticated with read access to sentry-sdks (search errors + get event). No write access needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions