Skip to content

feat(remote-config): switch config request to v1 and send app user id#7080

Open
rickvdl wants to merge 2 commits into
rickvdl/remote-config-blob-storefrom
rickvdl/remote-config-v1-app-user
Open

feat(remote-config): switch config request to v1 and send app user id#7080
rickvdl wants to merge 2 commits into
rickvdl/remote-config-blob-storefrom
rickvdl/remote-config-v1-app-user

Conversation

@rickvdl

@rickvdl rickvdl commented Jun 25, 2026

Copy link
Copy Markdown
Member

Some small API request updates

  • Switches the API endpoint from /v2/config to /v1/config
  • Includes the current app user ID in the POST body of the request, as app_user_id: "something"

Note

Medium Risk
This changes the live backend contract and ties config sync to app user identity; mis-wiring the user id or a v1/v2 mismatch could break refreshes or serve the wrong config after identify/logout.

Overview
Moves remote config fetches from /v2/config to /v1/config, including fallback URLs and docs, by dropping the v2-only path handling so remote config uses the same /v1/{component} pattern as other endpoints.

RemoteConfigRequest now requires an appUserID, sends it in the POST body as app_user_id, and folds it into the operation cache key so in-flight requests are not coalesced across different users. RemoteConfigAPI.getRemoteConfig no longer builds a default body; callers must supply a request. RemoteConfigManager takes CurrentUserProvider and passes currentAppUserID on each refresh.

Unit tests were updated for the new path and body shape, plus coverage that differing app user IDs do not share one network call.

Reviewed by Cursor Bugbot for commit 949aa9e. Bugbot is set up for automated code reviews on this repo. Configure here.

@rickvdl

rickvdl commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@emerge-tools

emerge-tools Bot commented Jun 25, 2026

Copy link
Copy Markdown

4 builds increased size

Name Version Download Change Install Change Approval
RevenueCat
com.revenuecat.PaywallsTester
1.0 (1) 19.0 MB ⬆️ 69.6 kB (0.37%) 68.6 MB ⬆️ 250.0 kB (0.37%) N/A
BinarySizeTest
com.revenuecat.binary-size-test.local-source
1.0 (1) 4.4 MB ⬆️ 8.5 kB (0.19%) 13.2 MB ⬆️ 30.4 kB (0.23%) ⏳ Needs approval
BinarySizeTest
com.revenuecat.binary-size-test.cocoapods
1.0 (1) 6.6 MB ⬆️ 14.1 kB (0.21%) 29.0 MB ⬆️ 51.5 kB (0.18%) ⏳ Needs approval
BinarySizeTest
com.revenuecat.binary-size-test.spm
1.0 (1) 4.5 MB ⬆️ 6.6 kB (0.15%) 11.5 MB ⬆️ 26.6 kB (0.23%) ⏳ Needs approval

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 250.0 kB (0.37%)
Total download size change: ⬆️ 69.6 kB (0.37%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 74.2 kB
DYLD.Exports ⬆️ 5.6 kB
Code Signature ⬆️ 5.6 kB
Strings.Unmapped ⬆️ 1.2 kB
📝 RevenueCat.RemoteConfigManager.RemoteConfigManager ⬆️ 604 B
View Treemap

Image of diff

BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 30.4 kB (0.23%)
Total download size change: ⬆️ 8.5 kB (0.19%)

Largest size changes

Item Install Size Change
📝 RevenueCat.RemoteConfigStrings.value witness ⬆️ 8.7 kB
DYLD.String Table ⬆️ 1.7 kB
📝 RevenueCat.RCContainer.Element.withBytes(in) ⬆️ 1.6 kB
🗑 RevenueCat.RCContainer.Parser.checksumString(in) ⬇️ -1.5 kB
📝 RevenueCat.RemoteConfigStrings.description ⬆️ 1.4 kB
View Treemap

Image of diff

BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 51.5 kB (0.18%)
Total download size change: ⬆️ 14.1 kB (0.21%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 14.4 kB
📝 RevenueCat.RemoteConfigStrings.value witness ⬆️ 8.7 kB
📝 RevenueCat.RCContainer.Element.withBytes(in) ⬆️ 1.6 kB
🗑 RevenueCat.RCContainer.Parser.checksumString(in) ⬇️ -1.5 kB
Code Signature ⬆️ 1.5 kB
View Treemap

Image of diff

BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 26.6 kB (0.23%)
Total download size change: ⬆️ 6.6 kB (0.15%)

Largest size changes

Item Install Size Change
📝 RevenueCat.RemoteConfigStrings.value witness ⬆️ 8.7 kB
📝 RevenueCat.RCContainer.Element.withBytes(in) ⬆️ 1.6 kB
🗑 RevenueCat.RCContainer.Parser.checksumString(in) ⬇️ -1.5 kB
📝 RevenueCat.RemoteConfigStrings.description ⬆️ 1.4 kB
📝 RevenueCat.RCContainer.Element.payloadChecksum ⬆️ 1.4 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@RevenueCat-Danger-Bot

RevenueCat-Danger-Bot commented Jun 25, 2026

Copy link
Copy Markdown

❌ CI Job Failed — run-test-ios-26

View Build

@rickvdl rickvdl force-pushed the rickvdl/remote-config-v1-app-user branch 2 times, most recently from 57aa20d to 0c29474 Compare June 25, 2026 06:00
@rickvdl rickvdl force-pushed the rickvdl/remote-config-blob-store branch from b1aa3e8 to eddd148 Compare June 25, 2026 06:28
@rickvdl rickvdl force-pushed the rickvdl/remote-config-v1-app-user branch from 0c29474 to 64e4760 Compare June 25, 2026 06:30
@rickvdl rickvdl marked this pull request as ready for review June 25, 2026 06:51
@rickvdl rickvdl requested a review from a team as a code owner June 25, 2026 06:51

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rickvdl rickvdl force-pushed the rickvdl/remote-config-blob-store branch from eddd148 to 21b1db7 Compare June 25, 2026 07:11
@rickvdl rickvdl force-pushed the rickvdl/remote-config-v1-app-user branch from 64e4760 to 949aa9e Compare June 25, 2026 07:13

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 949aa9e. Configure here.


let persisted = self.diskCache.read()
let request = RemoteConfigRequest(
appUserID: self.currentUserProvider.currentAppUserID,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale manifest wrong user

Medium Severity

After login or app_user_id changes, refresh still replays manifest and prefetched blobs from the global disk cache while sending the new appUserID in RemoteConfigRequest. The backend can receive another user’s sync token under the current user id, leading to wrong config or failed refresh until cache is cleared.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 949aa9e. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants