-
Notifications
You must be signed in to change notification settings - Fork 54
feat(platform-wallet)!: rs-platform-wallet-storage crate (SQLite persister) + trait surface #3743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lklimek
merged 40 commits into
feat/platform-wallet-sqlite-persistor
from
fix/3625-thepastaclaw-hardening
May 27, 2026
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
fffc513
refactor(platform-wallet)!: typed PersistenceError with kind + source…
lklimek 741fc58
refactor(platform-wallet-storage)!: V002 schema — cascade-only identi…
lklimek ca5c89c
fix(platform-wallet): refuse silent drop of orphan platform_addresses…
lklimek dfb243a
fix(platform-wallet): retry transient + undo on fatal store error in …
lklimek 31df9ca
feat(platform-wallet): add delete_wallet to PlatformWalletPersistence…
lklimek c2c839b
feat(platform-wallet): add commit_writes to PlatformWalletPersistence…
lklimek fc921d3
refactor(platform-wallet-storage)!: SQLite-native EXCLUSIVE replaces …
lklimek 79a2779
fix(platform-wallet-storage): pre-delete backup includes buffered wri…
lklimek 40714e1
fix(platform-wallet-storage): persistor hardening batch-A (CODE-009/0…
lklimek 7dff6a4
build(platform-wallet-storage): gate platform-wallet + serde behind s…
lklimek 81c8f1a
docs(platform-wallet-storage): drop deleted delete-wallet CLI referen…
lklimek 13e0cd6
test(platform-wallet-storage): surface delete-wallet + COUNT failures…
lklimek 3e70078
test(platform-wallet-storage): require >=8192 bytes before page-2 cor…
lklimek 96a3e63
refactor(platform-wallet-storage): single default_auto_backup_dir hel…
lklimek 2c91955
style(platform-wallet-storage): rustfmt feature_flag_build.rs (CODE-020)
lklimek 6934404
perf(platform-wallet): cache ClientStartState slices to drop register…
lklimek 17c2294
refactor(platform-wallet-storage): extract has_schema_history helper …
lklimek 0a3e843
fix(platform-wallet-storage): extend ConfigInvalid audit + drop match…
lklimek 9b39f3e
fix(platform-wallet-storage): deprecate --auto-backup-dir "" sentinel…
lklimek 6602cdb
docs(platform-wallet-ffi): TODO comments at half-wired callback sites…
lklimek 1c58c72
test(platform-wallet-storage): consumer↔SqlitePersister round-trip in…
lklimek 4462358
fix(platform-wallet-ffi): require wallet_id in register_identity FFI …
lklimek c47ca1e
docs(platform-wallet-storage): INTENTIONAL(SEC-001) on COALESCE ident…
lklimek f613bbd
docs(platform-wallet-storage): INTENTIONAL(SEC-002) on token_balances…
lklimek 0c9cdc9
fix(platform-wallet): wire cached_persisted_shielded in bind_shielded…
lklimek a8a0783
fix(platform-wallet-storage): use valid-UTF-8 non-ASCII path in sidec…
lklimek d0ed23b
docs(platform-wallet): document default WalletId = orphan convention …
lklimek 5747a98
docs(platform-wallet): document orphan-bucket convention on flush + c…
lklimek 16f32f5
Merge branch 'feat/platform-wallet-sqlite-persistor' into fix/3625-th…
lklimek 3dc48dc
revert(platform-wallet): drop consumer hardening (CODE-001/017/018/00…
lklimek 7880e69
Revert "docs(platform-wallet-ffi): TODO comments at half-wired callba…
lklimek 6e65e72
Revert "docs(platform-wallet): document orphan-bucket convention on f…
lklimek 87ae78b
Revert "docs(platform-wallet): document default WalletId = orphan con…
lklimek e28069b
revert(platform-wallet-storage): drop round_trip_consumer.rs (CODE-00…
lklimek ff00639
Merge remote-tracking branch 'origin/feat/platform-wallet-sqlite-pers…
lklimek 4dc7a3a
chore(platform-wallet-storage): refresh Cargo.lock for workspace dev.…
lklimek 0ff215e
refactor(platform-wallet-storage)!: collapse V002 schema into V001 (P…
lklimek ffb8e1f
refactor(platform-wallet-storage)!: remove all deprecated mechanisms …
lklimek 80b74c5
fix(platform-wallet-storage): symmetric wallet_id validation + COALES…
lklimek 47972c0
fix(platform-wallet-storage): close commit_writes Immediate-mode gap …
lklimek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Suggestion: [NEW] FFI callbacks return opaque
i32, so every host-reported error is forced toPersistenceErrorKind::Fatal—commit_writes' retry contract cannot cross the boundaryThe 47972c0 delta resolves the trait-level B7 symptom by deleting the blanket
From<String>impls and forcing callers to constructPersistenceError::backend(...). At the FFI boundary the underlying problem persists:PersistenceCallbacks::on_store_fn,on_flush_fn,on_load_wallet_list_fn, and the shielded-load callbacks all returnunsafe extern "C" fn(...) -> i32— a single opaque code with no transient/fatal/constraint dimension. The persister consequently wraps every non-zero return viaPersistenceError::backend(format!("...returned error code {}", result)), andbackend(...)defaults toFatal.Consequence: a host that knows its error is transient (SwiftData CoreData store busy, transient I/O) has no way to signal that across the ABI, so the new
commit_writesretry path treats every FFI-side failure as non-retryable and drops the buffered changeset. The trait now exposesbackend_with_kindprecisely to surface this distinction; the vtable needs a matching contract — reserved error-code ranges (e.g.>= 1000= transient), or an additionalout_kind: *mut u8parameter — so hosts can opt in without ABI churn. Lower priority than the compile break; flag this as the next ABI revision target after the consumer-hardening PR lands.source: ['claude']