Skip to content

platform-wallet: CI runs the wallet tests only with --all-features, so the default (pruning) build is never tested #5429

Open

Description

@romchornyi

Expected Behavior

The platform-wallet tests that only exist or only bite with the crate's default features (keep-finalized-transactions off, which is what the Swift and Kotlin SDKs ship) run in CI.

Current Behavior

Both CI jobs that run the wallet crates pass --all-features: the workspace job (tests-rs-workspace.yml) and the wallet fast path (tests-rs-wallet.yml). --all-features turns on keep-finalized-transactions, so key-wallet keeps chain-locked records in memory instead of pruning them to finalized_txids.

Code paths that handle a pruned record are therefore never exercised in CI. Example from #5393: instant_lock_changeset relies on transaction_is_finalized to see a chain-locked slice that was pruned. Deleting account.transaction_is_finalized(txid) || there:

  • default features: should_not_re_emit_the_unconfirmed_sibling_of_a_chain_locked_slice and should_drop_the_lock_of_a_transaction_chain_locked_before_it fail;
  • --all-features (what CI runs): all 94 changeset::core_bridge tests pass.

Tests gated with #[cfg(not(feature = "keep-finalized-transactions"))] never run in CI at all.

Possible Solution

Add a step to the wallet job(s) that runs cargo nextest run --package platform-wallet (and the storage / FFI crates if they have default-feature-dependent paths) without --all-features. Feature-gated items that need other features to compile (shielded, test helpers) may need an explicit --features list that leaves keep-finalized-transactions out, rather than bare defaults.

Cost: one more build of the wallet crates per run.

Steps to Reproduce (for bugs)

  1. On fix(platform-wallet): store the InstantSend lock of a send on its record #5393's branch, remove account.transaction_is_finalized(txid) || from instant_lock_changeset.
  2. cargo test -p platform-wallet --lib changeset::core_bridge → 2 failures.
  3. cargo test -p platform-wallet --all-features --lib changeset::core_bridge → all pass.

Context

Raised in the review of #5393 (#5393 (comment)). The gap predates that PR; #5393 is the first fix that depends on the pruned path.

Your Environment

Activity

  1. added
    bug
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions