Conversation
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.
Two refresh paths can expose stale or unusable data. After a completed refresh,
firstSettled()can still return the previous value from the shared observer. Successful price history responses with no usable daily prices or incomplete rows can throw before the caller publishes a data state.Read the authoritative state flow after invoking the use case. For chart history, safely access timestamps and return null when no usable daily price remains, allowing the existing caller to publish
DataState.Empty. Regression tests cover delayed shared replay, success/error/empty states, skipped work, malformed chart rows and valid price ordering.The existing Meld tests prevented full validation because they called the production service and relied on a missing test logger registration. Replace those calls with HTTP contract tests through the real Meld client, repository and JSON serialization using Ktor MockEngine. Assert quote and widget request bodies, limits query parameters and response values, plus HTTP 403 and malformed response handling. Add optional engine injection while retaining the default production client configuration. These tests validate app behavior; they do not establish live Meld service availability.
Validation: fork CI passed before opening this PR. The workflow checks out and verifies the exact proposed commit,
85d057705a8dcedcf9823507e1c6bccee6ca5a9c. All 263 executed tests passed with zero failures, errors or skips: 62 data, 60 domain, 6 utils, and 45 Android tests for each of development, production FDroid and production Google. The repositorytesttask and:androidApp:assembleProductionGoogleDebugsucceeded. The new refresh/chart regressions were also verified to fail against the original implementation before the fixes.The successful debug APK and XML reports are available with the run. The validation workflow lives on a separate fork branch and is not part of this PR. This is fork CI evidence; Blockstream's private GitLab pipeline was not run.