Skip to content

refactor(android): log message rejections as warnings - #647

Merged
tiagocandido merged 1 commit into
mainfrom
08-14-refactor_android_message_rejection_warn_logging
Aug 17, 2026
Merged

refactor(android): log message rejections as warnings#647
tiagocandido merged 1 commit into
mainfrom
08-14-refactor_android_message_rejection_warn_logging

Conversation

@tiagocandido

@tiagocandido tiagocandido commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Same as #646, for Android: remove Configuration.onMessageRejected and the public RejectedMessage type while they have only shipped in an alpha. Origin-validation rejections are always logged as warnings with the verified origin and reason; the untrusted message body is not logged.

How to test

From platforms/android:

./gradlew test
./gradlew :lib:apiCheck

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Aug 14, 2026

tiagocandido commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@tiagocandido
tiagocandido marked this pull request as ready for review August 14, 2026 15:05
@tiagocandido
tiagocandido requested a review from a team as a code owner August 14, 2026 15:05
@github-actions

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Android release AAR 281.8 KiB 279.7 KiB -2.1 KiB
Android file breakdown
File Base Head Delta
classes.jar 297.7 KiB 295.5 KiB -2.2 KiB
res/layout/checkout_view_content.xml 2.6 KiB 2.6 KiB 0 B
res/layout/checkout_sheet_content.xml 2.0 KiB 2.0 KiB 0 B
res/values/values.xml 1.3 KiB 1.3 KiB 0 B
R.txt 1.2 KiB 1.2 KiB 0 B
AndroidManifest.xml 922 B 922 B 0 B
proguard.txt 798 B 798 B 0 B
res/drawable/close.xml 431 B 431 B 0 B
res/menu/checkout_menu.xml 354 B 354 B 0 B
META-INF/com/android/build/gradle/aar-metadata.properties 157 B 157 B 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@bitrise

bitrise Bot commented Aug 14, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
Kotlin Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
kotlin-android kotlin android latest Google Pixel 9
Android 17.0

tiagocandido commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Aug 17, 8:14 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 17, 8:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Aug 17, 8:21 AM UTC: @tiagocandido merged this pull request with Graphite.

@tiagocandido
tiagocandido changed the base branch from 08-14-refactor_swift_message_rejection_warn_logging to graphite-base/647 August 17, 2026 08:15
@tiagocandido
tiagocandido changed the base branch from graphite-base/647 to main August 17, 2026 08:15
Remove Configuration.onMessageRejected and the public RejectedMessage
type before they ship in a release. Origin-validation rejections are now
always logged at warn level with the verified origin and reason; the
untrusted message body is never logged.
@tiagocandido
tiagocandido force-pushed the 08-14-refactor_android_message_rejection_warn_logging branch from 3f2c7cc to 417767b Compare August 17, 2026 08:15
@tiagocandido
tiagocandido merged commit 56f482a into main Aug 17, 2026
33 checks passed
@tiagocandido
tiagocandido deleted the 08-14-refactor_android_message_rejection_warn_logging branch August 17, 2026 08:21
@tiagocandido tiagocandido mentioned this pull request Aug 17, 2026
5 tasks
tiagocandido added a commit that referenced this pull request Aug 17, 2026
### What changes are you making?

Release the Android package as `4.0.0-alpha.5`.

This updates the Maven artifact version and public installation examples. The release includes the Android changes merged since `4.0.0-alpha.4`, including the removal of the `onMessageRejected` configuration callback in favor of warn-level rejection logging (#647).

### How to test

```sh
.github/scripts/validate-release-version Android 4.0.0-alpha.5
platforms/android/gradlew -p platforms/android clean test --console=plain
platforms/android/gradlew -p platforms/android :lib:apiCheck
protocol/languages/kotlin/gradlew -p protocol/languages/kotlin :embedded-checkout-protocol:apiCheck
platforms/android/samples/CheckoutKitAndroidDemo/gradlew -p platforms/android/samples/CheckoutKitAndroidDemo :app:testDebugUnitTest --console=plain
```

---

### Before you merge

- [x] Existing tests cover the release contents
- [x] I have read and agree with the [Contribution Guidelines](./CONTRIBUTING.md)
- [x] I have read and agree with the [Code of Conduct](./CODE_OF_CONDUCT.md)
- [x] I've updated `platforms/android/README.md`
- [x] I have bumped `checkoutKitAndroid` in `platforms/android/gradle/libs.versions.toml`
tiagocandido added a commit that referenced this pull request Aug 17, 2026
### What changes are you making?

Expose `allowedMessageOrigins` through the React Native configuration and round-trip it across both native bridges. Rejections are logged as warnings by the native SDKs (#646, #647); there is no JavaScript callback.

Bumps the native SDK pins to `4.0.0-alpha.5` — the first release with warn-level rejection logging and without `onMessageRejected` — and regenerates both Podfile.locks against the published pods.

Replaces #477.

### How to test

From `platforms/react-native`:

```sh
pnpm test modules/@shopify/checkout-kit-react-native/tests/index.test.ts --runInBand
pnpm module typecheck
pnpm module api:dump
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants