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
[bug] Collection member_of hierarchy has no cycle validation (DAG invariant unenforced) #1427
validate_no_cycle (sqlite_store.rs:1400) runs only for has_child. Collection hierarchy edges (member_of, via create_relationship in services/node_service/relationship.rs:476-606) get no cycle check, so paths like a:b + b:a create a cycle in the supposed DAG (collection_service.rs:340). A dedicated collection_cycle error exists (services/error.rs:194) but is never used. Once the recursive-CTE bug above is fixed, a cycle makes traversal loop (no depth cap).
Fix: validate no cycle before creating member_of collection-hierarchy edges; return collection_cycle.
Found via the 2026-06-18 multi-repo bug-hunt sweep. Confidence/severity from the sweep + spot-verification.
Resolved in #1457. New validate_no_member_of_cycle is called before creating a collection→collection member_of edge and rejects with the existing collection_cycle error. Closes the DAG hole that, post-#1426, would loop the recursive walk. Tests: cycle + self-edge rejected, non-cycle allowed.
Activity
mstomar125 commentedon Jun 24, 2026
Resolved in #1457. New
validate_no_member_of_cycleis called before creating a collection→collectionmember_ofedge and rejects with the existingcollection_cycleerror. Closes the DAG hole that, post-#1426, would loop the recursive walk. Tests: cycle + self-edge rejected, non-cycle allowed.