fix: persist and atomically retrieve credential-associated data - #512
Draft
alexblaniatfh wants to merge 5 commits into
Draft
fix: persist and atomically retrieve credential-associated data#512alexblaniatfh wants to merge 5 commits into
alexblaniatfh wants to merge 5 commits into
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.
A v4-only consumer needs the exact credential and its associated biometric data to survive recovery and restore. Expose the selected unexpired credential’s data through CredentialStore/UniFFI, including an atomic
CredentialDatasnapshot. Deterministic same-second ordering matches proof generation; missing data never borrows an older credential’s payload.Add conditional associated-data repair guarded by record ID, exact credential bytes and expiry. Repairs preserve the blinding factor and selection order, clean orphaned data, and notify backup observers. Existing schema and frozen backup format remain unchanged. Biometric snapshots deliberately omit Debug. Consumers must validate the issuer-defined format and commitment before using or repairing data; the Orb claim verification and iOS integration are separate companion changes for MCORE-1907.
Validation: all 23 credential-vault tests pass, including reopening, atomic snapshots, stale/deleted/expired repair, ordering and frozen backup bytes. Formatting and strict walletkit-core library Clippy pass with Rust 1.94.1. New generated Swift/Kotlin binding checks are running in CI. No release or deployment performed.
The candidate also pins the protocol recovery branch at
8920ae9c463c98e62b0836d1ef9d9b6c2749b5f1so the generated SDK includes authoritative recovery-counter checks and revoked-authenticator handling (worldcoin/world-id-protocol#982). All 23 vault tests and strict library Clippy pass against this exact revision. Replace the temporary Git pin with the coordinated published protocol version before the production crates release.