Version: gbrain 0.40.6.0 (engine: postgres/Supabase, MCP stdio via gbrain serve)
Summary: When put_page (called over MCP) creates a page that has no project/source context, its markdown write-through mirror is written into the on-disk local_path of an unrelated federated source, rather than the source the page is actually assigned to.
Observed behavior:
gbrain serve runs with cwd = $HOME (no .gbrain-source pin there).
- Creating cross-cutting pages (tagged
internal, no project) via put_page returns write_through: { written: true, path: "/Users/me/Projects/housefax/<slug>.md" }.
housefax is an unrelated registered federated source. Its page_count stays at 4 (the new pages are not assigned to it) — yet ~20 unrelated pages' .md mirrors accumulated in its repo dir, including auto-created subfolders (office-hours/, internal/pitfalls/).
- The pages themselves correctly live in the
default source (local_path: null).
Expected behavior: write-through should either (a) mirror to the assigned source's local_path, or (b) skip the on-disk mirror entirely when the assigned source has local_path: null (as default does). It should not fall back to writing into some other federated source's working tree — that silently pollutes an unrelated git repo.
Impact: unrelated project repos accumulate stray untracked markdown files from every cross-cutting page write. Confusing, and easy to accidentally commit another topic's notes into the wrong repo.
Workaround: periodically sweep untracked .md files out of the affected source dir. There is no config knob (gbrain config, put, export, sources) to control the write-through target.
Version: gbrain 0.40.6.0 (engine: postgres/Supabase, MCP stdio via
gbrain serve)Summary: When
put_page(called over MCP) creates a page that has no project/source context, its markdown write-through mirror is written into the on-disklocal_pathof an unrelated federated source, rather than the source the page is actually assigned to.Observed behavior:
gbrain serveruns with cwd =$HOME(no.gbrain-sourcepin there).internal, no project) viaput_pagereturnswrite_through: { written: true, path: "/Users/me/Projects/housefax/<slug>.md" }.housefaxis an unrelated registered federated source. Itspage_countstays at 4 (the new pages are not assigned to it) — yet ~20 unrelated pages'.mdmirrors accumulated in its repo dir, including auto-created subfolders (office-hours/,internal/pitfalls/).defaultsource (local_path: null).Expected behavior: write-through should either (a) mirror to the assigned source's
local_path, or (b) skip the on-disk mirror entirely when the assigned source haslocal_path: null(asdefaultdoes). It should not fall back to writing into some other federated source's working tree — that silently pollutes an unrelated git repo.Impact: unrelated project repos accumulate stray untracked markdown files from every cross-cutting page write. Confusing, and easy to accidentally commit another topic's notes into the wrong repo.
Workaround: periodically sweep untracked
.mdfiles out of the affected source dir. There is no config knob (gbrain config,put,export,sources) to control the write-through target.