gbrain memory lookups find the artifacts source, product pages and newest timeline rows (#4685)

`/sync-gbrain` and `gstack-decision-search --semantic` now find a brain
host's artifacts source through `GSTACK_BRAIN_SOURCE_ID`, planning
skills read their product and brand digests from current gbrain, and the
brain gets each sync's newest artifacts and timeline rows.

Why: five outside reports (#4443, #4327, #4265, #4179, #4362), each
reproduced on main by a test that fails before this change and passes
after it.

Nothing to do unless your artifacts source lives outside
`~/.gstack-brain-worktree`; then set `GSTACK_BRAIN_SOURCE_ID` to its id.

Co-authored-by: Barack-zero-to-one <121355791+Barack-zero-to-one@users.noreply.github.com>
Co-authored-by: exGeni <135786749+exGeni@users.noreply.github.com>
Co-authored-by: atharva081106 <176514655+atharva081106@users.noreply.github.com>
Co-authored-by: extremenelson <2460114+extremenelson@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1v/outside-voice#2 reader=outside-voice
This commit is contained in:
authored and GitHub committed 2026-11-22 11:00:45 +00:00
1 parent 094263d71b
commit 95cf15b3c9
13 files changed
+340 -62

No files matched your search

+12 -4
View File
@@ -47,6 +47,11 @@ The command:
(never auto-executed — run it yourself, or on your own machine
`bin/gstack-gbrain-source-wireup` does the same wiring) so
`gbrain search` can index your synced learnings, plans, and designs.
When the brain host is this same machine and the source sits somewhere
other than `~/.gstack-brain-worktree` (a `--url` or `--path ~/<id>`
clone), set `GSTACK_BRAIN_SOURCE_ID` to the source's id so `/sync-gbrain`
doesn't import your plans and designs a second time and
`gstack-decision-search --semantic` searches that source.
The old `gstack-brain-reader add --ingest-url ...` HTTP path was
removed in v1.15.1.0 — it depended on a `/ingest-repo` endpoint gbrain
never shipped.
@@ -268,10 +273,13 @@ this — it happens automatically at the first skill invocation each day.
Historical note (#2516): that daily pull refreshed only `~/.gstack` itself —
NOT the detached worktree at `~/.gstack-brain-worktree` that gbrain actually
indexes, so the brain silently served stale pages until the next
setup-gbrain/sync-gbrain run. Since this fix, the daily sync also advances
the brain worktree (`gstack-gbrain-source-wireup --advance-only`, throttled
via `~/.gstack/.brain-worktree-last-advance`); a failed advance warns instead
of failing silently, and never force-resets a dirty worktree.
setup-gbrain/sync-gbrain run. Since this fix, every sync ends by advancing
the brain worktree to the commit it just made
(`gstack-gbrain-source-wireup --advance-only`), so gbrain indexes what the
sync published. An advance that fails, or that refuses a dirty worktree,
warns once and waits 24 hours before trying again
(`~/.gstack/.brain-worktree-last-advance`); it never force-resets a dirty
worktree.
## Uninstall