backport: Merge bitcoin#27254#7432
Conversation
There was a problem hiding this comment.
Code Review
Source: exact-SHA automated review for 173bd17f8f3d023626255ece0b48ed50916afb57; dash-core-commit-history and backport-reviewer specialists ran. Opus/Claude reviewer and verifier lanes failed due quota (resets Jul 10, 8am America/Chicago); Codex gpt-5.5 reviewer lanes and Codex verifier completed. No existing GitHub review-thread context was present for this PR.
Note: posted as a COMMENT review because GitHub does not allow formal approval/request-changes on my own PR.
🔴 1 blocking
-
Missing prerequisite: bitcoin#27254 (
src/common/args.cpp:39-41)Upstream bitcoin#27419 starts after bitcoin#27254, where
src/util/fs.handsrc/util/fs_helpers.hexist andcommon/args.cppincludes them directly. At this exact Dash SHA, the full Dash mergef5dec3bce1anamed in the PR description is not an ancestor; the branch only contains the older partial 27254 compatibility commit.The current backport works around that by forward-declaring
RenameOverandGetSpecialFolderPathinsrc/common/args.cpp, whilesrc/common/args.hstill includes the old<fs.h>and exportsGetDefaultDataDirinstead of getting it fromutil/fs_helpers.h. That may be an intentional Dash adaptation, but then the PR/commit description needs to explicitly say Dash is keeping the partial 27254 layout and explain these deviations. Otherwise, backport the full bitcoin#27254 prerequisite first.Policy gate (backport-prereq-restore): For full upstream backport PRs, a missing prerequisite is blocking unless explicitly allowlisted, for example with
intentional_exclusion/policy_overrideevidence.
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `src/common/args.cpp`:
- [BLOCKING] src/common/args.cpp:39-41: Missing prerequisite: bitcoin#27254
Upstream bitcoin#27419 starts after bitcoin#27254, where `src/util/fs.h` and `src/util/fs_helpers.h` exist and `common/args.cpp` includes them directly. At this exact Dash SHA, the full Dash merge `f5dec3bce1a` named in the PR description is not an ancestor; the branch only contains the older partial 27254 compatibility commit. Either backport the full bitcoin#27254 prerequisite first or explicitly document that Dash is intentionally keeping the partial 27254 layout and that these declarations/header placements are deliberate.
|
✅ Review complete (commit e86f8b3) |
173bd17 to
2c5de6d
Compare
00e9b97 refactor: Move fs.* to util/fs.* (TheCharlatan) 106b46d Add missing fs.h includes (TheCharlatan) b202b3d Add missing cstddef include in assumptions.h (TheCharlatan) 18fb363 refactor: Extract util/fs_helpers from util/system (Ben Woosley) Pull request description: This pull request is part of the `libbitcoinkernel` project bitcoin#24303 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". This commit was originally authored by empact and is taken from its parent PR bitcoin#25152. #### Context There is an ongoing effort to decouple the `ArgsManager` used for command line parsing user-provided arguments from the libbitcoinkernel library (bitcoin#25290, bitcoin#25487, bitcoin#25527, bitcoin#25862, bitcoin#26177, and bitcoin#27125). The `ArgsManager` is defined in `system.h`. A similar pull request extracting functionality from `system.h` has been merged in bitcoin#27238. #### Changes Next to providing better code organization, this PR removes some reliance of the tree of libbitcoinkernel header includes on `system.h` (and thus the `ArgsManager` definition) by moving filesystem related functions out of the `system.*` files. There is already a pair of `fs.h` / `fs.cpp` in the top-level `src/` directory. They were not combined with the files introduced here, to keep the patch cleaner and more importantly because they are often included without the utility functions. The new files are therefore named `fs_helpers` and the existing `fs` files are moved into the util directory. Further commits splitting more functionality out of `system.h` are still in bitcoin#25152 and will be submitted in separate PRs once this PR has been processed. ACKs for top commit: hebasto: ACK 00e9b97 Tree-SHA512: 31422f148d14ba3c843b99b1550a6fd77c77f350905ca324f93d4f97b652246bc58fa9696c64d1201979cf88733e40be02d262739bb7d417cf22bf506fdb7666
2c5de6d to
e86f8b3
Compare
Add the direct filesystem include from the upstream prerequisite and remove platform setup that moved to fs_helpers.cpp.
Keep the descriptive FileCommit errors already backported in bitcoin#26654 and avoid importing an unrelated RenameOver workaround while moving the helpers.
e86f8b3 to
8b4b8ad
Compare
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
Issue being fixed or feature implemented
Backports bitcoin#27254, the earliest remaining prerequisite in the bitcoin#29034 backport chain.
This PR previously bundled bitcoin#27254 and bitcoin#27419. It has been split back to one prerequisite at a time; bitcoin#27419 will follow separately.
What was done?
util/systemintoutil/fsandutil/fs_helpers.node/chainstate.cppinclude.FileCommit()errors andRenameOver()behavior.util/bitdeque.hinclude copied from later history.The final change is scoped to bitcoin#27254 only: 95 files changed, 468 insertions, and 393 deletions.
How Has This Been Tested?
On macOS:
The targeted unit-test run completed 83 test cases with no errors.
Local pre-push backport prerequisite gate: passed at
8b4b8ad02fca18eec8dc226dba6fa50f0cbadef8with no findings.Breaking Changes
None expected. This is a filesystem-helper extraction with Dash-specific behavior preserved.
Checklist: