{
 "number": 36587,
 "input_hash": "3fc6acac2dc25133",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-29T01:23:31+00:00",
 "result": {
  "summary": "Fixes functional test failures in `interface_ipc*.py` on NetBSD by adjusting `-maxconnections` for nodes using IPC, and prevents future file descriptor budget regressions by adding an FD limit to the macOS CI task. Specifically, it lowers `-maxconnections` by 17 slots (one listening socket plus 16 client connections) when `-ipcbind` is enabled, and wraps node processes in the native macOS CI job with `ulimit -n 256` to mimic NetBSD's `FD_SETSIZE` constraint.",
  "problem": "On select()-based platforms like NetBSD, the total available file descriptors cannot exceed `FD_SETSIZE` (256). When `-ipcbind` was introduced, its 17 reserved file descriptors pushed the test framework's node startup requirements over 256, causing `bitcoind` to warn about reducing `-maxconnections`, which the test framework treats as a fatal test failure. Because NetBSD only runs in nightly CI, such FD budget regressions recur and go undetected in per-PR CI runs.",
  "card": "This PR fixes `interface_ipc*.py` test failures on NetBSD and adds CI enforcement to prevent similar regressions before merging. When IPC is enabled, socket and client connection reservations push bitcoind beyond NetBSD's 256 FD limit when paired with the test suite's default connection count, producing startup warnings that fail the tests. The PR subtracts IPC reservations from `-maxconnections` on IPC-enabled nodes and adds an `RLIMIT_NOFILE` wrapper to the macOS CI job to enforce the 256 FD limit on standard PR checks.",
  "evidence": [
   "PR description links to failures on NetBSD: \"This PR fixes the `interface_ipc*.py` tests, which have been failing on NetBSD since https://github.com/bitcoin/bitcoin/pull/35037.\"",
   "Commit 62571e7e67 notes: \"Since -ipcbind reserves one listening socket plus ipc::DEFAULT_MAX_CONNECTIONS (16) client slots in min_required_fds, the framework's -maxconnections=76 no longer fits the 256 file descriptor budget on NetBSD, and every interface_ipc*.py node starts with 'Warning: Reducing -maxconnections ...', which the framework treats as a failure.\"",
   "Author notes recurring regression pattern in PR description and commit 311bc7c3bb, citing prior fixes in PR #31537 and PR #36078 that were only caught post-merge by nightly NetBSD CI."
  ],
  "scope_notes": "",
  "changed_since_previous": "",
  "thread": {
   "last_event_at": "2026-10-28T06:08:36Z",
   "events": 3,
   "head_sha": "311bc7c3bb274c7065f871198fa0910c205b8a6a",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-28",
    "id": "c:6460646505",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36587#issuecomment-6460646505",
    "what": "address loss of coverage for infinite file descriptors raised by Sjors"
   },
   {
    "at": "2026-10-28",
    "id": "rc:4397446883",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36587#discussion_r4397446883",
    "what": "reply to maflcko's suggestion regarding pipefail and nounset"
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "tests"
   ],
   "why": "Changes are strictly confined to test framework configuration and CI shell scripts."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-28",
   "open_concerns": [
    "Sjors: wrap-fd-limit.sh loses CI coverage for \"infinite\" file descriptors introduced by #34937",
    "maflcko: explicitly set pipefail and nounset in wrap-fd-limit.sh"
   ],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Blocked",
   "summary": "Blocked: objection that needs a change, nobody has replied (Sjors)",
   "reason": "Sjors gave a Concept ACK while noting that wrap-fd-limit.sh loses test coverage for infinite file descriptors introduced by #34937, offering a diff to run feature_init.py uncapped as well. maflcko suggested setting pipefail and nounset in the wrapper script.",
   "evidence": [
    "Sjors (objection, correctness, must be changed, open): wrap-fd-limit.sh loses CI coverage for \"infinite\" file descriptors introduced by #34937",
    "maflcko (suggestion, safety, must be answered, open): explicitly set pipefail and nounset in wrap-fd-limit.sh",
    "Sjors: Concept ACK"
   ],
   "objections": [
    {
     "reviewer": "Sjors",
     "association": "MEMBER",
     "type": "objection",
     "kind": "correctness",
     "harm": "wrap-fd-limit.sh loses CI coverage for \"infinite\" file descriptors introduced by #34937",
     "request": "",
     "question": "",
     "text": "wrap-fd-limit.sh loses CI coverage for \"infinite\" file descriptors introduced by #34937",
     "clears_with": "change",
     "blocking": true,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-28: 'loses our coverage for \"infinite\" file descriptors introduced by #34937'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36587#issuecomment-6460646505",
     "id": "c:6460646505",
     "at": "2026-10-28",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "maflcko",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "safety",
     "harm": "",
     "request": "explicitly set pipefail and nounset in wrap-fd-limit.sh",
     "question": "",
     "text": "explicitly set pipefail and nounset in wrap-fd-limit.sh",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-28: 'missing pipefail and nounset? I guess the script may fail anyway when nounset is hit, but can't hurt to be explicit here'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36587#discussion_r4397446883",
     "id": "rc:4397446883",
     "at": "2026-10-28",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "Sjors",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6460646505",
     "url": "https://github.com/bitcoin/bitcoin/pull/36587#issuecomment-6460646505",
     "at": "2026-10-28",
     "association": "MEMBER",
     "evidence": "read",
     "areas": [
      "ci/test/wrap-fd-limit.sh",
      "ci/test/03_test_script.sh"
     ]
    }
   ],
   "participants": [
    {
     "login": "Sjors",
     "stance": "objection",
     "note": "Concept ACK, but noted loss of test coverage for infinite file descriptors",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-28",
     "last": "2026-10-28"
    },
    {
     "login": "maflcko",
     "stance": "neutral",
     "note": "suggested adding pipefail and nounset to wrap-fd-limit.sh",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-28",
     "last": "2026-10-28"
    }
   ],
   "derivation": "objection that needs a change, nobody has replied (Sjors)",
   "model_state": null,
   "corrections": [],
   "notes": "Sjors gave a Concept ACK while noting that wrap-fd-limit.sh loses test coverage for infinite file descriptors introduced by #34937, offering a diff to run feature_init.py uncapped as well. maflcko suggested setting pipefail and nounset in the wrapper script."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "build",
    "member": true,
    "evidence": "Adds `ci/test/wrap-fd-limit.sh` and updates CI test scripts to enforce an FD budget in the macOS native CI job.",
    "band": "P3",
    "reason_tag": "platform fix",
    "score": 0.35,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "The change adds file descriptor limit wrapping to macOS CI to catch NetBSD-specific FD limit regressions in per-PR runs instead of waiting for nightly CI. This improves CI test coverage for a recurring failure mode across platforms, though it does not address core build or release integrity."
   },
   {
    "name": "tests",
    "member": true,
    "evidence": "Labeled 'Tests' and changes test framework node startup logic in `test/functional/test_framework/util.py` and `test_framework/test_node.py`.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.4,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "The PR fixes a recurring functional test failure in `interface_ipc*.py` on NetBSD caused by `-ipcbind` file descriptors exceeding the `FD_SETSIZE` (256) limit. This restores passing test signal on NetBSD nightly runs by adjusting framework max connection limits."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-29T01:23:31+00:00",
  "code": "2026-10-23T01:20:26+00:00",
  "judgments": 2
 }
}