{
 "number": 36406,
 "input_hash": "52ef6586edbec552",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-08T01:17:31+00:00",
 "result": {
  "summary": "Fixes `test_orphan_inherit_rejection` in `p2p_orphan_handling.py` so getdata checks actually test node behavior. It enforces integer types in `PeerTxRelayer.assert_never_requested`, passes integer transaction hashes from the test, advances mocktime so delayed orphan parent requests can arrive, and switches the parent-relaying peer.",
  "problem": "`assert_never_requested` compares its argument to getdata inv hashes, which are Python integers. The test passed hex strings, causing the equality check `int == str` to always evaluate to `False` and assertions to pass unconditionally even if the node erroneously requested the transactions.",
  "card": "Fixes a bug in the p2p_orphan_handling functional test where assertions passed hex strings instead of integers to assert_never_requested. Because an integer never equals a string in Python, these checks passed vacuously regardless of what the node actually requested. The PR passes integers, enforces the integer type in the helper, switches the initial relaying peer, and advances mocktime so requests can trigger and regressions are caught. This is test-only code fixing non-functional test assertions with low risk.",
  "evidence": [
   "Commit a3c4ad12e9: 'PeerTxRelayer.assert_never_requested compares the hash of every request received, an int, with its argument, and test_orphan_inherit_rejection passed it hex strings. An int never equals a str, so these checks passed whatever the node requested.'",
   "Author verified that mutating the test scenario to trigger requests caused the old string checks to still pass while the new integer checks properly failed."
  ],
  "scope_notes": "",
  "changed_since_previous": "Adds an explicit `isinstance(txhash, int)` type assertion inside `PeerTxRelayer.assert_never_requested` to prevent caller type mismatches.",
  "thread": {
   "last_event_at": "2026-10-02T15:10:32Z",
   "events": 5,
   "head_sha": "5f22014aca2d071edfea95e8d3d4ba0bebbc57ca",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": null,
    "id": "",
    "on": "nothing",
    "url": null,
    "what": ""
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "tests"
   ],
   "why": "Touches only functional test assertion logic; test failures would affect CI but cannot impact production node behavior."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-02",
   "open_concerns": [],
   "resolved_concerns": [
    "instagibbs: Add an assertion in assert_never_requested ensuring txhash is an int to avoid future misuse (accepted by instagibbs 2026-10-02)",
    "instagibbs: Use txid_int directly to be less verbose (accepted by instagibbs 2026-10-02)",
    "instagibbs: Add a brief comment explaining why relaying from peer2 (accepted by instagibbs 2026-10-02)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (instagibbs)",
   "reason": "Initial record. Reviewer instagibbs supported the PR with suggestions (an explanatory comment, an isinstance assertion, and a minor syntax simplification), all of which were implemented and ACKed. / Initial review by instagibbs provided suggestions that the author promptly addressed, followed by a commit ACK.",
   "evidence": [
    "instagibbs: ACK \u2014 ACK https://github.com/bitcoin/bitcoin/pull/36406/commits/5f22014aca2d071edfea95e8d3d4ba0bebbc57ca",
    "instagibbs: Concept ACK \u2014 good catches"
   ],
   "objections": [
    {
     "reviewer": "instagibbs",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "safety",
     "harm": "",
     "request": "Add an assertion in assert_never_requested ensuring txhash is an int to avoid future misuse",
     "question": "",
     "text": "Add an assertion in assert_never_requested ensuring txhash is an int to avoid future misuse",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author added the assertion in a separate commit and reviewer ACKed",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:5955289311"
     ],
     "evidence": "2026-10-02: 'Could we add this to `assert_never_requested` to remove the footgun and find misuse elsewhere going forward'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36406#pullrequestreview-5392430098",
     "id": "r:5392430098",
     "at": "2026-10-02",
     "status_at": "2026-10-02",
     "status_by": "instagibbs",
     "resolution_evidence": "2026-10-02: instagibbs: 'ACK https://github.com/bitcoin/bitcoin/pull/36406/commits/5f22014aca2d071edfea95e8d3d4ba0bebbc57ca'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "instagibbs",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "style",
     "harm": "",
     "request": "Use txid_int directly to be less verbose",
     "question": "",
     "text": "Use txid_int directly to be less verbose",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author adopted the suggestion using x['tx'].txid_int and reviewer ACKed",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:5955289311"
     ],
     "evidence": "2026-10-02: 'think this works here and elsewhere and is less verbose'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36406#discussion_r4166216883",
     "id": "rc:4166216883",
     "at": "2026-10-02",
     "status_at": "2026-10-02",
     "status_by": "instagibbs",
     "resolution_evidence": "2026-10-02: instagibbs: 'ACK https://github.com/bitcoin/bitcoin/pull/36406/commits/5f22014aca2d071edfea95e8d3d4ba0bebbc57ca'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "instagibbs",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "Add a brief comment explaining why relaying from peer2",
     "question": "",
     "text": "Add a brief comment explaining why relaying from peer2",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author added the explanatory comment and reviewer ACKed",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:5955289311"
     ],
     "evidence": "2026-10-02: 'since we're changing this to peer2, and it's non-obvious, very brief comment why?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36406#discussion_r4166217180",
     "id": "rc:4166217180",
     "at": "2026-10-02",
     "status_at": "2026-10-02",
     "status_by": "instagibbs",
     "resolution_evidence": "2026-10-02: instagibbs: 'ACK https://github.com/bitcoin/bitcoin/pull/36406/commits/5f22014aca2d071edfea95e8d3d4ba0bebbc57ca'",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "instagibbs",
     "reason": "ACK https://github.com/bitcoin/bitcoin/pull/36406/commits/5f22014aca2d071edfea95e8d3d4ba0bebbc57ca",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:5955357196",
     "url": "https://github.com/bitcoin/bitcoin/pull/36406#issuecomment-5955357196",
     "at": "2026-10-02",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "instagibbs",
     "reason": "good catches",
     "substantive": true,
     "verdict": "Concept ACK",
     "id": "r:5392430098",
     "url": "https://github.com/bitcoin/bitcoin/pull/36406#pullrequestreview-5392430098",
     "at": "2026-10-02",
     "association": "MEMBER",
     "evidence": "read",
     "areas": [
      "test/functional/p2p_orphan_handling.py"
     ]
    }
   ],
   "participants": [
    {
     "login": "instagibbs",
     "stance": "support",
     "note": "concept ACKed, suggested an assertion, code comment, and syntax tweak, then ACKed the push",
     "association": "MEMBER",
     "comments": 4,
     "first": "2026-10-02",
     "last": "2026-10-02"
    }
   ],
   "derivation": "substantive support, no open objection (instagibbs)",
   "model_state": null,
   "corrections": [],
   "notes": "Initial record. Reviewer instagibbs supported the PR with suggestions (an explanatory comment, an isinstance assertion, and a minor syntax simplification), all of which were implemented and ACKed. / Initial review by instagibbs provided suggestions that the author promptly addressed, followed by a commit ACK."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "p2p",
    "member": true,
    "evidence": "Touches test/functional/p2p_orphan_handling.py, testing p2p transaction relay and orphan request handling.",
    "band": "P3",
    "reason_tag": "test coverage",
    "score": 0.35,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Fixes broken `assert_never_requested` checks in `p2p_orphan_handling.py` that were comparing integers to hex strings and therefore unconditionally passing. Commit a3c4ad12e9 explains that because `int never equals a str`, 'these checks passed whatever the node requested.' Enforcing integer types and advancing mocktime restores meaningful test coverage for orphan request rejection without modifying node behavior."
   },
   {
    "name": "tests",
    "member": false,
    "evidence": "Changes only test/functional/p2p_orphan_handling.py; tests specific to one area belong to that area rather than test infrastructure.",
    "band": "Unranked",
    "reason_tag": "test coverage",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "This PR modifies an area-specific functional test rather than shared test runners, harnesses, or framework utilities."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-08T01:17:31+00:00",
  "code": "2026-10-03T01:29:03+00:00",
  "judgments": 2
 }
}