Skip to content

refactor(remote-config): wire-format models#3610

Merged
tonidero merged 4 commits into
mainfrom
06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding
Jun 19, 2026
Merged

refactor(remote-config): wire-format models#3610
tonidero merged 4 commits into
mainfrom
06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding

Conversation

@tonidero

@tonidero tonidero commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What

  • Add spec-shaped wire-format models in RemoteConfiguration.kt: RemoteConfiguration, RemoteConfiguration.Manifest, ConfigTopic, RemoteConfiguration.ConfigItem

Note

Low Risk
Additive internal parsing models with no runtime wiring yet; behavior is covered by unit tests and does not touch purchases or auth paths.

Overview
Introduces internal kotlinx-serialization models for the /v2/config JSON payload (RemoteConfiguration, nested Manifest, and per-topic ConfigItem maps), plus RemoteConfiguration.parse(bytes) using lenient JsonProvider.defaultJson.

The shape matches incremental sync: manifest lists every topic etag (and prefetch/refresh metadata), while topics carries only changed topic bodies. ConfigItemSerializer treats blob_ref / prefetch as reserved keys and keeps all other fields in a JsonObject content so inline and blob-referenced items stay forward-compatible through persist round-trips.

Adds RemoteConfigurationTest covering full/delta/empty-topic responses, unknown topics, inline vs blob items, defaults, and parse failures.

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

@tonidero tonidero changed the title Phase 1: /v2/config wire-format models; remove stale remote-config scaffolding refactor(remote-config): wire-format models; remove stale remote-config scaffolding Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.14815% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.25%. Comparing base (17541f4) to head (b6031a0).

Files with missing lines Patch % Lines
...rchases/common/remoteconfig/RemoteConfiguration.kt 48.14% 9 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3610      +/-   ##
==========================================
- Coverage   80.31%   80.25%   -0.06%     
==========================================
  Files         378      379       +1     
  Lines       15503    15530      +27     
  Branches     2154     2163       +9     
==========================================
+ Hits        12451    12464      +13     
- Misses       2193     2202       +9     
- Partials      859      864       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from fb82861 to dd4061d Compare June 16, 2026 11:08
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch from 17f6f5d to e30cd22 Compare June 16, 2026 11:08
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from dd4061d to e4eb551 Compare June 16, 2026 11:23
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from e4eb551 to f50eab9 Compare June 16, 2026 14:20
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch from e30cd22 to c161d23 Compare June 16, 2026 14:40
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from f50eab9 to 1468860 Compare June 16, 2026 14:40
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch from c161d23 to e730be7 Compare June 17, 2026 13:05
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from 1468860 to 18695d1 Compare June 17, 2026 13:05
@tonidero tonidero marked this pull request as ready for review June 18, 2026 09:47
@tonidero tonidero requested a review from a team as a code owner June 18, 2026 09:47
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from a8a7b1f to db36f20 Compare June 18, 2026 10:02
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch 2 times, most recently from 7df7393 to 18e1888 Compare June 18, 2026 10:27
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from db36f20 to 6a666b9 Compare June 18, 2026 10:27
@tonidero tonidero changed the title refactor(remote-config): wire-format models; remove stale remote-config scaffolding refactor(remote-config): wire-format models Jun 18, 2026
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from 6a666b9 to cea3fa5 Compare June 18, 2026 10:57
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch 2 times, most recently from 3799228 to aca57d7 Compare June 18, 2026 13:24
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from cea3fa5 to a7bc2cc Compare June 18, 2026 13:24
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch from aca57d7 to c07f7b1 Compare June 18, 2026 13:46
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from a7bc2cc to aad99b8 Compare June 18, 2026 13:46
@emerge-tools

emerge-tools Bot commented Jun 18, 2026

Copy link
Copy Markdown

📸 Snapshot Test

593 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
0 0 0 0 335 0 N/A
TestPurchasesUIAndroidCompatibility Paparazzi
com.revenuecat.testpurchasesuiandroidcompatibility.paparazzi
0 0 0 0 258 0 N/A

🛸 Powered by Emerge Tools

@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from aad99b8 to 99fa878 Compare June 18, 2026 15:57
@tonidero tonidero force-pushed the support-rc-format-remote-config-request branch from c07f7b1 to 86e78b3 Compare June 18, 2026 15:57

@rickvdl rickvdl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! I think this is looking great :) Just two questions

Base automatically changed from support-rc-format-remote-config-request to main June 19, 2026 09:05
tonidero and others added 3 commits June 19, 2026 11:12
…affolding

Add spec-shaped ConfigurationResponse / ConfigManifest / ConfigTopic /
ConfigItem models plus a lenient parser for the config element (element 0
JSON). No behavior wired.

Delete the pre-spec remote-config scaffolding (RemoteConfigResponse,
RemoteConfigManager, TopicFetcher, RemoteConfigDiskCache and their tests):
all of it was unreachable from production and modelled an older JSON shape.
Later phases rebuild orchestration/disk-cache/blob-store on the new models.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tonidero tonidero force-pushed the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch from 99fa878 to c8d4706 Compare June 19, 2026 09:13
@tonidero tonidero enabled auto-merge June 19, 2026 10:12
@tonidero tonidero added this pull request to the merge queue Jun 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 19, 2026
@tonidero tonidero added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit e7b49f0 Jun 19, 2026
38 checks passed
@tonidero tonidero deleted the 06-16-phase_1__v2_config_wire-format_models_remove_stale_remote-config_scaffolding branch June 19, 2026 10:50
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.

2 participants