{
 "number": 35600,
 "input_hash": "2d2d3d7778c4c4c8",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T16:19:32+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 15111,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 2701
 },
 "cost_usd": 0.021462,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Prevent duplicate manual P2P connections when -connect and -addnode race during startup."
   ],
   "reviewability": [
    "Ready for review.",
    "No open blocking reviewer requests or conflicts."
   ],
   "agreement": [
    "Positive concept support with no objections (sedited, w0xlt)."
   ],
   "categories": [
    {
     "name": "p2p",
     "why": [
      "P3 because it fixes an edge-case race where concurrent manual dials open duplicate sockets to the same target.",
      "The issue requires overlapping manual connection settings or concurrent RPC dials and does not affect regular outbound relay."
     ]
    }
   ]
  },
  "summary": "Tracks in-flight manual connection attempts in CConnman to prevent duplicate connections to the same target. Existing deduplication checks inspect connected peers in m_nodes only after a connection is established, allowing concurrent manual connection attempts to bypass checks. A functional regression test is also added.",
  "problem": "When -connect and -addnode are configured for the same destination, startup threads can race to connect concurrently and create duplicate sockets to the same peer before either node is inserted into m_nodes.",
  "discussion": {
   "open_concerns": [],
   "resolved_concerns": [],
   "author_status": "active"
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "The code is clean, CI passes, and there are no outstanding reviewer requests."
  },
  "agreement": {
   "state": "Positive",
   "summary": "Positive: Concept ACKs from sedited and w0xlt with no objections.",
   "reason": "Two contributors provided Concept ACKs with no objections or criticisms raised.",
   "evidence": [
    "sedited left a Concept ACK on 2026-07-24",
    "w0xlt left a Concept ACK on 2026-08-18"
   ]
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "p2p",
    "member": true,
    "evidence": "Modifies manual connection tracking in CConnman in src/net.cpp and src/net.h.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.35,
    "factors": {
     "security_stability": 1,
     "bug_severity": 1,
     "performance": 0,
     "user_value": 1,
     "leverage": 0
    },
    "rationale": "P3 because it fixes an edge-case race condition in manual connection management where concurrent dials connect twice to the same address. As noted in the description, '-connect and -addnode can both try to open the same manual connection during startup' and 'two concurrent manual dial attempts can both pass the checks and create duplicate connections'. While resolving long-standing issue #5299, the failure requires overlapping manual connection configuration and does not threaten normal network operation."
   },
   {
    "name": "tests",
    "member": false,
    "evidence": "Adds a functional test for P2P connection logic and registers it in test_runner.py, rather than changing the test framework itself.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "The functional test exercises P2P connection handling and belongs under the p2p category."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "This PR prevents duplicate manual P2P connections by reserving in-flight destinations in OpenNetworkConnection until the connection succeeds or fails. Currently, concurrent manual connection attempts (such as specifying both -connect and -addnode for the same peer at startup) can race past existing m_nodes deduplication checks before either socket completes. The problem primarily affects node operators with overlapping manual connection configurations, addressing long-standing issue #5299. The PR is ready for review with positive concept ACKs and no objections."
 },
 "raw_text": null
}