Repository navigation
refactor(node): dedupe runtime helpers (#1252) - #1274
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe runtime refactor centralizes panic-safe pruning, adds role-based provider construction, migrates runtime bootstraps, reuses EIP-712 domains through cloning, and documents the implementation and verification plan. ChangesRuntime micro-deduplications
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant RuntimeRun
participant ProviderFactory
participant AlloyProviders
participant RuntimeWatchers
participant WalletHandlers
RuntimeRun->>ProviderFactory: construct role-specific providers
ProviderFactory->>AlloyProviders: apply polling and wallet nonce configuration
AlloyProviders-->>RuntimeRun: return configured providers
RuntimeRun->>RuntimeWatchers: initialize read-only watcher providers
RuntimeRun->>WalletHandlers: initialize seller and buyer wallet providers
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Coverage reportTotal: 81.51% (was 81.47%, ▲ +0.04%) — 48882/59967 lines
History
|
Review: refactor(node): dedupe runtime helpers (#1252)Tightly-scoped, behavior-preserving cleanup — the three dedups (shared Two things before merge, then some nits. 🔴 Blocking — CI is red
🟡 Should these planning/spec docs be in the PR at all?
Recommendation: drop both files from this PR — the Summary/Impact/Validation in the PR body already captures the intent, and keeping the refactor commit free of process scratch keeps 🟢 Nits (non-blocking)
AssessmentThe Rust changes are correct and low-risk: the clone-then-final-move ordering for the three domains is sound (compiles clean, clippy green), and the provider role mapping preserves poll intervals, simple nonce management, and separate instances. Once markdownlint is green and the docs question is settled, this is good to go. Generated by Claude Code |
Insert the blank line MD032 requires between each **Files:**/**Interfaces:** label and the bullet list that follows it. Resolves the 9 markdownlint errors (lines 25, 32, 63, 71, 98, 101, 150, 154, 260) that were failing the `markdownlint` job — and the aggregate `CI success` gate — on #1274. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_014b9yLJ4z5UQPJgPdViwDum
…-micro-dedups # Conflicts: # crates/node/src/runtime/mod.rs
The #1117 comment described `node_origin_bind_domain` as sharing "same construction as" the serving-side `bind_domain` at line :961, but the runtime dedup turned that into a direct value reuse (`= bind_domain`) and the pointer had drifted (`bind_domain` is constructed at :813; :961 is unrelated pull-through logic). Reword to reflect the reuse and drop the brittle line number. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Summary
PruneGuardImpact
This is a behavior-preserving mechanical cleanup that removes drift-prone runtime setup duplication. The provider-role regression test pins the deliberate shared-head polling exception and both wallet roles.
Validation
cargo test -p decdn-node -- --test-threads=1cargo clippy -p decdn-node --all-targets -- -D warningscargo fmt -- --checkgit diff --checkCloses #1252
Summary by CodeRabbit