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
move_node_unchecked omits the container-type check its OCC-checked sibling move_node enforces #3011
No user or developer is currently affected — move_node_unchecked has zero production callers (verified repo-wide), so this is a latent inconsistency/doc-comment mismatch, not an active bug, unless someone later wires it into a real code path.
Root cause
move_node (packages/core/src/services/node_service/hierarchy.rs, ~line 434) explicitly rejects moving a node under a parent whose behavior returns can_have_children() == false. move_node_unchecked (line 333), documented as "for internal operations (imports, type conversions)," performs the same existence/circular-reference checks but has no equivalent container-type check. A repo-wide grep shows every call site is in tests//benches/ or a #[cfg(test)] unit test — this codebase's own mod.rs even documents "move_node_unchecked has no production caller." The daemon's actual import path (import_service.rs) calls create_node_with_parent, which does have the check, not this function.
Suggested fix
Add the same can_have_children() check to move_node_unchecked, or update its doc comment to stop claiming production use and gate it behind test/bench-only visibility.
Found via the 2026-09-25 full-repo code sweep (finding #68 of 84 in CODE_SWEEP_FINDINGS_2026-09-25.md). Severity: low. Category: risky.
Activity
malibio commentedon Sep 26, 2026
Frontend baseline: 5391 passed, 1 failed (known flaky core-plugins viewer timeout)