{
 "number": 35909,
 "input_hash": "e47a0ebd7e52bef6",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T16:21:26+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 16057,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 2138
 },
 "cost_usd": 0.02006025,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Allow REST clients to fetch headers for stale blocks not in the active chain",
    "Provide parity with the getblockheader RPC for re-org and fork monitoring tools"
   ],
   "reviewability": [
    "Ready for review",
    "No blockers or pending rebase"
   ],
   "agreement": [
    "Positive concept support with ongoing discussion on API design (sedited, jeanpablojp, 0xB10C)",
    "jeanpablojp tested and endorsed the query parameter approach (jeanpablojp)",
    "0xB10C noted fork-observer uses this capability but wondered if a dedicated /rest/header/ endpoint is cleaner (0xB10C)"
   ],
   "categories": [
    {
     "name": "rpc",
     "why": [
      "P3 because it brings REST headers into parity with getblockheader for stale blocks.",
      "Adds a requested query parameter for external applications tracking chain forks and re-orgs."
     ]
    },
    {
     "name": "docs",
     "why": [
      "Unranked because the documentation updates are incidental to the REST endpoint change."
     ]
    }
   ]
  },
  "summary": "This PR adds an `activechainonly=false` query parameter to the `/rest/headers/` endpoint, allowing clients to query a single stale block header when `count=1`. It also refactors query parameter boolean parsing into a shared helper `RESTParseBoolParam`.",
  "problem": "The REST `/rest/headers/` endpoint only returns headers that reside on the active chain, making it impossible for REST-based tools (such as fork-observer) to inspect ancestors of non-active blocks during or after a re-org.",
  "discussion": {
   "open_concerns": [
    "0xB10C raised whether a dedicated `/rest/header/` endpoint might be cleaner than requiring `count=1&activechainonly=false` on `/rest/headers/`."
   ],
   "resolved_concerns": [
    "jeanpablojp questioned release note naming convention; author clarified."
   ],
   "author_status": "active"
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "The patch is clean, tests pass, and it is ready for feedback on the endpoint parameter design."
  },
  "agreement": {
   "state": "Positive",
   "summary": "Positive: concept ACKed and tested, with minor discussion on whether a separate endpoint is cleaner.",
   "reason": "Multiple contributors support the functionality, with concrete use cases mentioned (such as fork-observer), while discussion remains open on parameter versus dedicated endpoint semantics.",
   "evidence": [
    "sedited left Concept ACK",
    "jeanpablojp gave tACK and preferred the query param approach over a new endpoint",
    "0xB10C gave Concept ACK citing fork-observer use case, but suggested a separate endpoint might avoid REST API weirdness"
   ]
  },
  "dependencies": {
   "depends_on": [],
   "enables": [
    "Resolves #35897"
   ]
  },
  "categories": [
   {
    "name": "rpc",
    "member": true,
    "evidence": "Modifies REST server endpoints in src/rest.cpp and src/rest.h.",
    "band": "P3",
    "reason_tag": "new feature",
    "score": 0.35,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 2,
     "leverage": 0
    },
    "rationale": "Clear use case and real value for external REST consumers following re-orgs or stale branches, but deferrable without system-wide urgency."
   },
   {
    "name": "docs",
    "member": false,
    "evidence": "Documentation changes in doc/REST-interface.md are routine updates accompanying the REST code changes.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "A code change that updates its documentation belongs to that code's area rather than docs."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "Adds an activechainonly query parameter to /rest/headers to allow retrieving single stale block headers not on the active chain. Solves a gap where REST users cannot inspect headers on stale branches or follow re-orgs upward, matching getblockheader RPC behavior. Concept is well supported with a tACK, though discussion remains open on whether a dedicated endpoint would be cleaner than an activechainonly parameter. No dependencies."
 },
 "raw_text": null
}