Constellation: reuse cached verification state for RCS - #3
Open
paulcakeface wants to merge 1 commit into
Open
paulcakeface wants to merge 1 commit into
paulcakeface wants to merge 1 commit into
Conversation
When an RCS verification request has existing verification state, read the server-issued verified number and token before starting a new Sync/PNV flow. Keep this path behind the existing fail-closed RCS consent gate, require an exact target match when a phone hint is available, reject empty tokens, and preserve the resolved SIM slot.
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.
Summary
Adds a focused cached-verification path to the current microg#3808 Constellation
VerifyPhoneNumberflow.When Google Messages requests RCS verification and microG already has persisted Constellation verification state, the flow now:
GetVerifiedPhoneNumbersrequest before Sync/PNVid_tokenPhoneNumberVerification.verificationTokenIf no cached verification state is available, the existing Sync/PNV path is unchanged. A GPNV error is surfaced rather than used as permission to start another PNV attempt.
Why
Current Google Messages consumes the GPNV
id_tokensynchronously as its MSISDN bootstrap token. When Constellation already has verified state, re-running Sync/PNV first is unnecessary and can consume another verification attempt.Validation
This branch is based directly on the current microg#3808 head:
223f91fe0cde7be17bcd19bb0e28087526d98bc4Offline validation:
git diff --check: PASSCachedGpnvFastPathTest: PASSVerificationConsentGateTest: PASS:play-services-constellation-core:testReleaseUnitTest: PASS:play-services-core:assembleMapboxDefaultRelease: PASSLocked/no-root physical validation
The exact PR-derived code was built as a signed update-in-place test APK and exercised on a physical Pixel 3 with:
user/ release-keys buildro.secure=1,ro.debuggable=0suin the shell path/common system locationsmessages.android_20260827_01_RC02.phone_dynamicThe exact candidate installed with byte-for-byte APK readback. One controlled RCS OFF -> ON treatment then entered the new cached-GPNV path on that locked/no-root device.
The live GPNV request returned
RESOURCE_EXHAUSTEDfrom Google's Phone Number Verification service before a JWT was returned. No Sync/PNV fallback was observed. I stopped after that single result rather than retrying the known quota boundary.So this exact rebased branch is physically proven to execute on locked/no-root hardware, but this run does not claim a fresh successful JWT handoff or complete microg#2994 acceptance.
Prior positive evidence for the same cached-GPNV behaviour
An earlier equivalent implementation on a locked/green Pixel 3 completed the positive path: one exact-target GPNV response returned a genuine JWT, no Sync/PNV ran, and Google Messages consumed it as a non-empty MSISDN token (
msisdnToken length: 948). Provisioning then moved downstream toRequestWithMsisdnTokenState, where that separate request returned HTTP 400.Scope and provenance
This is intentionally a small follow-up to the existing microg#3784 / microg#3808 integration lineage, not a competing RCS implementation. It preserves the existing contributor ancestry and claims only the cached-state orchestration, strict matching/SIM-slot handling, tests, and the locked-device validation described above.
It does not claim that RCS is Connected end-to-end or that microg#2994 is fully solved.
Refs: microg#2994, microg#3808