{
 "number": 36266,
 "input_hash": "e40d8bbd64600c8e",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T15:59:19+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 13469,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 1308
 },
 "cost_usd": 0.01500675,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Prevent wasted work and file corruption in dumptxoutset by rejecting stale target blocks early and disallowing concurrent runs"
   ],
   "reviewability": [
    "Ready",
    "Clean diff with functional tests, awaiting review"
   ],
   "agreement": [
    "No reviews or comments yet (crickets)"
   ],
   "categories": [
    {
     "name": "rpc",
     "why": [
      "P3 because it fixes edge cases in dumptxoutset that could corrupt snapshot files or perform expensive rollback work before failing.",
      "The failure scenarios are unlikely in normal operation but the fix is low-overhead and improves RPC safety."
     ]
    }
   ]
  },
  "summary": "This pull request updates `dumptxoutset` to fail early on two edge cases. It verifies that a rollback target block index is actually on the active chain before copying UTXO data and disconnecting blocks, and it introduces a guard that restricts `dumptxoutset` to a single running instance to avoid file corruption and prune-lock collisions.",
  "problem": "Currently, requesting a rollback to a stale block hash causes `dumptxoutset` to copy the full UTXO set and disconnect blocks down from the tip before ultimately failing. Additionally, initiating concurrent `dumptxoutset` calls results in both jobs writing to the same temporary `.incomplete` file and prematurely deleting or clobbering each other's prune locks.",
  "discussion": {
   "open_concerns": [],
   "resolved_concerns": [],
   "author_status": "active"
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "The PR is small, mergeable, has passing tests, and is ready for review."
  },
  "agreement": {
   "state": "Crickets",
   "summary": "No reviews or concept feedback yet",
   "reason": "The PR was recently opened and has received no reviews or comments yet.",
   "evidence": []
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "rpc",
    "member": true,
    "evidence": "Modifies the `dumptxoutset` RPC in `src/rpc/blockchain.cpp` and adds RPC functional tests.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.35,
    "factors": {
     "security_stability": 1,
     "bug_severity": 1,
     "performance": 0,
     "user_value": 1,
     "leverage": 0
    },
    "rationale": "Prevents data corruption of snapshot files and prune-lock invalidation during concurrent invocations of `dumptxoutset`, and eliminates redundant work when passed an invalid target on a stale branch. The scenarios are relatively rare, making the change worthwhile and clean without reaching category-critical urgency."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "This PR updates the `dumptxoutset` RPC to exit early when passed a rollback target that is not on the active chain and to reject concurrent executions. Without this change, rollback to a stale block executes an expensive UTXO copy before failing, and simultaneous invocations write to the same temporary file and clobber prune locks. The change is small, includes functional test coverage, and has not yet received review."
 },
 "raw_text": null
}