{
 "number": 36114,
 "input_hash": "d73a7a7abf490eb5",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T15:58:05+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 19189,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 7701
 },
 "cost_usd": 0.0432705,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Protect wallet users from external signers that tamper with transaction outputs or use unsafe sighash types",
    "Revamp the external signer test mock to support testing misbehaving signers and complex multisig setups"
   ],
   "reviewability": [
    "Paused while waiting on the author to respond to a bypass finding (jeanpablojp)"
   ],
   "agreement": [
    "Concept ACK with thorough testing of signer response edge cases (jeanpablojp)",
    "Unresolved question on whether finalized responses bypassing sighash checks should be rejected (jeanpablojp)"
   ],
   "categories": [
    {
     "name": "wallet",
     "why": [
      "P2 because it prevents rogue or faulty external signers from silently modifying outputs or signing with unsafe sighash types",
      "The overhauled test mock unblocks functional test coverage for misbehaving signers and upcoming MuSig2 workflows"
     ]
    }
   ]
  },
  "summary": "This PR hardens external signer processing by merging the PSBT returned from the signer instead of replacing the node's PSBT, and by rejecting responses that declare or contain signatures using unsafe sighash types such as SIGHASH_NONE or SIGHASH_SINGLE. It also replaces the static external signer functional test mock with an offline descriptor wallet node capable of producing real signatures and simulating varied signer behaviors.",
  "problem": "Previously, the wallet replaced its PSBT wholesale with the external signer's response, leaving users vulnerable to a buggy or compromised hardware wallet modifying outputs or using sighash types that allow third-party output tampering. In addition, the test mock could only echo pre-baked PSBTs, preventing tests for misbehaving signers or multi-party signing.",
  "discussion": {
   "open_concerns": [
    "jeanpablojp noted that finalized PSBT responses bypass FindUnsafeSighashType because BIP 174 clears the input fields where sighash types and partial signatures are checked, allowing SIGHASH_NONE transactions to pass through",
    "jeanpablojp raised nits about v0 PSBT failure error messages and splitting the ECDSA and taproot sighash test cases"
   ],
   "resolved_concerns": [],
   "author_status": "silent since 2026-09-08 after force-pushing a rebase"
  },
  "reviewability": {
   "state": "Paused",
   "label": "Waiting on author",
   "reason": "jeanpablojp demonstrated that a finalized PSBT response bypasses the unsafe sighash check, and this material finding has been unanswered for 9 days."
  },
  "agreement": {
   "state": "Positive",
   "summary": "Concept ACK from jeanpablojp with an open question about covering finalized responses; author has not replied.",
   "reason": "The direction is supported by jeanpablojp who actively tested edge cases with the new mock, though an author response is needed regarding finalized PSBT handling.",
   "evidence": [
    "jeanpablojp provided a Concept ACK and detailed test findings showing SIGHASH_NONE passing when the mock returns a finalized PSBT"
   ]
  },
  "dependencies": {
   "depends_on": [],
   "enables": [
    "absorbs and supersedes #35358",
    "enables functional testing for multisig and MuSig2 external signer setups"
   ]
  },
  "categories": [
   {
    "name": "wallet",
    "member": true,
    "evidence": "Touches src/external_signer.cpp and external signer functional tests in test/functional/wallet_signer.py.",
    "band": "P2",
    "reason_tag": "fund safety",
    "score": 0.65,
    "factors": {
     "security_stability": 2,
     "bug_severity": 1,
     "performance": 0,
     "user_value": 2,
     "leverage": 2
    },
    "rationale": "P2 because it closes a fund-safety gap where external signers could tamper with transaction outputs or sign with SIGHASH_NONE without wallet detection. As Sjors notes, merging compensates for and thwarts signers dropping outputs, reducing values, or changing scripts, while the revamped mock provides leverage for testing complex wallet signing flows."
   }
  ],
  "confidence": "high",
  "uncertainties": [
   "Whether the author intends to support or reject finalized responses from external signers"
  ],
  "needs": [],
  "card": "This PR hardens external signer PSBT handling in the wallet and revamps the functional test mock signer. By merging the signer's returned PSBT rather than replacing the wallet's PSBT wholesale, and by rejecting unsafe sighash types like SIGHASH_NONE, it protects users from malicious or malfunctioning hardware signers tampering with outputs or fees. The mock signer is upgraded to use an independent offline descriptor wallet, enabling robust tests for misbehaving signers and multisig workflows. The change has Concept ACK from jeanpablojp, who noted that finalized PSBT responses currently bypass the sighash check, with an author reply pending."
 },
 "raw_text": null
}