{
 "number": 36326,
 "input_hash": "70b4fecbd71aa556",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-12T01:22:10+00:00",
 "result": {
  "summary": "Replaces string-based fatal and flush error notifications in the kernel interface with typed data structures. It introduces kernel::FlushError as an enum and kernel::FatalError as a std::variant of context-bearing structs, moving string generation and translation into the node layer. It also updates the kernel C API callbacks to pass numeric error codes rather than formatted message strings.",
  "problem": "kernel::Notifications::fatalError() and flushError() take bilingual_str arguments, which pulls util/translation.h and application-level translation machinery into libbitcoinkernel where UI string formatting does not belong.",
  "card": "Refactors kernel fatal and flush error notifications to use typed representations instead of translated bilingual_str objects. Defines kernel::FlushError as an enum and kernel::FatalError as a variant of context structs, moving user-facing string construction and translation out of the kernel and into the node application layer. Kernel C API callbacks are modified to emit numeric error codes rather than strings. This is a step toward decoupling libbitcoinkernel from util/translation.h as tracked in #27587.",
  "evidence": [
   "Part of tracking issue #27587 ('Bitcoin Kernel Library Project Tracking'), specifically the task to 'Remove translation.h usage from the kernel'.",
   "Commit cdd4757706 notes that std::visit keeps the node's message table exhaustive when rendering kernel::FatalError."
  ],
  "scope_notes": "Changes the C API btck_NotificationInterfaceCallbacks signatures for flush_error and fatal_error by replacing (const char* message, size_t message_len) with enum error codes.",
  "changed_since_previous": "Added node::KernelNotifications::abort() for non-kernel aborts, dropped FailedToStartIndexes from the kernel fatal error set since init.cpp is application code, and structured snapshot coins DB rename failures into a typed CoinsDbRenameFailed struct.",
  "thread": {
   "last_event_at": "2026-10-11T09:41:29Z",
   "events": 13,
   "head_sha": "8a5934f7d28204270c56f445519c6f66259c1df8",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-09",
    "id": "rc:4226931573",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36326#discussion_r4226931573",
    "what": "reply to yuvicc's review comment on C API callbacks losing error details"
   },
   {
    "at": "2026-10-11",
    "id": "c:6107685559",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-6107685559",
    "what": "respond to Yudis-bit's suggestions on Assume(false) in FatalErrorString and C API error notification format"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "validation"
   ],
   "why": "Touches fatal error handling and abort logic across block storage and chainstate validation paths; a bug could mishandle disk write failures or corrupt shutdown behavior."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-11",
   "open_concerns": [
    "ryanofsky: btck_NotifyFatalError and btck_NotifyFlushError lose all error details because messages are replaced by numeric codes, leaving kernel applications without a clean way to extract and present error information to users.",
    "yuvicc: Reducing fatal error variants to error codes loses error details, preventing C API callback consumers from reconstructing the underlying cause.",
    "Yudis-bit: Add Assume(false) before the fallthrough return {} in FatalErrorString in validation.cpp to catch accidental use of the other variants in debug builds.",
    "Yudis-bit: Pass both the error code and the formatted message in btck_NotifyFatalError, mirroring btck_NotifyWarningSet, to preserve dynamic error details for C API consumers."
   ],
   "resolved_concerns": [
    "ryanofsky: Has removing translation.h been discussed somewhere, and what is the overarching strategy for kernel error messages? (accepted by ryanofsky 2026-09-25)",
    "ryanofsky: Removing translation.h provides no significant benefit and replacing it with structural error representations imposes costs on developers and users through code complexity or vague error messages. (accepted by ryanofsky 2026-09-25)"
   ]
  },
  "reviewability": {
   "state": "Paused",
   "label": "Waiting on author",
   "reason": "Open objections from Yudis-bit, yuvicc with no author reply for 21 days; review would repeat what has been asked."
  },
  "agreement": {
   "state": "Mild",
   "summary": "Mild: objection that needs a change was answered, no reply from the objector (ryanofsky: btck_NotifyFatalError and btck_NotifyFlushError lose all error details because messages are replaced by numeric codes, l); objection that needs an answer has none yet (yuvicc)",
   "reason": "Added participant Yudis-bit and two suggestions from c:6107685559 proposing Assume(false) in FatalErrorString and providing both code and formatted message in btck_NotifyFatalError.",
   "evidence": [
    "ryanofsky (objection, interface, must be changed, answered): btck_NotifyFatalError and btck_NotifyFlushError lose all error details because messages are replaced by numeric codes, leaving kernel applications without a clean way to extract and present error information to users.",
    "yuvicc (objection, interface, must be answered, open): Reducing fatal error variants to error codes loses error details, preventing C API callback consumers from reconstructing the underlying cause.",
    "Yudis-bit (suggestion, safety, must be answered, open): Add Assume(false) before the fallthrough return {} in FatalErrorString in validation.cpp to catch accidental use of the other variants in debug builds.",
    "Yudis-bit (suggestion, interface, must be answered, open): Pass both the error code and the formatted message in btck_NotifyFatalError, mirroring btck_NotifyWarningSet, to preserve dynamic error details for C API consumers.",
    "sedited: Concept ACK \u2014 Concept ACK :)",
    "yuvicc: Concept ACK \u2014 I haven\u2019t looked into this in depth yet. I\u2019ll try to review it more closely alongside https://github.com/bitcoin/bitcoin/pull/35646. Meanwhile, I've left some nits."
   ],
   "objections": [
    {
     "reviewer": "ryanofsky",
     "association": "MEMBER",
     "type": "objection",
     "kind": "approach",
     "harm": "Has removing translation.h been discussed somewhere, and what is the overarching strategy for kernel error messages?",
     "request": "",
     "question": "",
     "text": "Has removing translation.h been discussed somewhere, and what is the overarching strategy for kernel error messages?",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author explained background and scope, and ryanofsky apologized for initial reaction and agreed with the PR's direction",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:5835018112"
     ],
     "evidence": "2026-09-24: 'Has this been discussed somewhere? Do we want to have no ability for the kernel to show detailed translated messages when something fails in the kernel'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-5816461348",
     "id": "c:5816461348",
     "at": "2026-09-24",
     "status_at": "2026-09-25",
     "status_by": "ryanofsky",
     "resolution_evidence": "2026-09-25: ryanofsky: 'Thanks, and I want apologize because my last comment was just based on an initial reaction and not very constructive. I '",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "ryanofsky",
     "association": "MEMBER",
     "type": "objection",
     "kind": "approach",
     "harm": "Removing translation.h provides no significant benefit and replacing it with structural error representations imposes costs on developers and users through code complexity or vague error messages.",
     "request": "",
     "question": "",
     "text": "Removing translation.h provides no significant benefit and replacing it with structural error representations imposes costs on developers and users through code complexity or vague error messages.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author clarified error set size and message preservation in the node; ryanofsky accepted the structured error approach and found the changes reasonable",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:5835018112"
     ],
     "evidence": "2026-09-24: 'I don't see significant benefits to removing it and don't think it should be a goal to remove.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-5816461348",
     "id": "c:5816461348#2",
     "at": "2026-09-24",
     "status_at": "2026-09-25",
     "status_by": "ryanofsky",
     "resolution_evidence": "2026-09-25: ryanofsky: 'looking at actual changes in this PR they seem reasonable, and like something that could be built on to fix other proble'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "ryanofsky",
     "association": "MEMBER",
     "type": "objection",
     "kind": "interface",
     "harm": "btck_NotifyFatalError and btck_NotifyFlushError lose all error details because messages are replaced by numeric codes, leaving kernel applications without a clean way to extract and present error information to users.",
     "request": "",
     "question": "",
     "text": "btck_NotifyFatalError and btck_NotifyFlushError lose all error details because messages are replaced by numeric codes, leaving kernel applications without a clean way to extract and present error information to users.",
     "clears_with": "change",
     "blocking": true,
     "status": "answered",
     "status_note": "author updated PR description explaining the C API limitation",
     "cleared": false,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:5846207782"
     ],
     "evidence": "2026-09-25: 'The one thing I would change is that it seems like btck_NotifyFatalError and btck_NotifyFlushError are losing all details about errors that occur because messages are being replaced by codes. This see'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-5840933870",
     "id": "c:5840933870",
     "at": "2026-09-25",
     "status_at": "2026-09-26",
     "status_by": "arejula27",
     "resolution_evidence": "2026-09-26: arejula27: 'I have updated the PR description, hope it is what you wanted.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "yuvicc",
     "association": "CONTRIBUTOR",
     "type": "objection",
     "kind": "interface",
     "harm": "Reducing fatal error variants to error codes loses error details, preventing C API callback consumers from reconstructing the underlying cause.",
     "request": "",
     "question": "",
     "text": "Reducing fatal error variants to error codes loses error details, preventing C API callback consumers from reconstructing the underlying cause.",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-09: 'I think with this change this method reduces each variant to an error code losing the error details (block hash, paths, snapshot recovery info). For e.g.  `SystemErrorWhileSavingBlock` now reports onl'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#discussion_r4226931573",
     "id": "rc:4226931573",
     "at": "2026-10-09",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "Yudis-bit",
     "association": "NONE",
     "type": "suggestion",
     "kind": "safety",
     "harm": "",
     "request": "Add Assume(false) before the fallthrough return {} in FatalErrorString in validation.cpp to catch accidental use of the other variants in debug builds.",
     "question": "",
     "text": "Add Assume(false) before the fallthrough return {} in FatalErrorString in validation.cpp to catch accidental use of the other variants in debug builds.",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-11: 'Having an Assume(false) before the fallthrough return {}; would catch any accidental use of those variants in FatalError(notifications, state, ...) in debug builds, preventing BlockValidationState::Error() from silently absorbing an empty reject reason.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-6107685559",
     "id": "c:6107685559",
     "at": "2026-10-11",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "Yudis-bit",
     "association": "NONE",
     "type": "suggestion",
     "kind": "interface",
     "harm": "",
     "request": "Pass both the error code and the formatted message in btck_NotifyFatalError, mirroring btck_NotifyWarningSet, to preserve dynamic error details for C API consumers.",
     "question": "",
     "text": "Pass both the error code and the formatted message in btck_NotifyFatalError, mirroring btck_NotifyWarningSet, to preserve dynamic error details for C API consumers.",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-11: 'For btck_NotifyFatalError, passing both the code and the formatted message would mirror btck_NotifyWarningSet, which already supplies both btck_Warning warning and (const char* message, size_t message_len). That preserves programmatic dispatch for C consumers without dropping dynamic details like paths or block hashes.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-6107685559",
     "id": "c:6107685559#2",
     "at": "2026-10-11",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "sedited",
     "reason": "Concept ACK :)",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:5814588408",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#issuecomment-5814588408",
     "at": "2026-09-24",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "yuvicc",
     "reason": "I haven\u2019t looked into this in depth yet. I\u2019ll try to review it more closely alongside https://github.com/bitcoin/bitcoin/pull/35646. Meanwhile, I've left some nits.",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "r:5465955822",
     "url": "https://github.com/bitcoin/bitcoin/pull/36326#pullrequestreview-5465955822",
     "at": "2026-10-09",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "ryanofsky",
     "stance": "objection",
     "note": "agreed with structured error approach but objected to C API callbacks losing error message details",
     "association": "MEMBER",
     "comments": 2,
     "first": "2026-09-24",
     "last": "2026-09-25"
    },
    {
     "login": "sedited",
     "stance": "support",
     "note": "Concept ACK",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-09-24",
     "last": "2026-09-24"
    },
    {
     "login": "yuvicc",
     "stance": "objection",
     "note": "Concept ACK, but objected that C API callbacks lose error details",
     "association": "CONTRIBUTOR",
     "comments": 7,
     "first": "2026-10-09",
     "last": "2026-10-09"
    },
    {
     "login": "Yudis-bit",
     "stance": "neutral",
     "note": "suggested Assume(false) in FatalErrorString and passing both code and formatted message in btck_NotifyFatalError",
     "association": "NONE",
     "comments": 1,
     "first": "2026-10-11",
     "last": "2026-10-11"
    }
   ],
   "derivation": "objection that needs a change was answered, no reply from the objector (ryanofsky: btck_NotifyFatalError and btck_NotifyFlushError lose all error details because messages are replaced by numeric codes, l); objection that needs an answer has none yet (yuvicc)",
   "model_state": null,
   "corrections": [],
   "notes": "Added participant Yudis-bit and two suggestions from c:6107685559 proposing Assume(false) in FatalErrorString and providing both code and formatted message in btck_NotifyFatalError."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "kernel",
    "member": true,
    "evidence": "Modifies src/kernel/ and the C API (src/kernel/bitcoinkernel.cpp) to decouple error notifications from translation machinery.",
    "band": "P2",
    "reason_tag": "unblocks #27587",
    "score": 0.6,
    "factors": {
     "bug_severity": 0,
     "leverage": 2,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Replaces string-based error notifications across the kernel boundary with typed data structures to eliminate node translation dependencies. As noted in the description, this directly advances tracking issue #27587 by removing `translation.h` usage from libbitcoinkernel, which represents core boundary decoupling work for the project."
   },
   {
    "name": "mempool",
    "member": false,
    "evidence": "Does not touch mempool rules, data structures, or transaction acceptance.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 2,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "No mempool behavior or interfaces are altered."
   },
   {
    "name": "tools",
    "member": false,
    "evidence": "Mechanical update to src/bitcoin-chainstate.cpp to accommodate the updated kernel error interface.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 2,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Changes to bitcoin-chainstate are purely downstream adaptations of the kernel error interface."
   },
   {
    "name": "utils",
    "member": false,
    "evidence": "Changes error representation specifically at the kernel boundary rather than shared general utilities.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 2,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "The category explicitly excludes changes whose subject is the kernel API."
   },
   {
    "name": "validation",
    "member": false,
    "evidence": "Touches src/validation.cpp and src/validation.h solely to pass typed error notifications to the kernel interface.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 2,
     "performance": 0,
     "security_stability": 0,
     "user_value": 0
    },
    "rationale": "Despite the Validation label, the category excludes refactors whose primary subject is the kernel library boundary and which do not substantively change consensus rules or chainstate logic."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-12T01:22:10+00:00",
  "code": "2026-10-10T01:25:25+00:00",
  "judgments": 5
 }
}