#36591 test: deduplicate PSBT unknown-field coverage in `rpc_psbt.py`
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36591 test: deduplicate PSBT unknown-field coverage in `rpc_psbt.py` | Ready | 1 | Strong | 0 + 25 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Reorganizes functional test coverage for PSBT unknown fields in `rpc_psbt.py`. It extracts the `walletprocesspsbt` pass-through test into a dedicated method, moves implicit-versus-explicit v0 merge checks into `test_combinepsbt_preserves_unknown_fields`, and removes redundant merge assertions.
Problem: PSBT unknown-field merge tests were duplicated across disparate test sections, and the pass-through test block included merge assertions. Mutation testing on `PSBTInput::Merge` triggered failures under the pass-through test block rather than the dedicated merge test.
Evidence of importance:
- Author mutation testing in description: removing `PSBTInput::Merge` unknown field insertion caused the test labeled 'Test that unknown values are just passed through' to fail instead of the dedicated combine test
Risk of a mistake: low (tests). Only reorganizes test assertions within a functional test script.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- nothing
Agreement
Strong
substantive support, no open objection (Naomi-Gift)
Thread notes: Initial record for the PR. Naomi-Gift provided a Tested ACK after testing the mutation cases mentioned in the PR description. / Initial record. Naomi-Gift provided a tested ACK confirming the test deduplication and mutation failure behavior.
Objections, suggestions, and questions: none recorded.
Support:
- Naomi-Gift (none) (Tested ACK, 2026-10-21) [both: psbt.cpp, rpc_psbt.py]: rpc_psbt.py passes and mutation testing of lines 71, 434, and 537 in psbt.cpp confirmed that all three are now caught by the combine-unknown-fields test as intended
Participants:
- Naomi-Gift (none, support, 1 statements 2026-10-21 to 2026-10-21): tested mutation behavior and confirmed the test coverage changes
Files
49 lines under test/bench/ci.
- test/functional/rpc_psbt.py +25/-24
Card
The short text the ranking pass compares across PRs.
Deduplicates and reorganizes PSBT unknown-field test coverage in test/functional/rpc_psbt.py. Redundant test logic in run_test caused mutations in PSBTInput::Merge to fail under a pass-through test label rather than the dedicated merge test. The change isolates pass-through assertions into their own method and consolidates version-merging assertions into test_combinepsbt_preserves_unknown_fields.
Data
thread read through 2026-10-21 (1 statements), head ef4310097b
labels: Tests
Categories
Wallet
P4 · test coverage
Refactors functional test assertions in `rpc_psbt.py` to isolate unknown-field merge coverage from pass-through checks. The change deduplicates existing test logic and ensures mutation testing correctly fails dedicated merge tests without affecting wallet behavior or user-facing functionality.
Membership: Modifies test coverage for PSBT unknown-field handling and walletprocesspsbt in test/functional/rpc_psbt.py.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0