Skip to content

ref(nav3): [Part 1] Gather nav data keys in one package and simplify ArgumentSanitizer - #6702

Open
0xadam-brown wants to merge 2 commits into
feat/nav3-serial-name-stack-basefrom
feat/nav3-serial-name-mappers-6
Open

0xadam-brown wants to merge 2 commits into
feat/nav3-serial-name-stack-basefrom
feat/nav3-serial-name-mappers-6

Conversation

@0xadam-brown

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

Copy link
Copy Markdown
Member

PR Stack (Nav3 SerialName Mapper)

This stack replaces the SerialName half of #6696. SerialNameAndProperties will follow in its own stack.


📜 Description

Refactoring ahead of the rest of the PR stack. No behavior changes.

Two larger changes:

  1. I've consolidated strings displayed to the user + settings that impact observable behavior in a .contract package. Both are effectively part of our public API, even if the strings are internal.
  2. I simplified the logic ArgumentSanitizer uses to bound argument sizes. (Behavior and rules are unchanged, but code now recurses directly instead of going through visit/enter/exit helpers, and it's a bit more performant b/c it checks a CharSequences length before copying it.)

💡 Motivation and Context

Keeps the diffs in subsequent PRs smaller and easier to read. Item (2) also adds tests that pin down the sanitizer's behavior ahead of the SerialNameAndProperties PR stack (forthcoming), which changes how arguments are sanitized.

addresses: JAVA-787 (link)

💚 How did you test it?

  • Existing unit tests.
  • Manual tests via the Android sample app.

📝 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 Part 2: Record why back stack entries are /unknown.

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

#skip-changelog

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 9647502.

Main concerns: data sent to Sentry, public contract, reach.

Rules that block low also fired:

  • R1: code was truncated, omitted or a reduced context was used: sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/backstack/ArgumentSanitizerTest.kt, sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/backstack/BackStackConverterTest.kt, sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/backstack/BackStackObserverTest.kt, sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/backstack/CoordinatedBackStackObserverTest.kt, sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/contract/NavDataContractTest.kt and 3 more

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d03d53a. Configure here.

@0xadam-brown 0xadam-brown added the sanity-check PR needs a lightweight review for obvious issues label Nov 20, 2026
@0xadam-brown 0xadam-brown changed the title ref(nav3): [Part 4] Share bounded argument conversion ref(nav3): [Part 1] Share bounded argument conversion Nov 24, 2026
@0xadam-brown
0xadam-brown changed the base branch from main to feat/nav3-serial-name-mappers-base November 24, 2026 10:22
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 24, 2026
…gumentSanitizer

The keys and values the Sentry UI shows (context, breadcrumb, and
transaction keys, the /unknown name, and the argument drop reasons and
limits) now live in one internal contract package, which the lifecycle
package may import. A test pins each displayed string.

ArgumentSanitizer recurses directly instead of through visit/exit
helpers, checks a CharSequence's length before copying it, and has its
own test suite.
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-mappers-6 branch from 19c6402 to 328049c Compare November 27, 2026 15:16
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 27, 2026
@0xadam-brown 0xadam-brown changed the title ref(nav3): [Part 1] Share bounded argument conversion ref(nav3): [Part 1] Gather nav data keys in one package and simplify ArgumentSanitizer Nov 27, 2026
@0xadam-brown
0xadam-brown marked this pull request as ready for review November 27, 2026 17:23
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 27, 2026
Explains that the package holds internal values the Sentry UI displays or that define observable
behavior, and that it may not depend on other navigation3 packages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 30, 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