Centralize Kotlin checkout message ingress validation - #645
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
markmur
force-pushed
the
kotlin-message-rejection-lifecycle
branch
2 times, most recently
from
August 14, 2026 11:39
0db7a62 to
41881d6
Compare
markmur
force-pushed
the
swift-message-rejection-lifecycle
branch
from
August 14, 2026 11:44
63d2a15 to
ac84d8f
Compare
markmur
force-pushed
the
kotlin-message-rejection-lifecycle
branch
from
August 14, 2026 11:44
41881d6 to
94962ec
Compare
markmur
marked this pull request as ready for review
August 14, 2026 11:47
This was referenced Aug 14, 2026
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
kotlin-message-rejection-lifecycle
branch
from
August 18, 2026 13:02
94962ec to
ef34984
Compare
markmur
force-pushed
the
swift-message-rejection-lifecycle
branch
2 times, most recently
from
August 18, 2026 13:25
ee4b8b8 to
56fd72d
Compare
markmur
force-pushed
the
kotlin-message-rejection-lifecycle
branch
from
August 18, 2026 13:25
ef34984 to
496fb50
Compare
tiagocandido
approved these changes
Aug 19, 2026
markmur
force-pushed
the
kotlin-message-rejection-lifecycle
branch
from
August 19, 2026 12:58
496fb50 to
a2c216a
Compare
markmur
force-pushed
the
swift-message-rejection-lifecycle
branch
from
August 19, 2026 12:58
56fd72d to
1dcc9bd
Compare
markmur
force-pushed
the
kotlin-message-rejection-lifecycle
branch
from
August 19, 2026 13:00
a2c216a to
681292c
Compare
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?
This PR extends the centralized message admission introduced in #644 to Kotlin without adding a coroutines dependency.
Incoming AndroidX WebKit messages now pass through an internal
CheckoutMessageIngressPolicybefore reaching the checkout protocol client:The policy validates AndroidX WebKit's authenticated source origin and frame metadata before a message reaches the checkout protocol client.
ALLOWED_MESSAGE_ORIGIN_RULESintentionally remains"*"so AndroidX WebKit delivers every message with its verified source origin; narrowing the transport rule would silently discard messages before the policy could validate or log them.Keeping this decision at the native WebView boundary means the protocol client can focus on handling admitted checkout protocol messages rather than transport trust.
Rejection behavior
A rejected message means that specific input was not trusted. It does not mean the checkout session failed: checkout may be displaying an external surface that also posts messages, and unrelated page activity must not be able to terminate an otherwise healthy checkout.
PreloadStatetoFailedor evict the preload.CheckoutExceptionor invokeonFail/onCheckoutFailed.Consumer API
Consumers only configure the origins they trust. The existing lifecycle APIs remain reserved for actual checkout failures:
There is no message-rejection subscription. Rejections remain an internal signal that is logged at the appropriate level and dropped.
Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)