[STUB-deploy] Register C0 stub as a resolvable BillingProvider — DO NOT MERGE#380
[STUB-deploy] Register C0 stub as a resolvable BillingProvider — DO NOT MERGE#380seanhanca wants to merge 1 commit into
Conversation
Stand up the C0 in-memory stub provider as a first-class, registered
BillingProvider alongside pymthouse so the NAAP-C front door can resolve a
naap_ key against BOTH providers — proving the seam is provider-agnostic
(generalization E8, enforced by INT-G).
- Add BillingProvider{slug:"stub", adapterType:"stub", enabled:false} to the
catalog; persist adapterType in all three upsert paths (web-next seed,
packages/database seed, sync-plugin-registry). enabled:false keeps it out of
the production provider picker; binding a team's billingAccountRef to "stub"
is explicit/opt-in. The stub carries no secrets and needs no provisioning.
- src/lib/billing/stub-provider-config.ts: registration/resolution helpers +
NAAP_ENABLE_STUB_PROVIDER env gate (default OFF) + structured deploy-status
logging (no secrets/PII).
- Tests: catalog registers stub (≥2 providers); static + DB (NAAP-A-db)
registries resolve "stub" → StubAdapter; deploy gate defaults OFF; structured
log carries no secret-bearing keys.
Flag/catalog default keeps prod behavior unchanged (INV-1 green).
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔎 Self code-review (STUB-deploy)Correctness
Safety / invariants
Risks considered
|
Coordination
What
Stand up the C0 in-memory stub as a first-class, registered
BillingProvideralongside pymthouse, so the NAAP-C front door can resolve anaap_key against BOTH providers — proving the seam is provider-agnostic (generalization E8, enforced by INT-G).BillingProvider{slug:"stub", adapterType:"stub", enabled:false}added to the catalog;adapterTypenow persisted in all three upsert paths (web-next seed,packages/databaseseed,sync-plugin-registry).enabled:falsekeeps the stub out of the production provider picker; binding a team'sbillingAccountRef.providerSlugto"stub"is an explicit, opt-in action. The stub carries no secrets and needs no provisioning (contrast pymthouse's OIDC/M2M env).src/lib/billing/stub-provider-config.ts: registration/resolution helpers,NAAP_ENABLE_STUB_PROVIDERenv gate (default OFF), and structured deploy-status logging (no secrets/PII).Self-review
registry.ts) and the DB registry (registry-db.ts, NAAP-A-db) both resolve"stub" → StubAdapter; DB resolution falls back to static on any miss so it stays resolvable even before the catalog row is seeded.Guardrail tests (added)
"stub";secret|token|password.DoD
Made with Cursor