d084bc88bedoc: clarify IWYU workflow (Lőrinc)7c7cec4567ci: update IWYU patch reference (Lőrinc) Pull request description: ### Problem This was prompted by https://github.com/bitcoin/bitcoin/pull/34435#discussion_r3123255248, where it was not clear to me how (and where) exceptional IWYU cases should be documented. ### Fix This PR documents the IWYU CI wrapper as the reproducible local entrypoint. The developer notes now recommend reducing suspected IWYU false positives to a minimal upstream reproducer, treat `IWYU pragma` as a narrow workarounds, and ask for nearby rationale comments on non-obvious IWYU pragma use. An example comment was also added. The IWYU patch comment is also updated to point at the current `clang_22` include picker reference. ### Reproducer Create a dummy commit on top that adds an unused include, then run the command from the developer notes. Without the dummy commit, the command should pass. <details><summary>IWYU demo commit</summary> ```diff diff --git a/src/kernel/bitcoinkernel.cpp b/src/kernel/bitcoinkernel.cpp --- a/src/kernel/bitcoinkernel.cpp(revision c92b329e7b7d49476b5977d26c24d7c4982c6024) +++ b/src/kernel/bitcoinkernel.cpp(revision ad2c5ba2ba69156e77061c1e6c098b725c28f322) @@ -43,6 +43,7 @@ #include <functional> #include <list> #include <memory> +#include <vector> #include <span> #include <stdexcept> #include <string> ``` </details> > [!NOTE] > After repeated failing runs, `docker container rm -f ci_native_iwyu` may be needed because the local CI wrapper can leave the detached container running when the inner test command fails. ACKs for top commit: hebasto: ACKd084bc88be. sedited: ACKd084bc88beTree-SHA512: 0aac42d468a1fdfa9f4a3856372e05fb43ec9f0973aeb3a4194fff948fc61e8e72e3b280cde10e74b8da88b6cff93962b3a7f7390eb042113ef92aa6b51d6d8f
src/node/
The src/node/ directory contains code that needs to access node state
(state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar
classes).
Code in src/node/ is meant to be segregated from code in
src/wallet/ and src/qt/, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/,
src/wallet/, or src/qt/ directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/ classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp and
src/txmempool.cpp might be moved there.