You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Eliminate duplicated sandbox demo allowlist between runtime and seed tooling #73
Follow-up from PR #72 (Private preview demo tenant: safer resets, seed-demo removal, first-launch tutorial). The safety work in that PR intentionally introduced the same sandbox tenant allowlist in two places:
src/lib/demo.ts for runtime reset protection (SANDBOX_DEMO_SLUGS)
scripts/lib/seedDemoGuard.mjs for seed/provisioning preflight protection
This duplication is currently safe, but it creates a maintenance drift risk. Adding or removing a sandbox tenant in only one place can cause runtime reset behavior and provisioning behavior to disagree.
Goal
Establish a single source of truth for sandbox demo slugs that can be consumed by both application TypeScript and plain Node .mjs tooling without weakening the preflight guard added in PR #72.
Scope
Replace the duplicated allowlist with one shared source that both src/lib/demo.ts and scripts/lib/seedDemoGuard.mjs can consume.
Preserve the current hard safety guarantees:
resetDemoTenant() must refuse non-sandbox companies.
scripts/seed-demo-tenant.mjs must refuse non-allowlisted slugs before any Supabase write.
Custom/private tenants must still require distinct credentials and a non-empty technician handle suffix.
Keep the solution lightweight. Do not introduce a new config service or database-backed registry just to solve this.
Add/adjust regression coverage so runtime and seed tooling cannot silently diverge again.
Acceptance criteria
Sandbox demo slugs are defined in one canonical place.
Runtime demo/reset helpers consume that source.
Seed/provisioning guard consumes that same source.
Activity
#75 Phase 3: expand resetDemoTenant() to a full technician/template b…