1 major finding
Findings
[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:
- Upstream commit 47be6cda3b (build: remove dev errors from dev-mode) is matched by df0d358c51. At the PR head, the
dev-modepreset in CMakePresets.json (lines 60-75) no longer has"errors": {"dev": true}and keeps all its other settings. No other"errors"preset setting remains in the tree. - Upstream commit 3d92fe8bbd (ci: remove -Werror=dev) is partly matched by 9006b9cb16.
-Werror=devis gone from.github/ci-test-each-commit-exec.py(head lines 26-45). The only context difference is the literal"build"versus upstream'sbuild_dir, which does not matter. It is also gone fromci/test/03_test_script.sh(head line 127), keeping the 30.x unquoted-DCMAKE_INSTALL_PREFIXform. Both are correct adaptations. - The upstream commit also removes
-Werror=devfrom.github/ci-windows.py(present upstream at line 71 before 3d92fe8bbd), but this backport leaves that part out. No path matchingci-windowsis tracked on the 30.x tree, so the file cannot simply be patched. However, 30.x still has the same Windows configure command inline:.github/workflows/ci.yml:234containscmake -B build -Werror=dev --preset vs2022 ...in thewindows-native-dlljob, both at the base and at the head. The PR does not touch that line. - Searching the head tree for
Werror=devfinds only.github/workflows/ci.yml:234andcontrib/guix/libexec/build.sh:246. Keeping it in Guix matches upstream: after 3d92fe8bbd, upstream still has-Werror=devincontrib/guix/libexec/build_{linux,macos,win}_gui.sh, so the Guix copy is correctly left alone. The ci.yml Windows line is not covered by any such exception. - The trigger is still in 30.x:
src/secp256k1/cmake/TryAppendCFlags.cmake:22callsadd_compile_options(${ARGV}). That is the non-target directive reported in #36913, which CMake >= 4.5 escalates to an error under-Werror=dev. The upstream #36927 description names the Windows jobs as affected, and the #36913 discussion reports Windows (and macOS) CI failing. - Release notes (commit 9d437285ee, untagged release prep):
doc/release-notes.mdnow lists#36927 build: remove *dev* errors from dev-modeunder Misc and adds fanquake to Credits. This is consistent with the backport. Listing it under Misc rather than Build is a minor placement choice, not a defect. - Every source commit is accounted for: both originals (47be6cda3b and 3d92fe8bbd) are in the PR, and the evidence packet lists none as missing or already in the base. The only gap is the Windows part described above.
Required fixes:
- Remove
-Werror=devfrom theGenerate build systemstep of thewindows-native-dlljob in.github/workflows/ci.yml(line 234:cmake -B build -Werror=dev --preset vs2022 ...). This is the 30.x equivalent of the.github/ci-windows.pychange in upstream 3d92fe8bbd. Ideally it goes into the 9006b9cb16 backport commit, with a note that the change was moved fromci-windows.pytoci.ymlfor 30.x.
Limitations:
- No builds, CI runs or tests were run, and no runner records were provided. Whether Windows CI actually fails depends on the CMake version on the
windows-2022runner image. That version was not checked. - It was not confirmed that the secp256k1 MSVC configure path calls
try_append_c_flags(and so reachesadd_compile_options) in the Windows job. The conclusion relies on the same file being present in 30.x and on the upstream reports that Windows CI failed. - Other CI paths that might pass
-Werror=devindirectly were not checked (for example,--preset dev-modein macOS CI environment scripts). A text search found no other occurrences outside Guix and ci.yml:234. - The 31.x and 32.x backports (#36928, #36929/#36927) were not compared to see how they handled the Windows change.
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.
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.
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.