{
 "number": 36542,
 "input_hash": "0d2cc8b473655893",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-30T01:14:11+00:00",
 "result": {
  "summary": "Configures snapshot coins database initialization to wipe existing data before opening during AssumeUTXO snapshot activation. This allows subsequent loadtxoutset calls to succeed after an interrupted snapshot load, without requiring manual deletion of the chainstate_snapshot directory, and adjusts the malformed directory warning log accordingly.",
  "problem": "An interrupted loadtxoutset call can leave an incomplete chainstate_snapshot database without the base_blockhash marker file. Subsequent attempts to load a snapshot fail to open the database, requiring node operators to manually locate and delete the directory from disk.",
  "card": "Allows loadtxoutset to retry cleanly after an interrupted AssumeUTXO snapshot load without requiring manual disk cleanup. When an interrupted load leaves an incomplete chainstate_snapshot database missing its base_blockhash marker, subsequent load attempts fail. The PR sets should_wipe to true when activating the snapshot coins database so that retry calls wipe and overwrite partial data, and updates the startup warning log to reflect the retry behavior.",
  "evidence": [
   "PR description and commit 15a891d402: 'An interrupted loadtxoutset can leave an incomplete chainstate_snapshot database without its required base_blockhash marker. A later call can fail to open that database, requiring the operator to remove it manually before retrying.'"
  ],
  "scope_notes": "",
  "changed_since_previous": "The PR has shifted scope completely: previously it handled removing stale chainstate_todelete directories during ValidatedSnapshotCleanup on node startup, whereas it now passes should_wipe=true when initializing the snapshot coins DB during loadtxoutset to recover from interrupted snapshot loads.",
  "thread": {
   "last_event_at": "2026-10-29T12:54:17Z",
   "events": 2,
   "head_sha": "15a891d4021e0cf8c009127721ee1f1702dd9471",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-29",
    "id": "c:6497227759",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36542#issuecomment-6497227759",
    "what": "answer cyb3ralbert's question about covering locked databases in tests"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "validation"
   ],
   "why": "A mistake when instructing LevelDB to wipe an existing coins database during snapshot activation could accidentally discard valid chainstate data if applied to the wrong chainstate."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-29",
   "open_concerns": [
    "cyb3ralbert: whether the regression test should also cover a snapshot database whose LOCK is held by another process"
   ],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (cyb3ralbert)",
   "reason": "Initial record. cyb3ralbert provided a Tested ACK with test details and asked whether regression testing should cover snapshot database locks.",
   "evidence": [
    "cyb3ralbert (question, scope, must be answered, open): whether the regression test should also cover a snapshot database whose LOCK is held by another process",
    "cyb3ralbert: Tested ACK \u2014 Tested on Linux aarch64 (Debian 13, GCC 14.2.0); verified restart and retry scenarios and feature_assumeutxo.py passed"
   ],
   "objections": [
    {
     "reviewer": "cyb3ralbert",
     "association": "CONTRIBUTOR",
     "type": "question",
     "kind": "scope",
     "harm": "",
     "request": "",
     "question": "whether the regression test should also cover a snapshot database whose LOCK is held by another process",
     "text": "whether the regression test should also cover a snapshot database whose LOCK is held by another process",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-29: 'Should the regression test also cover a snapshot database whose LOCK is held by another process?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36542#issuecomment-6497227759",
     "id": "c:6497227759",
     "at": "2026-10-29",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "cyb3ralbert",
     "reason": "Tested on Linux aarch64 (Debian 13, GCC 14.2.0); verified restart and retry scenarios and feature_assumeutxo.py passed",
     "substantive": true,
     "verdict": "Tested ACK",
     "id": "c:6497227759",
     "url": "https://github.com/bitcoin/bitcoin/pull/36542#issuecomment-6497227759",
     "at": "2026-10-29",
     "association": "CONTRIBUTOR",
     "evidence": "tested",
     "areas": [
      "feature_assumeutxo.py"
     ]
    }
   ],
   "participants": [
    {
     "login": "cyb3ralbert",
     "stance": "support",
     "note": "tested ACK with test results; asked if regression tests should cover a locked snapshot database",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-29",
     "last": "2026-10-29"
    }
   ],
   "derivation": "substantive support, no open objection (cyb3ralbert)",
   "model_state": null,
   "corrections": [],
   "notes": "Initial record. cyb3ralbert provided a Tested ACK with test details and asked whether regression testing should cover snapshot database locks."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "mempool",
    "member": false,
    "evidence": "Does not touch mempool data structures or policy; modifies AssumeUTXO snapshot initialization.",
    "band": "Unranked",
    "reason_tag": "bug fix",
    "score": 0.0,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 1,
     "user_value": 1
    },
    "rationale": "The PR modifies AssumeUTXO snapshot loading and does not affect mempool rules, acceptance, or policy."
   },
   {
    "name": "validation",
    "member": true,
    "evidence": "Carries the Validation label and alters AssumeUTXO snapshot chainstate initialization in src/node/utxo_snapshot.cpp and src/validation.cpp.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.35,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 1,
     "user_value": 1
    },
    "rationale": "Allows retrying loadtxoutset after an interrupted snapshot load without requiring manual deletion of the chainstate_snapshot directory. An interrupted load previously left an incomplete snapshot database missing its marker file, blocking retry attempts until operator intervention."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-30T01:14:11+00:00",
  "code": "2026-10-22T01:18:37+00:00",
  "judgments": 2
 }
}