mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 00:21:14 +01:00
Telemetry backend only accepts writes through its own endpoint, and tests stop sending to it (GST-3234) (#4537)
The telemetry backend now takes writes only through its validated endpoint, signed-in Supabase users can read or write nothing, and gstack's tests can no longer send telemetry to the live project. Why: a signed-in prober read two views on 2026-11-19, probes wrote about 2,000 junk rows through the open insert policy, and 41% of all skill-run rows were test-suite traffic. Nothing changes for users until the migrations and edge functions are deployed; the deploy order is under Deploy. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team Review-Finding: supabase/migrations/008_close_anon_writes.sql:9:published-number reader=core Review-Finding: p2/outside-voice#3 reader=outside-voice
This commit is contained in:
1 parent
dab7549451
commit
12cc21872d
15 files changed
+704
-270
No files matched your search
@@ -50,6 +50,11 @@ for (const name of ['GBRAIN_DATABASE_URL', 'GBRAIN_DIRECT_DATABASE_URL', 'DATABA
|
||||
delete process.env[name];
|
||||
process.stderr.write(`test-setup: stripped inherited ${name}; tests must not reach a live gbrain\n`);
|
||||
}
|
||||
// Telemetry clients fall back to supabase/config.sh, the live project, when a
|
||||
// test leaves GSTACK_SUPABASE_URL unset; that is how about 554,000 test rows
|
||||
// reached it. With this set, config.sh yields no endpoint and nothing is sent.
|
||||
// test/telemetry-no-live-endpoint.test.ts holds the tripwire.
|
||||
process.env.GSTACK_TEST_BLOCK_LIVE_TELEMETRY = '1';
|
||||
// One fixture root per test process (GST-1695). TMPDIR (TMP and TEMP on Windows)
|
||||
// points at it, so os.tmpdir() here, and $TMPDIR in a child spawned through
|
||||
// node:child_process or with this process's env, put each fixture inside it; a
|
||||
|
||||
Reference in new issue
Block a user