Quickstart
Gatefit checks your access DB, not Stripe HTTP 200. Node 22+.
1. Adapter
Section titled “1. Adapter”Export createAdapter() (or default) with:
apply(event): ingest one billing eventsnapshot(customerId): return{ locked, plan?, seats?, features? }reset(): required when running more than one golden
locked: true means deny even if Stripe looks paid. Compare is declared-fields-only.
Reference: src/adapters/sqlite.ts in the repo. Anti-pattern: src/adapters/naive.ts (HTTP 200 as access).
Longer contract: bring-your-adapter.md.
2. Run
Section titled “2. Run”npm is coming soon. After npm publish:
npx gatefit --versionnpx gatefit adapter-checknpx gatefit run --suite paid_grants_access --adapter ./src/your-access-adapter.tsFrom a clone until the package is on the registry:
npm installnode bin/gatefit.js adapter-checknode bin/gatefit.js run --suite tests/entitlements/goldens --adapter ./src/your-access-adapter.tsExit 0 means the goldens passed against that adapter.
3. Named gate
Section titled “3. Named gate”In the Gatefit repo:
bash ./ci-local.shDo not set GATEFIT_LIVE_CLOCK for this gate. Do not use sk_live. Live Test Clocks are opt-in and documented in the repo.
4. GitHub Action
Section titled “4. GitHub Action”See GitHub Action.