WIP: [30.x] Backports

bitcoin/bitcoin: PR #36929

1 major finding

Findings

Link

[major] · Windows CI retains -Werror=dev in the 30.x backport

The backport leaves both Windows CI configurations exposed to the existing CMake 4.5+ configure failure; the hosted runner's current version and an actual Windows failure remain unverified.

Location: .github/ci-test-each-commit-exec.py:30 (base).

Details and suggested fix

Upstream commit 3d92fe8bbdf8c0b5e14ad824c792c53a697137a7 also removes -Werror=dev from the Windows configure command. Although .github/ci-windows.py does not exist on 30.x, its equivalent is the inline command at .github/workflows/ci.yml:234, which still passes that flag for both standard and fuzz jobs. These jobs use vs2022, which does not inherit dev-mode, so the preset change does not repair this path. The bundled secp256k1 MSVC configuration calls try_append_c_flags(/W3), whose helper invokes add_compile_options when the flag is accepted. CMake 4.5+ reports the non-target-directive developer diagnostic there, and the retained flag escalates it to a configure error.

Adapt the omitted Windows hunk in backport commit 9006b9cb1696957659c0cd418805de5a8fb7e242 by removing -Werror=dev from that inline command. Keep --preset vs2022 and the matrix's -DWERROR=ON settings, which control compiler warnings rather than CMake developer diagnostics, and note the path adaptation in the commit message.


Backport verdict: Incomplete

The backport is incomplete. The CMake preset change and the two shared CI changes are reproduced faithfully. But upstream 3d92fe8bbd also takes -Werror=dev out of the Windows CI command, and this PR drops that part. On 30.x, .github/ci-windows.py does not exist. The Windows command it would have changed lives in .github/workflows/ci.yml instead, and it still passes -Werror=dev. That job also builds the bundled secp256k1 code that triggered the original CMake >= 4.5 failure. So the Windows CI problem that #36927 set out to fix is likely still present on this branch. No builds or tests were run.

Evidence:

Required fixes:

Limitations:

Coverage details

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

The compatibility failure involved CMake's non-target-directive diagnostic in the bundled secp256k1 build code. The historical report showed add_compile_options being rejected under the fatal-warning gate, and a maintainer reported that developers' local builds were also failing after CMake upgrades.

This explains why changing CI alone would not address the affected behavior: local users selecting dev-mode encounter the same diagnostic escalation. The issue is configure-time compatibility with a newer build tool, rather than evidence of a changed cryptographic operation.

Source 1 · Source 2

The upstream removal proposal explicitly includes 30.x among branches whose dev-mode configuration fails with CMake 4.5.0 or newer. Its stated tradeoff is that catching these developer warnings on release branches has limited value compared with keeping local builds and CI usable. A secp256k1 subtree update was acknowledged as an alternative, not a prerequisite for removing warning escalation.

This supplies a branch-specific compatibility rationale for the backport: relax the diagnostic gate without requiring a broader dependency update. The proposal also anticipates macOS or Windows CI failures when those environments acquire newer CMake versions.

Source 1

Ralph's inferences

The original enforcement makes build-system maintenance warnings difficult to overlook during development and automated checks, at the cost of allowing newly introduced tool diagnostics to stop otherwise unchanged release-branch configurations.

This is the central tradeoff behind removing the gate: earlier maintenance feedback versus compatibility with evolving developer and CI tools. It follows from the documented warning semantics and upgrade-triggered failures; the original proposal does not state a broader security or adversarial rationale.

Source 1 · Source 2 · Source 3