Conversation
…ocale-digits Fix locale-dependent digits in padded version strings
Ensure timeout is applied at HttpUrlConenction level
Config Manager actor refactor
Fix sync issues for dependency container access
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.
Changes in this pull request
Checklist
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes.ktlintin the main directory and fixed any issues.Greptile Summary
This PR refactors the config subsystem to use an actor-based state machine (
ConfigState.Actionssealed class) running through aSequentialActor, consolidatesTestModeManagerinto the newTestModeclass with injected UI/network hooks, fixes R8 minification by replacing polymorphickotlinx.serializationonCapabilitywith hand-built JSON, and addsLocale.USguards inDeviceHelper.asPadded(). All P-level findings are P2 style or fragility notes; no blocking issues were found.Confidence Score: 4/5
Safe to merge — no P0/P1 issues found; all findings are P2 style or fragility notes.
Significant refactor with comprehensive new tests (ConfigManagerTest is 1,588 lines). All identified issues are P2: a dead try-catch, an unchecked cast without @Suppress, a potential Int overflow on a very large Duration, and fragile positional destructuring of awaitAll(). None affect correctness in realistic conditions.
superwall/src/main/java/com/superwall/sdk/config/models/ConfigState.kt (FetchConfig action is dense; positional awaitAll destructuring is the most fragile spot)
Important Files Changed
Comments Outside Diff (1)
superwall/src/main/java/com/superwall/sdk/store/testmode/TestMode.kt, line 55-71 (link)try-catchinisTestEnvironmentThe outer
try { ... } catch (_: ClassNotFoundException)can never trigger because everyClass.forNamecall is already wrapped inrunCatching, which catches allThrowables includingClassNotFoundException. The outer handler is dead code and may confuse future readers into thinking there is an unguarded exception path.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "Merge pull request #402 from superwall/i..." | Re-trigger Greptile