Add checkout diagnostics for Kotlin - #643
Open
markmur wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Package Size
Android file breakdown
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. |
Install this buildOpen Tophat, select your target device, then click Install. Links open on the Mac running Tophat.
Checkout Kit E2E results
|
markmur
force-pushed
the
swift-checkout-diagnostics
branch
from
August 14, 2026 09:55
0733f3e to
b19daf0
Compare
markmur
force-pushed
the
kotlin-checkout-diagnostics
branch
from
August 14, 2026 09:55
8f622b8 to
56e6b20
Compare
markmur
force-pushed
the
kotlin-checkout-diagnostics
branch
from
August 14, 2026 10:27
56e6b20 to
a74d9f2
Compare
markmur
force-pushed
the
swift-checkout-diagnostics
branch
from
August 14, 2026 10:27
b19daf0 to
2f487d4
Compare
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changes are you making?
Add Kotlin parity for the checkout diagnostics and ingress-policy API introduced in the parent Swift PR.
ShopifyCheckoutKit.diagnostics.subscribe { ... }without introducing a coroutines dependency.CheckoutDiagnosticEvent.MessageRejectedandCheckoutMessageRejection.ReasonAPIs.CopyOnWriteArraySetfor listener snapshots andAtomicBooleanfor idempotent cancellation.CheckoutMessageIngressPolicybefore protocol dispatch.Configuration.onMessageRejectedand omit the untrusted raw message body.AutoCloseable.How message admission works
CheckoutMessageIngressPolicyis the trust boundary between the Android WebView transport and checkout protocol handling. AndroidX WebKit provides the authenticated source origin and frame metadata alongside the untrusted message body. The bridge packages those values into anIncomingCheckoutMessageand asks the policy for anAcceptedorRejected(...)decision before scheduling protocol parsing or dispatch.The policy applies the transport-level rules in one place:
allowedMessageOriginsand the loaded checkout origin.An accepted message continues into the protocol executor and client dispatch. A rejected message never reaches the protocol client; the bridge emits
CheckoutDiagnosticEvent.MessageRejectedwith the authenticated origin and typed rejection reason, then stops processing it. This lets the protocol client assume it only handles admitted checkout messages without making it responsible for Android WebView-specific trust decisions.Consumer API
No coroutine scope or Flow dependency is required:
Subscriptions are hot and do not replay. Subscribe before calling
preloadif the application needs diagnostics emitted by a background checkout WebView. Listeners are delivered on the Android main thread.The raw rejected message body is intentionally unavailable because it is untrusted and may contain sensitive or arbitrarily large data.
Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)