{
 "number": 36470,
 "input_hash": "969fa12720d8a825",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-27T01:27:35+00:00",
 "result": {
  "summary": "Restructures peer connection order and ping timings in the `p2p_eviction.py` functional test so that peer eviction protection for block-relaying peers is actually exercised. Eviction candidates are connected first and assigned lower ping times than block and transaction relayers using mocktime-controlled pong responses.",
  "problem": "`p2p_eviction.py` passes even if block-time eviction protection is broken or completely disabled. Because block-sending peers were connected first, fallback logic in `CompareNodeBlockTime` protected them as the oldest inbound connections regardless of whether they sent blocks.",
  "card": "Fixes a test flaw in p2p_eviction.py where the test passed even when block-time eviction protection was disabled or bypassed. Because block-relaying peers were connected first, fallback logic in CompareNodeBlockTime protected them as the oldest connections anyway. The test now connects eviction candidate peers first with lower mocktime ping responses so block and transaction protection steps are genuinely required. Test-only change.",
  "evidence": [
   "PR description: \"This can be shown by deleting the line where the peers send their block (L71 on master): block_peer.send_blocks_and_test([block], node, success=True)\" and the test continues to pass."
  ],
  "scope_notes": "",
  "changed_since_previous": "No structural changes; the implementation maintains the approach of connecting eviction candidates first with mocktime-based ping delays.",
  "thread": {
   "last_event_at": "2026-10-26T10:22:51Z",
   "events": 20,
   "head_sha": "2fd9be21e28fecf298493e28e90ccb8085aa4ae8",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": null,
    "id": "",
    "on": "nothing",
    "url": null,
    "what": "all objections and suggestions addressed; PR has ACKs and no pending requests"
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "tests"
   ],
   "why": "A mistake can only cause functional test failures or CI flakiness."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-26",
   "open_concerns": [],
   "resolved_concerns": [
    "instagibbs: the regression test does not catch mutants under libc++ or MSVC due to sort implementation details when peers share a netgroup (fixed by brunoerg 2026-10-14)",
    "maflcko: manual sleeps may cause test unreliability and failures in slow or racy test environments such as QEMU VMs or Bedrock (accepted by maflcko 2026-10-20)",
    "maflcko: connect candidate peers first, then shuffle protected peer types to satisfy mutation testing (answered by brunoerg 2026-10-26)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (trakshan-mishra, maflcko)",
   "reason": "Author responded to maflcko's suggestion about peer connection ordering and mutation testing, opting to keep the current implementation as-is unless other reviewers ask for it.",
   "evidence": [
    "trakshan-mishra: Tested ACK \u2014 verified through mutation testing that the test fails under this PR when block-time protection logic is removed or bypassed, unlike on master where it passes unconditionally",
    "maflcko: ACK \u2014 review ACK c75cdce1f9430cab029a329fd86c7e6bef7bf444",
    "maflcko: ACK \u2014 the test should now be deterministic and twice as fast with mocktime"
   ],
   "objections": [
    {
     "reviewer": "instagibbs",
     "association": "MEMBER",
     "type": "objection",
     "kind": "correctness",
     "harm": "the regression test does not catch mutants under libc++ or MSVC due to sort implementation details when peers share a netgroup",
     "request": "",
     "question": "",
     "text": "the regression test does not catch mutants under libc++ or MSVC due to sort implementation details when peers share a netgroup",
     "clears_with": "change",
     "blocking": true,
     "status": "fixed",
     "status_note": "author force-pushed addressing the issue for libc++/MSVC",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6171829532",
      "rc:4272772180"
     ],
     "evidence": "2026-10-13: 'regression test doesn't fail under mutants for libc++/MSVC due to sort implementation details with all peers falling under the same netgroup'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36470#discussion_r4263718474",
     "id": "rc:4263718474",
     "at": "2026-10-13",
     "status_at": "2026-10-14",
     "status_by": "brunoerg",
     "resolution_evidence": "2026-10-14: brunoerg: 'Force-pushed addressing https://github.com/bitcoin/bitcoin/pull/36470#discussion_r4263718474 to cover the libc++/MSVC ca'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "maflcko",
     "association": "MEMBER",
     "type": "objection",
     "kind": "correctness",
     "harm": "manual sleeps may cause test unreliability and failures in slow or racy test environments such as QEMU VMs or Bedrock",
     "request": "",
     "question": "",
     "text": "manual sleeps may cause test unreliability and failures in slow or racy test environments such as QEMU VMs or Bedrock",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "maflcko confirmed the mocktime fix makes the test deterministic and twice as fast",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "rc:4314300344",
      "rc:4314633299",
      "rc:4314876783",
      "c:6269356668"
     ],
     "evidence": "2026-10-16: 'not sure this is reliable. the tests run also in qemu in vms, which may be slow or racy. Also, if someone runs them in bedrock or similar, this may not hold, so the test may fail?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36470#discussion_r4296725875",
     "id": "rc:4296725875",
     "at": "2026-10-16",
     "status_at": "2026-10-20",
     "status_by": "maflcko",
     "resolution_evidence": "2026-10-20: maflcko: 'The test should now be deterministic and twice as fast with mocktime.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "maflcko",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "connect candidate peers first, then shuffle protected peer types to satisfy mutation testing",
     "question": "",
     "text": "connect candidate peers first, then shuffle protected peer types to satisfy mutation testing",
     "clears_with": "answer",
     "blocking": false,
     "status": "answered",
     "status_note": "author declined to change connection order for now unless other reviewers request it",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:6413679538"
     ],
     "evidence": "2026-10-20: 'Ralph complains, but to make it happy, one would have to first connect candidates peers, then connect shuffle(tx, block, fast-ping)? Not sure if this is worth it or if it makes Ralph happy. Up to you.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36470#issuecomment-6294085754",
     "id": "c:6294085754",
     "at": "2026-10-20",
     "status_at": "2026-10-26",
     "status_by": "brunoerg",
     "resolution_evidence": "2026-10-26: brunoerg: 'I'm not sure is worth, will leave as-is for now unless other reviewers prefer that.'",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "trakshan-mishra",
     "reason": "verified through mutation testing that the test fails under this PR when block-time protection logic is removed or bypassed, unlike on master where it passes unconditionally",
     "substantive": true,
     "verdict": "Tested ACK",
     "id": "c:6079359437",
     "url": "https://github.com/bitcoin/bitcoin/pull/36470#issuecomment-6079359437",
     "at": "2026-10-09",
     "association": "NONE",
     "evidence": "tested",
     "areas": []
    },
    {
     "reviewer": "maflcko",
     "reason": "review ACK c75cdce1f9430cab029a329fd86c7e6bef7bf444",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:6126539076",
     "url": "https://github.com/bitcoin/bitcoin/pull/36470#issuecomment-6126539076",
     "at": "2026-10-12",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "maflcko",
     "reason": "the test should now be deterministic and twice as fast with mocktime",
     "substantive": true,
     "verdict": "ACK",
     "id": "c:6293791542",
     "url": "https://github.com/bitcoin/bitcoin/pull/36470#issuecomment-6293791542",
     "at": "2026-10-20",
     "association": "MEMBER",
     "evidence": "read",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "trakshan-mishra",
     "stance": "support",
     "note": "Tested ACK verifying that the test catches disabled block-time protection via mutation testing",
     "association": "NONE",
     "comments": 1,
     "first": "2026-10-09",
     "last": "2026-10-09"
    },
    {
     "login": "maflcko",
     "stance": "support",
     "note": "review ACKed after mocktime resolved flakiness concerns; noted optional connection ordering suggestion for mutation testing",
     "association": "MEMBER",
     "comments": 8,
     "first": "2026-10-12",
     "last": "2026-10-20"
    },
    {
     "login": "instagibbs",
     "stance": "objection",
     "note": "reported that the test does not catch mutants on libc++/MSVC due to sort implementation details",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-13",
     "last": "2026-10-13"
    },
    {
     "login": "Crypt-iQ",
     "stance": "neutral",
     "note": "noted that a change fixes a scheduling flake in Bedrock",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-16",
     "last": "2026-10-16"
    }
   ],
   "derivation": "substantive support, no open objection (trakshan-mishra, maflcko)",
   "model_state": null,
   "corrections": [],
   "notes": "Author responded to maflcko's suggestion about peer connection ordering and mutation testing, opting to keep the current implementation as-is unless other reviewers ask for it."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "p2p",
    "member": true,
    "evidence": "Modifies test/functional/p2p_eviction.py to properly test connection management and inbound peer eviction protection.",
    "band": "P3",
    "reason_tag": "test coverage",
    "score": 0.35,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 1,
     "user_value": 0
    },
    "rationale": "Fixes a test gap where inbound peer eviction logic for block relayers was completely bypassed due to connection order fallback. As verified by mutation testing, master passed even when block-time protection was removed, which this PR corrects without altering production p2p code."
   },
   {
    "name": "tests",
    "member": false,
    "evidence": "Changes only p2p_eviction.py, a functional test pinning p2p connection management behavior, which belongs to p2p rather than test infrastructure.",
    "band": "Unranked",
    "reason_tag": "test coverage",
    "score": 0.0,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 1,
     "user_value": 0
    },
    "rationale": "The test infrastructure category explicitly excludes tests that pin the behavior of an individual area like p2p."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-27T01:27:35+00:00",
  "code": "2026-10-21T01:23:18+00:00",
  "judgments": 2
 }
}