Uh oh!
There was an error while loading. Please reload this page.
refactor(node): W1b-0 — seams/ scaffold, relocate decoupled helper modules (#1285) - #65
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
…dules (#1285, #1298)
Pure relocation, zero behaviour change: bandwidth.rs and verification_ledger.rs
(seam 5, content) and net.rs/pex.rs/dht.rs/address_book.rs/session.rs (seam 2,
dig_peer) move into crates/dig-node-core/src/seams/{content,dig_peer}/ — the
first two of the 7 architecturally-separated seams (#1285/#1303). These files
have zero `impl Node` coupling (confirmed by grep before the move), so this is
a mechanical file relocation + a `pub use` re-export of each module at its
original crate-root path — every existing `crate::net`/`crate::pex`/… caller
keeps working unchanged.
The seam carve of the god-struct's `impl Node` methods (content_serve.rs,
peer.rs, chainwatch.rs, download.rs — the actual seam trait/handle extraction)
lands in W1b-1 through W1b-6, sequenced on issue #1285.
Co-Authored-By: Claude <noreply@anthropic.com>Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
marked this pull request as ready for review
July 20, 2026 17:53
MichaelTaylor3d
left a comment
ContributorAuthor
There was a problem hiding this comment.
PASS — single correctness gate (fresh context).
Verified this is a pure, behaviour-preserving relocation of zero-coupling modules with stable re-exports:
- All 7 moves are byte-identical. git reports
similarity index 100%renames for bandwidth.rs + verification_ledger.rs → seams/content/ and net.rs + pex.rs + dht.rs + address_book.rs + session.rs → seams/dig_peer/. No function bodies, tests, or logic changed. - Zero
impl Nodecoupling confirmed in all 7 relocated files (grep count 0 each) — they define standalone types/fns, correctly the first to carve cleanly. - Re-exports keep every original path importable. lib.rs drops the old
pub modlines and addspub use seams::content::{bandwidth, verification_ledger};+pub use seams::dig_peer::{address_book, dht, net, pex, session};, socrate::net/crate::pex/… (and externaldig_node_core::net) resolve unchanged. No caller edits. - New scaffold only: seams/mod.rs + seams/content/mod.rs + seams/dig_peer/mod.rs, doc-comment modules declaring the moved submodules. No duplicate defs, no dangling refs.
- Versions bumped + consistent: workspace 0.47.1→0.47.2 and dig-node-core 0.13.1→0.13.2 (both patch, correct for a no-behaviour-change refactor).
- 0 unresolved review threads.
Non-gating note (resolved by me): the crate-root /// doc comments previously on pub mod session / pub mod verification_ledger were dropped from lib.rs; their content is preserved in the moved files' own //! docs and summarized in the new seam mod.rs files. No action needed.
Merge-ready.
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
W1b-0: first sub-PR of the W1b seam carve (#1285). Creates the
seams/module tree andrelocates the helper modules that have zero
impl Nodecoupling (pure file moves,no logic change) to validate the seams/ pattern before tackling the tangled god-struct
methods in later sub-PRs.
Sub-PR sequence (W1b, this is #1 of 7)
content(content_serve.rsimpl Nodemethods →ContentServertrait/handle).dig_peer(peer.rsimpl Nodemethods →PeerNetworktrait/handle).chia_peer(chainwatch.rs +AnchoredRootResolver→ChainSourcetrait/handle).capsule(cache_*/gap_fill/backfill methods →CapsuleStoretrait/handle).dig_rpc(RPC dispatch methods in lib.rs →RpcDispatchtrait/handle).key_mgmt(identity_seed lifecycle →KeyManagertrait/handle);walletseamstays a placeholder per the locked plan (embedded dig-wallet is W5, out of scope here).
Behaviour-preserving throughout — no logic/algorithm change, no seam-crate adoption, no new deps.
Closes nothing yet (tracking #1285).