The v0.32 gbrain sync walker has no .sql extension
in its handled-files list. Projects with SQL migration
corpora (Knex migrations, sqitch, Postgres *.sql
schema files, etc.) get the migrations SKIPPED from the
gbrain index entirely.
For tools that consume gbrain to reason about schema
state, this is a surprise: the migrations are visible
on disk but invisible to queries.
Workaround (when the consumer doesn't strictly
need gbrain to index migrations): consume migrations
directly off disk. Superstack's schema-tracker v2
contract went this route — the contract reads
migrations/*.sql directly without relying on gbrain.
The trade-off is duplicated disk-walk logic in every
consumer.
Expected: .sql files are indexed by the walker.
Either:
- Register a SQL chunker (tree-sitter grammar) so the
files chunk semantically (one statement per chunk),
OR
- Index
.sql files as plaintext when no chunker is
registered (the same fallback strategy used for
un-grammared extensions).
Reproduction:
mkdir /tmp/sql-demo && cd /tmp/sql-demo
git init -q
mkdir migrations
echo "CREATE TABLE users (id SERIAL PRIMARY KEY, email TEXT);" > migrations/001_users.sql
git add -A && git commit -qm init
gbrain sources add sql-demo --path .
gbrain sync --source sql-demo --strategy auto
gbrain list --source sql-demo
# observed: zero SQL pages in the list
Severity: medium for projects with SQL migration
corpora; low for projects that don't use SQL or that
consume migrations directly from disk.
The v0.32
gbrain syncwalker has no.sqlextensionin its handled-files list. Projects with SQL migration
corpora (Knex migrations, sqitch, Postgres
*.sqlschema files, etc.) get the migrations SKIPPED from the
gbrain index entirely.
For tools that consume gbrain to reason about schema
state, this is a surprise: the migrations are visible
on disk but invisible to queries.
Workaround (when the consumer doesn't strictly
need gbrain to index migrations): consume migrations
directly off disk. Superstack's
schema-trackerv2contract went this route — the contract reads
migrations/*.sqldirectly without relying on gbrain.The trade-off is duplicated disk-walk logic in every
consumer.
Expected:
.sqlfiles are indexed by the walker.Either:
files chunk semantically (one statement per chunk),
OR
.sqlfiles as plaintext when no chunker isregistered (the same fallback strategy used for
un-grammared extensions).
Reproduction:
Severity: medium for projects with SQL migration
corpora; low for projects that don't use SQL or that
consume migrations directly from disk.