Utilities (logging, arguments, libraries): ranking notes

Category notes

Several PRs on this list are primarily wallet, p2p, kernel or index work that appear here only because of a small shared-utility component (35302, 32966, 35558, 34603, 10102, 26966, 35474, 35557). They are banded and ordered on that utils footprint, not on the project they belong to, which is why some sit far below the position their standalone score implied. Conversely, the top of the list is dominated by correctness and safety of shared primitives (file allocation, stream write failure, DB cursor lifetime, log escaping), which is what this category ranks first.

Review order and overlapping PRs

  • Trace-logging configuration is attacked three times: 35387 (-loglevel made usable + loglevel RPC), 34038 (-loglevel replaced by -trace) and 35355 (-trace plus atomic level masks). 35387 and 34038 are direct alternatives under an approach dispute; settle that pair first. 35355's atomics overlap 35322 and its CLI part overlaps 34038, so it is largely redundant once either lands.
  • Argument/settings stack order matters: 16545 (ALLOW_* flag checking) is the base for 17580, which is the base for 17493, which is the base for 17581; 17783 also sits on 16545/17580. Additionally the author asks that 31260 (type-safe Setting template) be settled first, since it may subsume the flag-based approach - review 31260, then 16545.
  • util::Result chain: 25665 must land before 26022 (ResultPtr, stacked and draft) and before 29700 (kernel fatal errors, stacked). 25665 is now banded above both accordingly.
  • Logging-context chain: 34778 -> 29256 -> 30342. 30342 also has a competing PR (#34775) that keeps kernel logging global; the concept NACKs on 34778/29256 gate the whole chain, so reviewing the base first is the only productive order.
  • Silent Payments chain: 35301 (bip352 primitives) is the prerequisite for both 35302 (sending) and 32966 (receiving); 32966 additionally waits on upstream libsecp256k1 (#1799). Their earlier standalone positions (35302 at 9, 32966 at 26) were inconsistent for two peers of the same downstream stage.
  • 36282 (leveldb) and 36278 (minisketch) are the same change for the same purpose - unblocking -Wunused-const-variable in #36275 - but were banded P3 and P4 alone; they should be reviewed as a pair.
  • 35818, 36286 and 35688 are three equivalent cases of UB/aliasing in primitives with no current production caller, but were banded P4/P3/P3 alone; now aligned.
  • 35676 and 36049 embody opposite answers to the same problem (what a low-level helper does on a filesystem error: abort in place vs let the exception reach the node's storage error handling). 36049 should be reviewed first, as it matches the direction reviewers of 35676 asked for.

Band and position changes

  • #35524: P2 alone, P1 after comparison. Raised to P1: silent overwriting of existing block files during reindex on platforms without posix_fallocate is on-disk data destruction, more consequential than any other item here.
  • #35422: Moved up: uninitialized-nonce UB in a libsecp256k1 wrapper is a primitive-safety issue, which this category ranks above configuration and logging polish.
  • #36188: Measured 13%/7% signing speedup in a core crypto path plus context lifecycle cleanup; top of P3 just below the 2-3x chacha20 P2.
  • #35763: Moved up: crash-safe atomic writes for settings.json/banlist.json is persistence robustness, ranked with the other file-handling correctness fixes.
  • #16545: Placed ahead of 17580/17493/17783 because it is their base; reviewing it first is what unblocks the stack.
  • #17493: Moved below its bases 16545/17580, which must be reviewed first for this to be actionable.
  • #34038: Placed immediately after the competing 35387: same problem, and the pending design decision is what blocks both.
  • #35322: Moved up: removes mutex acquisition from every category check and simplifies Logger state, with no unresolved approach dispute, unlike the -trace variants.
  • #35936: Moved up: hardens serialization limits against malformed p2p payloads, which outranks diagnostics and type-safety cleanups here.
  • #36234: Moved up: correctness of a shared filter primitive relied on by networking ranks above internal ergonomics work.
  • #35688: Moved up to sit with the other crypto/primitive UB fixes (36286, 35818) rather than among diagnostics changes.
  • #36286: Moved up to be adjacent to the equivalent primitive-correctness fixes; no production caller, so it sits at the bottom of that cluster's top edge.
  • #35818: P4 alone, P3 after comparison. Raised P4->P3 for consistency with 36286 and 35688: all three fix UB/aliasing in primitives with no current production caller and must share a band.
  • #36210: Moved up: durable diagnostic improvement to shared file streams that every area benefits from.
  • #35948: Moved up: fixes a misleading user-facing startup warning, which this category ranks above internal cleanups.
  • #35511: Lowered relative to its score: broad type-safety win but no active defect and explicitly needs splitting, so deferrable behind concrete fixes.
  • #26022: Kept below its base 25665; ergonomic wrapper whose value depends on that PR landing first.
  • #36087: Moved up: eliminates a real UB hazard from future std::unreachable use across the tree, above cosmetic diagnostics work.
  • #36183: Moved up: compile-time lifetime diagnostics for widely used span helpers, though the design needs rework.
  • #34778: Placed ahead of 29256/30342 as their base; the approach dispute here gates the whole logging-context chain.
  • #29256: Moved below 34778, its base; the contextual-logging concept is also disputed, so its standalone value is deferred.
  • #34729: Lowered: log-noise demotions are operator-facing polish with a reviewer reservation, below correctness work in this category.
  • #35676: Lowered: multiple reviewers dispute aborting inside low-level helpers, and 36049 addresses the same disk-error class more conservatively.
  • #24773: Lowered: large speedup but confined to MSVC developer builds, not release binaries, and blocked on whether MSVC stays supported.
  • #35355: Lowered sharply: its atomics part overlaps 35322 and its -trace part overlaps 34038, leaving little unique value until those are decided.
  • #34603: P4 alone, P3 after comparison. Raised P4->P3 for consistency with other real platform bug fixes; a supported-platform symlink misdetection causing recursive scans is more than cosmetic.
  • #35302: Lowered well below its score: its utils footprint is thin wrappers on top of 35301, which should be reviewed first.
  • #32966: Lowered: depends on 35301 and on upstream libsecp256k1 work (#1799); utils contribution is incremental.
  • #36282: P3 alone, P4 after comparison. Lowered P3->P4 to match 36278: both are warning-only subtree syncs unblocking a compiler-flag PR, which carries no security or correctness fix.
  • #36278: Moved up to sit beside 36282, the identical subtree sync for the same #36275 unblock.
  • #36033: P3 alone, P4 after comparison. Lowered P3->P4: author-marked wip/nomerge RFC toolchain bump; speculative and weakly justified on its own terms.
  • #35170: Test-only assertions plus a rename; no production behavior at all, so it sits below the other P4 cleanups.

About

This pass by claude-opus-5 on 2026-09-17 saw every PR in the category at once and checked the bands given to each PR alone against each other, ordered the PRs, and noted chains and overlaps. Back to the category.