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] import --auto-collection-routing: Archived/ADR routed outside the import's top collection; multi-parent collections shown under the broadest parent #3812
Follow-up to #1703 / #1705 (both closed). Found in a Sync small-load run: nodespace import dir <parent> --auto-collection-routing (core 0.3.6) on a 36-file docs sample, base directory <parent> containing docs-sync-smoke/{architecture,components,development,strategy,decisions,archived}/.
Reproduced on a freshly built CLI/daemon with an isolated home (the per-file collection routing is identical to the report). Core-only result, collection member_of edges:
Architecture / Components / Development / Strategy -> Docs Sync Smoke
Alternatives, Research -> Strategy ; Market Validation -> Research
Archived -> (no parent) <- should be Docs Sync Smoke:Archived
ADR -> (no parent) <- should be Docs Sync Smoke:ADR
person memberships: 0
The code involved is the same on v0.3.6 and on main.
Findings
Routing is inconsistent with a prefixed base directory (bug, core).derive_collection_metadata (daemon import_service.rs) maps any path containing archived/, decisions/ or adr/, lessons/ to a fixed TOP-LEVEL name (Archived, ADR, Lessons), dropping the leading directories, while every other directory is joined from all its segments (Docs Sync Smoke:Architecture). One import therefore produces two trees. The decisions/ match is also a substring test on the relative path, so a top-level decisions/x.md is not matched (it goes to Decisions), while a/decisions/x.md goes to ADR.
Sidebar shows a single "Default Collection" (UI, and Sync).collections.svelte.ts shows each collection under its FIRST parent only. In a Sync workspace every pushed node, collections included, is also filed member_of the default collection c0000000-0000-0000-0000-000000000001, so a collection has parents [Default, real parent] in an unspecified order, and the tree can show it under Default instead of its real parent. The designed way to hide the default container is the Sync extension's collectionTreeRoots contribution (ADR-082); core has no root of its own (ADR-083). Contributing that root is a Sync-app follow-up, not core.
Importer not a member of imported collections: by design, no core change. Core has no membership or access semantics (ADR-081/083: member_of person edges carry no meaning in core) and get_all_collections has no membership filter. In Sync, a person member_of a collection makes it RESTRICTED (the first authorized member restricts it, ADR-037/083), so stamping the importer on imported collections would silently make a team's imported docs private to the importer. Not doing that. See [bug] Imported/nested collections have no person member_of edge → invisible in the sidebar #1705 for the reachability analysis.
Plan
Make the special-folder routing prefix-aware and segment-based (Docs Sync Smoke:Archived, Docs Sync Smoke:ADR), with unit tests.
Sidebar: when a collection has several parents, nest it under the most specific one (a parent that is itself below another candidate), so the real tree shows even when a workspace-wide container is also a parent.
Activity
mstomar125 commentedon Oct 14, 2026
Claiming: working on this now (branch issue-3812-import-routing-prefix).
Fall back to the bare special-folder name for a file outside the base…
Route imported special folders under the import's top collection; nes…
Keep routed special-folder prefixes valid; pick the display parent or…
Fall back to the bare special-folder name for a file outside the base…
Route imported special folders under the import's top collection; sho…