mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 22:48:57 +02:00
bin/gstack-gbrain-supabase-provision (482-line bash) becomes a 26-line bun-shebang entry over a new importable lib/gbrain-supabase-provision.ts with an injected-deps seam (fetch/env/stdout/sleep — D7: args, never env-mutation-before-import). The 33 spawn-per-test cases run in-process against the same Bun.serve mocks; exactly one spawn smoke keeps the shebang/CLI/receipt contract covered. Byte-compat proven by a 25-case differential harness (old bash bin from git vs new, same mock): stdout, stderr, exit codes identical across all subcommands, JSON/plain modes, and error paths. Egress receipts stay per-attempt, receipt-before-send, fail-closed (scanner updated: SHELL_SINKS -> MODULE_SINKS). No-op sleep injection makes retry/backoff paths instant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>