test(platform-wallet): CR-001 — SPV mn-list sync readiness#3614
Merged
lklimek merged 4 commits intofeat/rs-platform-wallet-e2efrom May 8, 2026
Merged
test(platform-wallet): CR-001 — SPV mn-list sync readiness#3614lklimek merged 4 commits intofeat/rs-platform-wallet-e2efrom
lklimek merged 4 commits intofeat/rs-platform-wallet-e2efrom
Conversation
Pins the SPV-readiness contract per TEST_SPEC: wait <= 180s for mn-list sync, assert height > 0 and SPV runtime is started. Note: spec mentions SpvHealth::status() -> Enum but that accessor does not exist in the codebase yet; using SpvRuntime::is_started() as the available proxy with an inline comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 tasks
…er (#3614 review) Address audit findings on PR #3614 (CR-001 SPV mn-list readiness): - F-001 (LOW): the harness never reads PLATFORM_WALLET_E2E_DISABLE_SPV; E2eContext::build always starts SPV and stores it in ctx.spv(). Reword the PRE-pin comment to drop the misleading harness-gate claim and frame the .expect as defence-in-depth against future harness changes. - F-002 (LOW): MN_LIST_SYNC_TIMEOUT (180 s) is not an enforced ceiling. framework::spv::wait_for_mn_list_synced raises every requested timeout to COLD_CACHE_TIMEOUT_FLOOR (600 s). Update the constant doc and module header to describe the actual effective wait, with the spec's 180 s framed as informational warm-cache target. - F-003 (LOW): promote the 11-line truthy-env parser out of the test body into framework::config so future SPV-gated cases reuse one source of truth. Adds vars::DISABLE_SPV constant, a private is_truthy_env helper shared by SPV-style boolean flags, and a public spv_disabled_from_env() consumed by CR-001. Includes a unit test exercising the truthy/falsy matrix on a unique probe-only env-var key. No production-code changes; SPV is still always started by the harness. The .expect strings keep their PRE/POST-pin invariant framing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Issue being fixed or feature implemented
Implements CR-001 — SPV mn-list sync readiness per
tests/e2e/TEST_SPEC.md(Status: PASS-pending-validation). Foundation for every other Core (CR) test — pins the SPV-readiness contract before any Core operation runs.What was done?
packages/rs-platform-wallet/tests/e2e/cases/cr_001_spv_mn_list_sync_readiness.rs.cr_001incases/mod.rsalphabetically (beforecr_003_*).spv::wait_for_mn_list_synced, reads mn-list height, asserts> 0, asserts the SPV runtime reports started.PLATFORM_WALLET_E2E_DISABLE_SPV=1(operator escape hatch).#[ignore]-tagged per repo convention; runs only with--ignored.Spec divergence note
The spec entry mentions
SpvHealth::status() -> Enumwith aReadyvariant. That accessor does not exist in the current codebase — the test usesSpvRuntime::is_started() == trueas the available proxy, with an inline comment. Follow-up: either addSpvHealth::status()(small public API addition) or update the spec line to matchis_started().How Has This Been Tested?
cargo build --tests --no-default-features— cleancargo build --tests— cleancargo clippy --tests --all-features -- -D warnings— cleancargo fmt --all -- --check— cleancargo test --test e2e cr_001 -- --listshows the test discoverableBreaking Changes
None.
Checklist
Related
🤖 Co-authored by Claudius the Magnificent AI Agent