{
 "number": 36451,
 "input_hash": "31bf09ff01c4b4f3",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-21T01:19:17+00:00",
 "result": {
  "summary": "Replaces nullable `std::unique_ptr` with `util::NotNullUniquePtr` (or plain references) for `CreateNewBlock`, `CreateNewTemplate`, and pimpl members across several subsystems (`AddrMan`, `MuSig2SecNonce`, `TxDownloadManager`, `TxReconciliationTracker`, `TxRequestTracker`, and `CDBWrapper`). It drops redundant null checks and assertions at call sites across tests, mining RPCs, and fee estimation, and expands `NotNull` unit tests with conversion and type-trait checks.",
  "problem": "Pointers that are guaranteed never to be null are typed as standard nullable smart pointers. This obscures the API contract, leaves reviewers unsure whether pointers can be null, and produces dead error-handling branches in test coverage and mutation testing.",
  "card": "Replaces nullable smart pointers with util::NotNullUniquePtr for CreateNewBlock, CreateNewTemplate, and several internal pimpl members across the codebase. Currently, pointers guaranteed to be non-null are exposed as nullable pointers, prompting redundant null checks and dead error-handling branches. The author notes that compile-time non-null guarantees clarify API contracts and eliminate dead branches from coverage and mutation testing reports. No dependencies are declared.",
  "evidence": [
   "Author notes in the description that 'Pointers that are never null still have confusing null checks (with possible error handling return branches), which are always dead in coverage reports or when applying mutation testing.'",
   "Author notes in commit messages that the pimpl and test changes were suggested during review of PR #34844."
  ],
  "scope_notes": "",
  "changed_since_previous": "",
  "thread": {
   "last_event_at": "2026-10-20T06:26:20Z",
   "events": 9,
   "head_sha": "fa0e2f600bf901f7c8d4e1574b4d3ad1e80a5cff",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": null,
    "id": "",
    "on": "nothing",
    "url": null,
    "what": "no pending actions or reviews requested"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "mempool_policy",
    "rpc_api",
    "tests"
   ],
   "why": "If block template generation unexpectedly returned a null pointer, removing the runtime error checks and wrapping in NotNull would cause an immediate crash or assertion failure instead of an error response."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-20",
   "open_concerns": [],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Ready",
   "label": "CI failing",
   "reason": "CI is red; check whether the failure is the PR's before a deep review."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (Sjors)",
   "reason": "Added Concept ACK from Sjors. Sjors's inline remarks regarding commit splitting and the explicit constructor are non-items as commit splitting is not an item and the constructor comment explicitly affirms the current code is fine.",
   "evidence": [
    "sedited: Concept ACK",
    "stickies-v: Concept ACK",
    "Sjors: Concept ACK \u2014 at least in the context of `CreateNewBlock` in fa0e2f600bf901f7c8d4e1574b4d3ad1e80a5cff it adds much useful clarity"
   ],
   "objections": [],
   "support": [
    {
     "reviewer": "sedited",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6037352080",
     "url": "https://github.com/bitcoin/bitcoin/pull/36451#issuecomment-6037352080",
     "at": "2026-10-07",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "stickies-v",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6038861130",
     "url": "https://github.com/bitcoin/bitcoin/pull/36451#issuecomment-6038861130",
     "at": "2026-10-07",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "Sjors",
     "reason": "at least in the context of `CreateNewBlock` in fa0e2f600bf901f7c8d4e1574b4d3ad1e80a5cff it adds much useful clarity",
     "substantive": true,
     "verdict": "Concept ACK",
     "id": "r:5580502120",
     "url": "https://github.com/bitcoin/bitcoin/pull/36451#pullrequestreview-5580502120",
     "at": "2026-10-20",
     "association": "MEMBER",
     "evidence": "read",
     "areas": [
      "CreateNewBlock"
     ]
    }
   ],
   "participants": [
    {
     "login": "sedited",
     "stance": "support",
     "note": "Concept ACK",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-07",
     "last": "2026-10-07"
    },
    {
     "login": "stickies-v",
     "stance": "support",
     "note": "Concept ACK",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-07",
     "last": "2026-10-07"
    },
    {
     "login": "hebasto",
     "stance": "neutral",
     "note": "shared an MRE regarding MSVC compiler support",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-14",
     "last": "2026-10-14"
    },
    {
     "login": "Sjors",
     "stance": "support",
     "note": "Concept ACK; commented on commit structure and NotNull explicitness",
     "association": "MEMBER",
     "comments": 3,
     "first": "2026-10-20",
     "last": "2026-10-20"
    }
   ],
   "derivation": "substantive support, no open objection (Sjors)",
   "model_state": null,
   "corrections": [],
   "notes": "Added Concept ACK from Sjors. Sjors's inline remarks regarding commit splitting and the explicit constructor are non-items as commit splitting is not an item and the constructor comment explicitly affirms the current code is fine."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "ipc",
    "member": false,
    "evidence": "Touches IPC files only incidentally to apply the NotNull wrapper to interfaces; does not change IPC architecture or transport.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Not an IPC PR as mechanical adoption of utility types across interface boundaries does not constitute IPC-specific work."
   },
   {
    "name": "mempool",
    "member": false,
    "evidence": "Touches src/policy/fees/mempool_estimator.cpp merely to drop a single redundant check following the interface change elsewhere.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Mechanical call-site adjustment that follows from changes elsewhere does not constitute membership in mempool."
   },
   {
    "name": "mining",
    "member": true,
    "evidence": "Modifies CreateNewBlock and BlockTemplateManager interfaces across src/node/miner.h, src/node/miner.cpp, and src/node/block_template_manager.h/cpp.",
    "band": "P4",
    "reason_tag": "cleanup",
    "score": 0.2,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Clarifies non-null semantics for block template construction without changing mining behavior or template validity. Sjors notes that 'in the context of CreateNewBlock... it adds much useful clarity', but internal typing improvements and removal of dead null checks remain low-priority cleanup."
   },
   {
    "name": "p2p",
    "member": true,
    "evidence": "Changes pimpl member declarations in p2p subsystem headers src/addrman.h, src/node/txdownloadman.h, src/node/txreconciliation.h, and src/txrequest.h.",
    "band": "P4",
    "reason_tag": "cleanup",
    "score": 0.15,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Replaces standard unique_ptr wrappers with NotNullUniquePtr for pimpl members across p2p classes. This is purely internal type hygiene with no effect on network behavior, protocol handling, or attack resistance."
   },
   {
    "name": "rpc",
    "member": false,
    "evidence": "Only adjusts src/rpc/mining.cpp to remove redundant null assertions on CreateNewBlock results.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Adjusts a call site inside an existing RPC without modifying RPC interfaces, arguments, or returned data."
   },
   {
    "name": "tests",
    "member": false,
    "evidence": "Touches test files and adds unit checks in src/test/util_not_null_tests.cpp for a generic utility class.",
    "band": "Unranked",
    "reason_tag": "test coverage",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Updates tests for general utility NotNull rather than modifying testing infrastructure or test harnesses."
   },
   {
    "name": "utils",
    "member": true,
    "evidence": "Adds unit tests for `NotNull` utility semantics and applies the wrapper across codebases to eliminate redundant null checks.",
    "band": "P4",
    "reason_tag": "cleanup",
    "score": 0.2,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Internal refactoring to express pointer non-null contracts and eliminate dead branches in mutation testing and coverage reports. Addresses code clarity and dead check removal without affecting runtime safety or external behavior."
   },
   {
    "name": "validation",
    "member": false,
    "evidence": "Touches src/dbwrapper.h to update a pimpl pointer type.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Validation explicitly excludes structural refactors that pass through database headers without changing validation logic or behavior."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-21T01:19:17+00:00",
  "code": "2026-10-09T01:22:07+00:00",
  "judgments": 8
 }
}