#36591 test: deduplicate PSBT unknown-field coverage in `rpc_psbt.py`

ReviewabilityReviewsAgreementSize
#36591 nebula-21 test: deduplicate PSBT unknown-field coverage in `rpc_psbt.py`Ready1Strong0 + 25 tests
  • Make PSBT unknown-field test failures point directly to the broken behavior during mutation testing
  • Maintainers benefit from cleanly separated pass-through and merge test coverage without duplicate checks
  • Ready to review now with no blocking issues or prerequisites
  • Strong support with no open objections
  • Verified by mutation testing that failures now trigger in the dedicated combine test (Naomi-Gift)
  • 0 lines added or modified outside tests
  • 25 lines added or modified in tests
  • 24 lines removed in total
  • 1 files, 2 commits
Wallet#92 of 92
P4 · test coverage
  • P4 because it only refactors test assertions and does not alter wallet behavior or user-facing code
  • The benefit is confined to clearer test failures and deduplication for maintainers working on PSBT 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

dossier JSON · extract JSON · model ledger, generated 2026-10-23T01:15, confidence high, input hash 7b5767797b5003fd
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