feat(ffi): upload progress on wallet path + distinct timeout/disk-space errors #214
Open
Nic-dorman wants to merge 2 commits into
Open
feat(ffi): upload progress on wallet path + distinct timeout/disk-space errors #214Nic-dorman wants to merge 2 commits into
Nic-dorman wants to merge 2 commits into
Conversation
…ce errors Mobile error-handling + progress improvements for the next AntFfi release (no ant-core bump — still 0.3.1 / ant-cli-v0.2.11). - V2-597: add file_upload_public_with_progress / file_upload_private_with_progress, the wallet-backed (built-in payment) counterparts of file_upload_public/private. They bridge ant-core's file_upload_with_progress UploadEvents to the existing ProgressListener (encrypting/quoting/storing phases). The external-signer path already had progress via prepare/finalize_*_with_progress. - V2-599: file_download_public no longer flattens every ant-core error into NetworkError. It now propagates via the From<ant_core::data::Error> mapping, so a timeout / out-of-disk-space failure surfaces as its own ClientError. - V2-600: map ant-core Error::InsufficientDiskSpace to a new ClientError::InsufficientDiskSpace variant (was a catch-all InternalError). - V2-601 (timeout half): Error::Timeout now maps to a dedicated ClientError::Timeout variant instead of being folded into NetworkError with a "timeout:" prefix. The insufficient-funds half needs an upstream ant-client variant (core wraps it in generic Payment) and stays open on V2-601. fmt + clippy -D + 8 tests green; Swift and Kotlin bindings regenerated and verified to expose the new methods and error variants. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fficientDiskSpace Addresses the two in-scope misses from the release review: - wait_for_receipt now returns ClientError::Timeout (was NetworkError) -- the most user-visible timeout in the WalletConnect external-signer flow - core Io(StorageFull) from download file writes now maps to ClientError::InsufficientDiskSpace (was InternalError) - corrected the missing-record mapping note (InvalidData -> InvalidInput, not Network; the NotFound arm arrives with the 0.4.x pin bump) and added From-mapping unit tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Nic-dorman
force-pushed
the
feat/ffi-error-handling-progress-0.0.8
branch
from
July 20, 2026 09:36
b2b903d to
64469ed
Compare
Collaborator
Author
|
Both in-scope misses from the release review addressed in 64469ed (branch also rebased onto current main):
Gates on 64469ed: fmt + clippy Holding merge pending Nic's go-ahead. |
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.
FFI-only mobile error-handling + progress improvements for the next AntFfi 0.0.8 release. No ant-core bump — still ant-core 0.3.1 (
ant-cli-v0.2.11), so nothing on the payment/security surface moves.Changes
fileUploadPublicWithProgress/fileUploadPrivateWithProgress— the wallet-backed (built-in payment) counterparts offileUploadPublic/Private. They bridge ant-core'sfile_upload_with_progressUploadEvents to the existingProgressListener(encrypting/quoting/storingphases). The external-signer path already had progress viaprepare/finalize_*_with_progress; this closes the gap on the wallet path.fileDownloadPublicno longer flattens every ant-core error intoNetworkError. It now propagates through theFrom<ant_core::data::Error>mapping, so a timeout / out-of-disk failure surfaces as its own variant instead of a misleading "network error".Error::InsufficientDiskSpace→ newClientError::InsufficientDiskSpace(previously swallowed by the catch-allInternalError).Error::Timeoutnow maps to a dedicatedClientError::Timeoutvariant instead of being folded intoNetworkErrorwith a"timeout:"prefix.Out of scope (need upstream ant-client work)
Payment(String)with no distinct variant. Needs a coreInsufficientFundsvariant; V2-601 stays open for it.CancellationTokenon core's data upload/download path (only implicit receiver-drop). Rescoped to a download-only investigation.Verification
cargo fmt --all+cargo clippy --all-targets --all-features -D warningscleancargo test --all— 8 passedfileUploadPublicWithProgress/fileUploadPrivateWithProgressand theTimeout/InsufficientDiskSpaceerror variants.Additive uniffi enum change (new variants), so bindings and Rust stay in lockstep per-release; consumers pick it up on the 0.0.8 rebuild.
🤖 Generated with Claude Code