You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(lease): Remove Arc::get_mut anti-pattern from lease injection #211
Current lease injection in NodeBuilder::build() uses Arc::get_mut() pattern which is fragile:
// d-engine-server/src/node/builder.rs#L234-259letmut state_machine:Arc<SM> = self.state_machine.take()?;ifletSome(sm) = Arc::get_mut(&mut state_machine){
sm.try_inject_lease(lease_config)?;}else{// CRITICAL error if Arc is clonedreturnErr("State machine Arc must have single ownership");}
Issues:
Logical contradiction: Comment says "injected before Arc wrapping", but state_machine is already Arc<SM>
Fragile API: Fails with CRITICAL error if Arc is cloned before build()
Anti-pattern: Violates Rust ownership - shouldn't mutate after Arc wrapping
Activity
coderabbitai commentedon Dec 20, 2025
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Similar Issues
Related Issues
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!
feat(lease) #211: remove Arc::get_mut anti-pattern and simplify stand…
chore(workspace) #211: unify version management across workspace
refactor(raft) #209: Architecture review - consolidate v0.2.0 improve…
feat #204: Release v0.2.0 - Production-ready distributed coordination…