gstack/lib/code-intelligence
Garry Tan a64106535b
fix(code-intelligence): gbrain search/export are consent-gated and receipted
The Sourcebot side got this in the last round; gbrain had the same hole —
search() and export() sent repo-derived query text into a possibly-remote
DATABASE_URL with no consent check and no egress receipt, bypassing the
deny-tier veto. Both now assert consent before any bytes move, receipts
record the actual consent state (never a hardcoded true), and search
receipts carry the query's sha256. gbrain stays fail-closed: the adapter
cannot see where DATABASE_URL points, so every send requires consent.
7 new tests, red-first.
2026-08-14 21:04:18 -07:00
..
contract.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00
gbrain-adapter.ts fix(code-intelligence): gbrain search/export are consent-gated and receipted 2026-08-14 21:04:18 -07:00
graphify-adapter.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00
index.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00
picker.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00
selection.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00
sourcebot-adapter.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00
suggest.ts fix(code-intelligence): consent that means what it says — polarity, receipts, read-only veto 2026-08-14 17:13:22 -07:00