{
 "number": 30343,
 "input_hash": "6c12602210e7bea3",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T15:48:50+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 32805,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 4984
 },
 "cost_usd": 0.04329375,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Standardize wallet log output on the modern log macros",
    "Fix -logsourcelocations output for wallet messages",
    "Preserve wallet name prefixes via custom log context"
   ],
   "reviewability": [
    "Needs rebase against current master and base PRs",
    "Depends on unmerged logging PRs #29256 and #34778"
   ],
   "agreement": [
    "Tested ACK after lifetime and compile-time checks were discussed (adyshimony)",
    "Constructive suggestions on log levels and helper APIs addressed (hodlinator)",
    "Clarification on LogError versus warning/info usage provided (maflcko)"
   ],
   "categories": [
    {
     "name": "wallet",
     "why": [
      "P3 because it standardizes wallet logging on modern macros without losing wallet identification",
      "Fixes source location reporting in wallet logs without altering functional wallet behavior"
     ]
    }
   ]
  },
  "summary": "Replaces the wallet-specific WalletLogPrintf() function with modern LogInfo(), LogWarning(), and LogError() macros across the wallet subsystem. It introduces a WalletLogContext class inheriting from util::log::Context to preserve wallet name prefixes in log messages while allowing -logsourcelocations to output actual call sites.",
  "problem": "Wallet messages previously used a dedicated WalletLogPrintf wrapper to prefix wallet names, which prevented wallet code from using level-based logging macros and caused -logsourcelocations to report the wrapper location rather than where the log was triggered.",
  "discussion": {
   "open_concerns": [],
   "resolved_concerns": [
    "Addressed lifetime safety of temporary log source objects raised by adyshimony",
    "Refined log severity levels across wallet loading and transaction processing following feedback from hodlinator and maflcko"
   ],
   "author_status": "Active; regularly rebasing on top of prerequisite logging PRs and master."
  },
  "reviewability": {
   "state": "Stale",
   "label": "Needs rebase",
   "reason": "The PR has merge conflicts against master and is stacked on top of unmerged logging PRs #29256 and #34778."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong support; tested ACK from adyshimony and detailed review from hodlinator addressed",
   "reason": "Reviewers have engaged with the approach and verified behavior. adyshimony tested and ACKed the branch after lifetime edge cases were discussed, and feedback from hodlinator on method naming and severity levels was incorporated.",
   "evidence": [
    "adyshimony tested and posted: 'ACK on 7fc95e7cbb3e'",
    "hodlinator reviewed and suggested adopting Log() accessors and refining severity levels",
    "maflcko noted documented guidelines for LogError versus LogWarning"
   ]
  },
  "dependencies": {
   "depends_on": [
    29256,
    34778
   ],
   "enables": [
    "Accurate source location reporting in wallet logs when using -logsourcelocations"
   ]
  },
  "categories": [
   {
    "name": "build",
    "member": false,
    "evidence": "Touches .github/workflows/ci.yml only for a temporary fetch-depth increase required while testing the PR stack.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "Not a build system change; CI workflow edit is temporary stack tooling."
   },
   {
    "name": "docs",
    "member": false,
    "evidence": "Changes to doc/developer-notes.md originate from the base logging PR #34778 rather than this PR's wallet changes.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "Incidental documentation update belongs to the base logging PR."
   },
   {
    "name": "mempool",
    "member": false,
    "evidence": "Does not touch mempool policy, validation rules, or mempool data structures.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "No mempool interaction."
   },
   {
    "name": "utils",
    "member": false,
    "evidence": "Per the category definition, a logging change whose point is one specific area's behavior belongs to that area, not utils.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "General logging infrastructure changes belong to base PR #29256; this PR specifically adapts wallet call sites to that API."
   },
   {
    "name": "validation",
    "member": false,
    "evidence": "Incidental edit in src/validation.cpp belongs to base PR #34778 and does not alter consensus or chainstate logic.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "No validation changes are made by this PR's own commits."
   },
   {
    "name": "wallet",
    "member": true,
    "evidence": "Replaces WalletLogPrintf across wallet components and adds WalletLogContext in src/wallet/logging.h.",
    "band": "P3",
    "reason_tag": "cleanup",
    "score": 0.35,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 1,
     "leverage": 0
    },
    "rationale": "Eliminates legacy WalletLogPrintf in favor of project-wide logging macros. It preserves wallet names in output while fixing -logsourcelocations call sites for wallet developers and operators."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "This PR integrates the wallet subsystem with Bitcoin Core's modern level-based logging macros (LogInfo, LogWarning, LogError), eliminating the custom WalletLogPrintf helper. By introducing a WalletLogContext that prepends wallet identifiers automatically, it preserves multi-wallet log disambiguation while fixing -logsourcelocations to print real call sites. The change is worthwhile internal cleanup that improves debugging ergonomics for wallet maintainers and users. It has received strong review including a tested ACK from adyshimony, but is currently stale due to merge conflicts and its base dependencies on #29256 and #34778."
 },
 "raw_text": null
}