Bug
gbrain sync --source-id <named-source> --full enumerates files from the source's local_path correctly but writes the resulting pages to the default source instead of the named one. The named source remains at 0 pages after sync.
Repro
gbrain sources add gstack-code-foo --path ~/dev/foo --name "foo"
gbrain sources federate gstack-code-foo
gbrain config set sync.repo_path ~/dev/foo
gbrain sync --source-id gstack-code-foo --full
gbrain sources list
# Expected: gstack-code-foo shows N pages
# Actual: default jumps by N pages, gstack-code-foo stays at 0
Verified empirically: synced 12 different repos with named source IDs, all 12 named sources still show 0 pages while default accumulated 1,777 pages total.
Why this matters
Per-source filtering on gbrain query --source <name> becomes impossible — everything lives in default. Use cases like "search only my code, not my notes" or "exclude this client's repo from cross-search" can't be expressed.
It also defeats the per-repo cleanup story: gbrain sources remove gstack-code-foo --yes cascade-deletes 0 rows since nothing ever went there, while the actual data sits orphaned in default.
Workaround
Set global sync.repo_path per-repo before each sync (which is what I did to get the indexing done), and accept that everything lives in default. Loses per-source filtering but at least the data is searchable.
Environment
gbrain 0.32.0, PGLite engine.
Bug
gbrain sync --source-id <named-source> --fullenumerates files from the source'slocal_pathcorrectly but writes the resulting pages to thedefaultsource instead of the named one. The named source remains at0 pagesafter sync.Repro
Verified empirically: synced 12 different repos with named source IDs, all 12 named sources still show
0 pageswhiledefaultaccumulated 1,777 pages total.Why this matters
Per-source filtering on
gbrain query --source <name>becomes impossible — everything lives indefault. Use cases like "search only my code, not my notes" or "exclude this client's repo from cross-search" can't be expressed.It also defeats the per-repo cleanup story:
gbrain sources remove gstack-code-foo --yescascade-deletes 0 rows since nothing ever went there, while the actual data sits orphaned indefault.Workaround
Set global
sync.repo_pathper-repo before each sync (which is what I did to get the indexing done), and accept that everything lives indefault. Loses per-source filtering but at least the data is searchable.Environment
gbrain 0.32.0, PGLite engine.