Skip to content

refactor(remote-config): topic-handler registry (generic dispatch)#3621

Draft
tonidero wants to merge 1 commit into
06-16-phase_3__v2_config_inline_blob_store_extractionfrom
phase_4__v2_config_topic_handler_registry
Draft

refactor(remote-config): topic-handler registry (generic dispatch)#3621
tonidero wants to merge 1 commit into
06-16-phase_3__v2_config_inline_blob_store_extractionfrom
phase_4__v2_config_topic_handler_registry

Conversation

@tonidero

Copy link
Copy Markdown
Contributor

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-ios and hybrids

Motivation

Description

tonidero commented Jun 16, 2026

Copy link
Copy Markdown
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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tonidero tonidero changed the title Phase 4: /v2/config topic-handler registry (generic dispatch) refactor(remote-config): topic-handler registry (generic dispatch) Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (06-16-phase_3__v2_config_inline_blob_store_extraction@8c2a0fe). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...rchases/common/remoteconfig/RemoteConfigManager.kt 83.87% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@                                   Coverage Diff                                    @@
##             06-16-phase_3__v2_config_inline_blob_store_extraction    #3621   +/-   ##
========================================================================================
  Coverage                                                         ?   80.25%           
========================================================================================
  Files                                                            ?      383           
  Lines                                                            ?    15769           
  Branches                                                         ?     2215           
========================================================================================
  Hits                                                             ?    12656           
  Misses                                                           ?     2227           
  Partials                                                         ?      886           

☔ 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 phase_4__v2_config_topic_handler_registry branch from 1a8f963 to fde145e Compare June 16, 2026 16:31
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from fa63b72 to 5129003 Compare June 17, 2026 13:05
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch 2 times, most recently from c9de7bb to b63462c Compare June 18, 2026 10:02
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch 2 times, most recently from 650f8d8 to 2f49d86 Compare June 18, 2026 10:27
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from b63462c to 16aaa3b Compare June 18, 2026 10:27
@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 phase_4__v2_config_topic_handler_registry branch from 16aaa3b to 96fbd64 Compare June 18, 2026 10:57
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch 2 times, most recently from a6819b1 to 19f3cac Compare June 18, 2026 13:24
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from 96fbd64 to 06b4195 Compare June 18, 2026 13:24
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from 19f3cac to ba88ac7 Compare June 18, 2026 13:46
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch 2 times, most recently from 24a63aa to d0c8539 Compare June 18, 2026 15:57
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from ba88ac7 to 6de1e60 Compare June 18, 2026 15:57
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from d0c8539 to edf4f40 Compare June 19, 2026 09:13
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from 6de1e60 to 0498f0d Compare June 19, 2026 09:13
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from edf4f40 to 82c6d41 Compare June 19, 2026 09:50
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from 0498f0d to 737f5be Compare June 19, 2026 09:50
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from 82c6d41 to 3d9d4f4 Compare June 19, 2026 10:56
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch 2 times, most recently from 248ddff to f2c8284 Compare June 19, 2026 13:27
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch 2 times, most recently from 9590bc5 to c01ecaa Compare June 23, 2026 12:42
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from f2c8284 to 05c4f49 Compare June 23, 2026 12:42
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from 05c4f49 to e746901 Compare June 23, 2026 13:32
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch 2 times, most recently from a964cd7 to 94acc4d Compare June 23, 2026 14:28
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from e746901 to 428e708 Compare June 23, 2026 14:28
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from 94acc4d to 642f937 Compare June 25, 2026 09:28
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from 428e708 to 2afab8c Compare June 25, 2026 09:28
Add a ConfigTopicHandler interface and an ordered registry that RemoteConfigManager
dispatches changed/removed topics to. Pure plumbing, no feature behavior: the registry
is empty in production until Phases 5/6 register real handlers.

Handlers may do network work, so the seam is asynchronous:
- handle is a suspend fun. The 200 path runs on a manager-owned CoroutineScope
  (SupervisorJob + Dispatchers.IO, injectable); close() cancels it (Phase 7 teardown).
- Dispatch awaits handlers in registration order, so a blob-producing handler (sources)
  finishes before blob-consuming ones (PEM). Concurrency lives inside a handler.
- persist() awaits dispatch before prefetched_blobs accounting + disk write, so a blob a
  handler fetches is reflected in the same sync. A failing handler is logged and skipped.
- On 200, changed topics (present in response.topics) -> handle; topics removed from the
  manifest -> clear(); unchanged/unknown topics untouched (unknown still persisted).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tonidero tonidero force-pushed the 06-16-phase_3__v2_config_inline_blob_store_extraction branch from 2afab8c to 8c2a0fe Compare June 25, 2026 10:18
@tonidero tonidero force-pushed the phase_4__v2_config_topic_handler_registry branch from 642f937 to 48aea81 Compare June 25, 2026 10:18
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.

1 participant