Skip to content

test(nav3): [Part 11] Verify mapping after R8 minification - #6708

Open
0xadam-brown wants to merge 1 commit into
feat/nav3-serial-name-mappers-10from
feat/nav3-serial-name-mappers-11
Open

0xadam-brown wants to merge 1 commit into
feat/nav3-serial-name-mappers-10from
feat/nav3-serial-name-mappers-11

Conversation

@0xadam-brown

@0xadam-brown 0xadam-brown commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Nav3 Serial Name Mappers)


📜 Description

Adds critical regression tests for SerialName and SerialNameAndProperties in R8-minified Android apps. Ordinary unit tests don't exercise shrinking, optimization, or obfuscation, so they can't establish whether serializer lookup, destination names, and property encoding still work in a release build.

The suite is run weekly on an emulator, and it has four configurations: R8 full and compatibility modes, each against the minimum supported and pinned latest kotlinx.serialization versions. It checks expected names, arguments, and sensitive-key filtering, and verifies that R8 actually renamed representative classes and fields. (See the next PR in this series for the GitHub workflow that runs these tests weekly.)

The fixture relies on kotlinx.serialization’s consumer rules and targeted app-side rules rather than blanket keep rules. This exercises the configuration host apps need, including named-companion lookup and its expected fallback behavior when the necessary rules are absent.

💡 Motivation and Context

The built-in mappers must honor serialization names and property filtering after an application's code has been minified or else all nav destinations will appear as "/unknown" in the Sentry UI.

addresses: JAVA-787 (link)

⚠️ Callouts

See the "Callouts" section in #6705 for info about our use of AbstractEncoder and why that makes the R8 tests in this PR especially valuable.

💚 How did you test it?

  • Had my clanker manually run the R8 emulator test matrix to verify behavior, including testing against outdated (as far as Nav3 is concerned) kotlinx.serialization versions that were known to be incompatbile with our own use of AbstractEncoder.

📝 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

Continue with PR 12: Keep compatibility coverage current.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

#skip-changelog

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 7d85cf6.

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

  • R6: build or release configuration changed: .github/workflows/integration-tests-nav3-r8.yml, Makefile, scripts/test-nav3-backstack-entry-mapper-r8.sh, scripts/update-nav3-kotlinx-serialization.sh, sentry-android-integration-tests/nav3-backstack-entry-mapper-r8-check/build.gradle.kts and 2 more
  • R7: the model was not confident enough that the change is low

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

@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@sentry

sentry Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-10 branch from 7a34760 to f7b850a Compare November 20, 2026 14:00
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-11 branch from 5ddd798 to 7d85cf6 Compare November 20, 2026 14:00
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@0xadam-brown 0xadam-brown changed the title test(nav3): [Nav3 Mappers 11] Verify mapping after R8 minification test(nav3): [Part 11] Verify mapping after R8 minification Nov 20, 2026
@0xadam-brown
0xadam-brown marked this pull request as ready for review November 20, 2026 16:01
@0xadam-brown
0xadam-brown requested review from a team and adinauer as code owners November 20, 2026 16:01
@0xadam-brown
0xadam-brown requested review from romtsn and runningcode and removed request for a team November 20, 2026 16:01
@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Nov 20, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 20, 2026
@0xadam-brown 0xadam-brown added the sanity-check PR needs a lightweight review for obvious issues label Nov 20, 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 sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant