Preserve Persisted Error Classification#1429
Draft
chavic wants to merge 2 commits intopayjoin:masterfrom
Draft
Conversation
Collaborator
Pull Request Test Coverage Report for Build 24011167381Details
💛 - Coveralls |
Expose persisted and replay error classification in core so the FFI can preserve storage, transient, fatal, and fatal-with-state semantics. This keeps sender and receiver bindings from losing recovery guidance at the persistence boundary, and it snapshots replay failures with stable kind and detail accessors. The receiver save helpers now retain replyable error state instead of flattening it into implementation errors, which lets bindings continue the protocol after fatal-with-state failures.
Upgrade uniffi-dart to the upstream revision that fixes Dart\nobject naming for Error-suffixed UniFFI types.\n\nThis branch exposes replay persistence failures that return\nImplementationError over FFI. The older generator revision emits\nbroken Dart type references for that shape, so the Dart jobs fail to\ncompile.\n\nUpdate the dependency and refresh both lockfiles so the branch uses\nthe fixed generator consistently in CI and local binding generation.
06a8e10 to
f515caf
Compare
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.
Closes #1275.
This PR preserves persisted and replay error semantics across the FFI boundary instead of flattening them into generic storage or API failures. Core already distinguished storage failures, transient API failures, fatal failures, fatal failures that carry a replyable state, and multiple replay failure modes, but that structure was being lost before it reached bindings. On the receiver side, some save paths were even re-boxing persisted failures as generic implementation errors.
The change adds stable persisted and replay classifications in core and maps those explicitly through the FFI. In particular, receiver-side
FatalWithStateremains distinct and carries the replyable state instead of collapsing into plain fatal failure, and replay failures preserve whether the problem was no events, invalid events, expiry, or persistence failure.The net effect is that bindings can make correct recovery decisions without reverse-engineering behavior from display strings. This is the piece that restores the real state-machine semantics at the language boundary and makes later retry and lifecycle work build on explicit classification instead of lossy flattening.