Skip to content

fix(leanplum): derive the start-up user id from the kit's filtered user - #918

Merged
thomson-t merged 1 commit into
mainfrom
fix/leanplum-filtered-user-id
Oct 14, 2026
Merged

thomson-t merged 1 commit into
mainfrom
fix/leanplum-filtered-user-id

Conversation

@thomson-t

Copy link
Copy Markdown
Contributor

Why

When the Leanplum integration starts up, it picks a user ID from the user's identities. It read them without the app's data plan, so an identity the plan blocks for integrations could still become the user ID Leanplum sees. Once this lands, start-up uses the same filtered identities as every other update.

Programme

Standalone change, no programme.

What changes

Before: LeanplumKit.generateLeanplumId read MParticle.getInstance()?.Identity()?.currentUser. After: it reads the kit's own filtered currentUser. The kit's own identity filter already applied, so only the data plan's identity block is new here. No documentation or changelog change is needed.

Linked work

None.

Rollout

Path: merging changes main only. The fix ships in the next release of the Leanplum kit, and apps get it when they upgrade. It is live as soon as an app runs that release, with no switch and no ordering constraint.

Feature flags: none.

Turning it off: revert this pull request and publish a new release. A published version cannot be recalled, so apps on the release that carries it keep the change until they upgrade again.

What we watch: no dashboard covers this path. We watch the issues reported on this repository after the release that carries it, and the build-kits and Kit Compatibility Test jobs on this pull request.

Risks

  • Leanplum starts without a user ID it used to get; only an identity the data plan blocks is affected; Leanplum would see the user without that ID until a permitted identity is set

Risk class: low.

Who

Written by: an automated coding agent (Claude Code), working for a maintainer who asked for this fix.

Code reviewed before opening: an independent review agent, 13 October 2026; it found nothing to change and asked for the commit message to say only the data plan block was missing, which it does.

Design reviewed before opening: no one.

Decision this implements: a maintainer's request on 13 October 2026; there is no public record.

Checked: the leanplum-7 testRelease and ktlintCheck against the core SDK published to Maven local, on 13 October 2026.

Not checked: a new unit test, because the start-up path calls static Leanplum methods.

Size

Hand-written: 2 lines in 1 file.

Generated: none.

🤖 Generated with Claude Code

The Leanplum kit built its user id from the raw current user, so an
identity the data plan blocks for kits could still become the user id
passed to Leanplum.start. It now reads the kit's filtered current user,
the same one every other identity callback receives.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Kotlin migration progress

No change to the Java left to convert.

Module Kotlin LOC Java LOC Java staying (facade) Java left to convert Kotlin share
android-core 3,249 22,529 9,650 12,879 12.6%
android-kit-base 557 5,385 1,651 3,734 9.4%
Total 3,806 27,914 11,301 16,613 12.0%

Conversion progress: 0.0% (16,613 of 16,550 baseline Java LOC left to convert). 132 Java files and 36 Kotlin files in scope.

@github-actions

Copy link
Copy Markdown

Binary compatibility

  • ✅ android-core is compatible with 6.1.8 (115 classes compared, 0 with additions only).
  • ✅ android-kit-base is compatible with 6.1.8 (44 classes compared, 0 with additions only).

Compares the release AAR against the same artifact at the last version published to Maven Central; R8-renamed classes and members are excluded (see the script docstring). Full japicmp HTML/XML reports are attached as the api-compat-reports workflow artifact. This check is not in the required-check set yet, so a red result here does not block merging.

@github-actions

Copy link
Copy Markdown

📦 SDK Size Impact Report

What the SDK adds to a minified release APK.

mParticle Core SDK

Measured against an empty baseline app. Unlike the Rokt kit, android-core ships no Compose and no resources, so there is nothing here that a host app would already provide.

Metric Target branch This PR Change
APK size 119.79 KB 119.79 KB -1 bytes
Download size 117.61 KB 117.61 KB -1 bytes
Dex bytes 213.76 KB 213.76 KB 0 bytes

mParticle Core + Rokt kit

Measured against a Compose + Material3 reference app, so these are the costs on top of an app that already ships Compose. The reference app's dependencies are a documented convention, not a measured average: see size-report-rokt/README.md.

Metric Target branch This PR Change
APK size 1.26 MB 1.26 MB 0 bytes
Download size 1.24 MB 1.24 MB -2 bytes
Dex bytes 2.22 MB 2.22 MB 0 bytes

Rokt SDK+ umbrella (adds the payment extension)

Metric Target branch This PR Change On top of mParticle Core + Rokt kit
APK size 6.53 MB 6.53 MB 0 bytes +5.27 MB
Download size 6.43 MB 6.43 MB -2 bytes +5.19 MB
Dex bytes 7.11 MB 7.11 MB 0 bytes +4.88 MB

➡️ SDK size impact change is minimal.

Raw measurements

core, Target branch:

{"baseline_dex_bytes": 0, "baseline_download_bytes": 2509, "baseline_install_bytes": 7525, "core_dex_bytes": 218892, "core_download_bytes": 122941, "core_install_bytes": 130193}

core, This PR:

{"baseline_dex_bytes": 0, "baseline_download_bytes": 2513, "baseline_install_bytes": 7529, "core_dex_bytes": 218892, "core_download_bytes": 122944, "core_install_bytes": 130196}

rokt, Target branch:

{"baseline_dex_bytes": 1829108, "baseline_download_bytes": 1240062, "baseline_install_bytes": 1300934, "kit_dex_bytes": 4162180, "kit_download_bytes": 2542337, "kit_install_bytes": 2623275, "sdkplus_dex_bytes": 9282848, "sdkplus_download_bytes": 7980435, "sdkplus_install_bytes": 8148975}

rokt, This PR:

{"baseline_dex_bytes": 1829108, "baseline_download_bytes": 1240062, "baseline_install_bytes": 1300934, "kit_dex_bytes": 4162180, "kit_download_bytes": 2542335, "kit_install_bytes": 2623275, "sdkplus_dex_bytes": 9282848, "sdkplus_download_bytes": 7980433, "sdkplus_install_bytes": 8148975}

Measured a2afa3c merged into 2b8e6d2

@thomson-t
thomson-t marked this pull request as ready for review October 13, 2026 18:50
@thomson-t
thomson-t requested a review from a team as a code owner October 13, 2026 18:50
@thomson-t
thomson-t merged commit 7fe9c7f into main Oct 14, 2026
90 of 91 checks passed
@thomson-t
thomson-t deleted the fix/leanplum-filtered-user-id branch October 14, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants