Summary
On a Supabase/Postgres + Windows setup, gstack-memory-ingest reports success but imports 0 transcript pages. Root cause is an interaction with gbrain v0.42's git-aware import.
Mechanism
makeStagingDir() stages prepared pages under $GSTACK_HOME (~/.gstack), which is itself a git work tree with .gitignore = * (the gstack-artifacts repo).
- gbrain v0.42
import <dir> enumerates files via collectSyncableFiles → gitListSyncableFiles, which runs git ls-files --cached --others --exclude-standard. Inside a .gitignore = * tree this returns zero files.
- gbrain prints
Found 0 markdown files, imports 0, exits 0, emits valid {"imported":0,...} JSON.
gstack-memory-ingest sees exit 0 + parseable JSON → treats it as success → advances .transcript-ingest-state.json, marking every session ingested. Net: 0 transcript pages ever reach the brain, silently.
Repro (side-effect-free)
mkdir -p ~/.gstack/.staging-ingest-X/transcripts && printf -- '---\ntitle: t\ntype: transcript\n---\nhi' > ~/.gstack/.staging-ingest-X/transcripts/x.md
git -C ~/.gstack/.staging-ingest-X ls-files --cached --others --exclude-standard # -> EMPTY
Same staged file in a non-git dir is found by gbrain's FS-walk fallback and imports fine.
Suggested fix
- Stage outside any git work tree (e.g. an OS temp dir), or
- Assert
imported + skipped + errors == staged before advancing ingest state (fail loud on the 0-of-N mismatch).
Env
gstack 1.58.4.0, gbrain 0.42.42.0, Windows 10, Supabase Postgres engine.
Summary
On a Supabase/Postgres + Windows setup,
gstack-memory-ingestreports success but imports 0 transcript pages. Root cause is an interaction with gbrain v0.42's git-awareimport.Mechanism
makeStagingDir()stages prepared pages under$GSTACK_HOME(~/.gstack), which is itself a git work tree with.gitignore = *(the gstack-artifacts repo).import <dir>enumerates files viacollectSyncableFiles→gitListSyncableFiles, which runsgit ls-files --cached --others --exclude-standard. Inside a.gitignore = *tree this returns zero files.Found 0 markdown files, imports 0, exits 0, emits valid{"imported":0,...}JSON.gstack-memory-ingestsees exit 0 + parseable JSON → treats it as success → advances.transcript-ingest-state.json, marking every session ingested. Net: 0 transcript pages ever reach the brain, silently.Repro (side-effect-free)
Same staged file in a non-git dir is found by gbrain's FS-walk fallback and imports fine.
Suggested fix
imported + skipped + errors == stagedbefore advancing ingest state (fail loud on the 0-of-N mismatch).Env
gstack 1.58.4.0, gbrain 0.42.42.0, Windows 10, Supabase Postgres engine.