Skip to content

test(nav3): [Part 5] Verify the SerialNameAndProperties mapper 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 SerialNameAndProperties Mapper)

This stack follows the SerialName stack (#6780) and is based on its last PR, #6783.


📜 Description

Extends the R8 check app from #6783 to cover SerialNameAndProperties. Ordinary unit tests don't exercise shrinking, optimization, or obfuscation, so they can't establish whether property encoding and sensitive-key filtering still work in a release build.

  • The check now launches each APK once per built-in mapper, chosen with an intent extra, as only one SentryNavEffect records an Activity's back stack. The script fails if a launch ran a different mapper than the one it requested.
  • With SerialNameAndProperties, it also checks the arguments SentryNavEffect records for each key, including a key that uses every encoding rule and sensitive-data filtering, and that R8 renamed that key's fields.
  • It fails if the properties encoder's compatibility check reports an incompatible kotlinx.serialization version.

The workflow that #6783 added runs the check; it needed no changes beyond its comments.

💡 Motivation and Context

The built-in mappers must still work after an app's code has been minified. #6783 checks that entries keep their names. This PR checks that SerialNameAndProperties still records the right arguments and still filters sensitive keys; if it didn't, arguments would be dropped with encoding_failed, or worse, sensitive values could be recorded.

addresses: JAVA-787 (link)

⚠️ Callouts

See callout 2 and the "Implementation Deep Dive" in #6705 for our use of the experimental AbstractEncoder API, which is why checking SerialNameAndProperties in minified builds matters.

💚 How did you test it?

  • The Nav3 R8 Check workflow passed on this PR: three R8-minified APKs (full mode against the 1.7.3 floor and latest stable kotlinx.serialization, compat mode against the floor), each launched once per mapper on an API 23 emulator.
  • The module's unit tests passed against latest stable in the same workflow.

📝 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

This is the last PR in the stack.

⚠️ 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 95adbb9.

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, scripts/test-nav3-built-in-back-stack-mappers-r8.sh, sentry-android-integration-tests/nav3-built-in-back-stack-mappers-r8-check/build.gradle.kts
  • 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.1 (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 added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 23, 2026
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-10 branch from 091733a to 901b1f1 Compare November 24, 2026 10:21
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-11 branch from 24ef3e6 to 51fc800 Compare November 24, 2026 10:21
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 24, 2026
@0xadam-brown 0xadam-brown changed the title test(nav3): [Part 9] Verify mapping after R8 minification test(nav3): [Part 7] Verify mapping after R8 minification Nov 24, 2026
@0xadam-brown
0xadam-brown marked this pull request as draft November 25, 2026 15:37
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 25, 2026
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-11 branch from 51fc800 to aa0479e Compare December 1, 2026 01:31
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-10 branch from 901b1f1 to 48f7f66 Compare December 1, 2026 01:31
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 1, 2026
@0xadam-brown 0xadam-brown changed the title test(nav3): [Part 7] Verify mapping after R8 minification test(nav3): [Part 5] Verify the SerialNameAndProperties mapper after R8 minification Dec 1, 2026
@0xadam-brown
0xadam-brown marked this pull request as ready for review December 1, 2026 01:50
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 1, 2026
The R8 check now launches each APK once per built-in mapper, chosen with
an intent extra, as only one SentryNavEffect records an Activity's back
stack. With SerialNameAndProperties, it also checks the arguments
SentryNavEffect records for each key, including a key that uses every
encoding rule and sensitive-data filtering, and that R8 renamed that key's
fields. It fails if the properties encoder's compatibility check reports
an incompatible kotlinx.serialization version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-10 branch from 48f7f66 to 95b051d Compare December 1, 2026 10:01
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-11 branch from aa0479e to 95adbb9 Compare December 1, 2026 10:01
@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 sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants