Open
Conversation
Collaborator
Pull Request Test Coverage Report for Build 23412834694Details
💛 - Coveralls |
chavic
added a commit
to chavic/rust-payjoin
that referenced
this pull request
Mar 22, 2026
Wrap the sender-builder assertion in the Python unit test the\nway treefmt expects.\n\nThe PR was failing the formatting job on this one call site even\nthough the branch logic was already correct. Keeping the file in the\nformatter's preferred layout avoids a no-op CI failure on payjoin#1432.
Preserve the invalid-original-input index when sender build\nfailures cross the FFI boundary.\n\nThe core sender already tracks which PSBT input failed UTXO\nvalidation, but BuildSenderError was flattened to a display\nstring in payjoin-ffi. That left bindings unable to point\ncallers at the offending input without parsing error text.\n\nThis adds small core accessors for the invalid input index and\nnested message, exposes matching getters on the FFI\nBuildSenderError object, and adds a malformed-PSBT test\nfixture plus Rust, Python, and Dart regressions for the\nnon-incentivizing sender path.
ca0af1b to
e6bc04f
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 #1276.
This PR fixes a narrow but important sender diagnostic gap. Core sender validation already knew which original PSBT input failed validation, but that information was being discarded when the FFI converted sender build failures into a generic display string. As a result, bindings could tell that sender construction failed, but not which original input was actually invalid.
The change preserves the invalid original input index and the nested error message at the sender boundary and exposes both through the FFI
BuildSenderErrorobject. It intentionally keeps the scope tight: this does not redesign sender build errors more broadly and does not open up more of the PSBT internals than needed.The net effect is that bindings can point directly at the failing original input instead of showing a generic sender build failure. That makes malformed PSBT diagnostics materially better without introducing a larger API redesign.