Skip to content

memory-ingest stages inside GSTACK_HOME (gitignore=* repo) → gbrain git-aware import sees 0 files → silent false-success #2104

Description

@exGeni

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

  1. makeStagingDir() stages prepared pages under $GSTACK_HOME (~/.gstack), which is itself a git work tree with .gitignore = * (the gstack-artifacts repo).
  2. gbrain v0.42 import <dir> enumerates files via collectSyncableFilesgitListSyncableFiles, which runs git ls-files --cached --others --exclude-standard. Inside a .gitignore = * tree this returns zero files.
  3. gbrain prints Found 0 markdown files, imports 0, exits 0, emits valid {"imported":0,...} JSON.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions