2 suggestions
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Optional improvements
[suggestion] · The new wallet.h check does not enforce IWYU suggestions
IWYU suggestions for test/fuzz/util/wallet.h remain non-gating because its only includer runs in the warnings pass; whether the header currently produces diagnostics is unverified.
Location: ci/test/03_test_script.sh:271 (head).
Details and suggested fix
The only tracked includer is src/wallet/test/fuzz/spend.cpp, which does not match FILES_WITH_ENFORCED_IWYU. The new --check_also option therefore checks this header only in the warnings pass. That pass applies and prints include edits after the errors-pass diff gate has already completed, leaving this header outside the advertised src/test/fuzz enforcement. To enforce it, add wallet/test/fuzz/spend.cpp to the enforced set once its IWYU output is clean. This conclusion comes from source inspection, not an IWYU run.
[suggestion] · The fuzz-enforcement commit obscures shared-header dependency changes
The fuzz-only commit description bundles production-header rewrites and non-fuzz consumer fixes with enforcement, making the broader dependency changes harder to review separately.
Location: src/netaddress.h:14 at 106b2d8ec098 (commit) (commit).
Details and suggested fix
Commit 106b2d8ec098466cfe16080d538b6e9bee9d2f31 changes shared headers alongside the mechanical fuzz edits and CI enablement. For example, netaddress.h drops util/strencodings.h, while block_policy_estimator.h drops random.h and feerounder_tests.cpp adds it directly. These changes affect consumers beyond fuzz. The preceding module-cleanup commit, 24a91c966e08906c450128393da28867ef3dc946, explains its transitive-include consumer fixes in its body; this commit has no equivalent explanation.
Split the shared-header rewrites, mapping, pragma workaround, and all required consumer fixes into a preparatory commit. Keep the remaining fuzz cleanup and CI enforcement in the following commit. Carry dependent fuzz edits and non-fuzz fixes together with their headers so the split does not introduce an intermediate failure. This leaves the final tree unchanged and separates dependency review from enforcement review. The exact allocation still needs intermediate build and IWYU validation.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: The fuzz commit leaves shared-header refactoring unexplained (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
Upstream PR 2142 addressed an invalid nested-class forward declaration caused by analysis of an implicitly invoked member destructor. Its reduced example defines B inside A and then declares an H<B> member. While analyzing A's implicit destructor, IWYU scans H<B>'s instantiated destructor and attributes a use of B to A's location—before B's definition. Because the ancestor walk failed to recognize that use as occurring within a method body, IWYU converted it into a forward-declaration requirement and suggested the invalid declaration struct A::B;.
Both pinned base and head define CTransactionRefHash and CTransactionRefComp inside PrivateBroadcast and use them as template arguments of its std::unordered_map member. The head's two no_forward_declare pragmas suppress precisely this category of nested-type suggestion; their purpose concerns IWYU's model of declaration visibility, not private-broadcast runtime behavior.
The upstream investigation distinguished two ways to eliminate the spurious use. PR 2142 proposed recognizing any enclosing destructor as method-body context. Follow-up PR 2145 instead proposed skipping constructor/destructor declaration-name traversal: the instantiated destructor's name refers to its own specialization, and traversing it unnecessarily scans that specialization's members. PR 2145 reports that this reduced reproducer began failing at commit 4966ff6, while cautioning that the older issue 1707 predates that commit and may have another cause.
A reference to PR 2142 establishes the failure mechanism, but does not by itself establish which IWYU versions need the PrivateBroadcast suppressions. The configured branch and Bitcoin's applied IWYU patch must be distinguished from upstream versions containing either proposed fix.
Ralph's inferences
The evidence supports treating these pragmas as targeted workarounds for an upstream analysis limitation, but does not support a definitive yes or no about their continued necessity in the repository's configured IWYU.
The nested functor definitions and unordered_map use are unchanged between base and head; the head adds diagnostic suppressions. An upstream Bitcoin participant reported that testing a particular PR 2142 revision fixed a related reproducer, but that report neither identifies the tool revision selected by this repository's installer nor verifies both PrivateBroadcast diagnostics under its local IWYU patch.