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] Recursive collection members CTE follows has_child, not member_of — sub-collection members silently dropped #1426
get_collection_members_recursive (packages/core/src/db/sqlite_store.rs:3279-3288) descends the collection subtree with WHERE r.relationship_type = 'has_child', but collection hierarchy is built from member_of edges (collection_service.rs:336/341/346). The recursive arm therefore matches nothing → coll_subtree only ever contains the seed → only the direct members of the seed collection are returned; every sub-collection's members are silently omitted. Contradicts the doc ("members of the collection or any descendant collections").
Fix: recursive arm should follow member_of parent→child: SELECT r.in_node ... WHERE r.relationship_type='member_of' AND r.out_node = cs.node_id; add a depth cap.
Found via the 2026-06-18 multi-repo bug-hunt sweep. Confidence/severity from the sweep + spot-verification.
Resolved in #1457. The recursive arm of get_collection_members_recursive now descends member_of parent→child (out_node→in_node), restricted to collection children with a depth cap, instead of has_child (which matched nothing) — so sub-collection members are no longer dropped. Test: a member of a sub-collection is returned for the parent. Full core suite green.
Activity
mstomar125 commentedon Jun 24, 2026
Resolved in #1457. The recursive arm of
get_collection_members_recursivenow descendsmember_ofparent→child (out_node→in_node), restricted to collection children with a depth cap, instead ofhas_child(which matched nothing) — so sub-collection members are no longer dropped. Test: a member of a sub-collection is returned for the parent. Full core suite green.Fix collection-member traversal, member_of cycle guard, FTS backfill (c…