diff --git a/plans/plans.go b/plans/plans.go index 7411ccf..52d867f 100644 --- a/plans/plans.go +++ b/plans/plans.go @@ -385,6 +385,35 @@ plans: alerts: false custom_domains: false sla: false + # free mirrors anonymous exactly. anonymous is pre-claim (no team_id); + # free is claimed-but-unpaid (team_id set, no Razorpay subscription). + # Limits + features must stay byte-for-byte identical to anonymous so an + # anonymous->free flip at claim time can't widen or narrow quotas. The + # 24h reaper still applies — pay-from-day-one policy holds for both. + free: + display_name: "Free" + price_monthly_cents: 0 + trial_days: 0 + limits: + provisions_per_day: 5 + postgres_storage_mb: 10 + postgres_connections: 2 + redis_memory_mb: 5 + redis_commands_per_day: 1000 + mongodb_storage_mb: 5 + mongodb_connections: 2 + mongodb_ops_per_minute: 100 + queue_storage_mb: 1024 + storage_storage_mb: 10 + webhook_requests_stored: 100 + team_members: 1 + vault_max_entries: 0 + vault_envs_allowed: [] + deployments_apps: 0 + features: + alerts: false + custom_domains: false + sla: false hobby: display_name: "Hobby" price_monthly_cents: 900 diff --git a/plans/plans_test.go b/plans/plans_test.go index b3117bc..8a41358 100644 --- a/plans/plans_test.go +++ b/plans/plans_test.go @@ -18,7 +18,7 @@ func TestDefault_LoadsWithoutError(t *testing.T) { func TestDefault_AllStandardTiersPresent(t *testing.T) { r := plans.Default() - for _, tier := range []string{"anonymous", "hobby", "pro", "team", "growth"} { + for _, tier := range []string{"anonymous", "free", "hobby", "pro", "team", "growth"} { p := r.Get(tier) assert.Equal(t, tier, p.Name, "tier %q must be in default registry", tier) } @@ -102,8 +102,8 @@ func TestLoad_InvalidYAML_ReturnsError(t *testing.T) { func TestAll_ReturnsAllPlans(t *testing.T) { r := plans.Default() all := r.All() - assert.Len(t, all, 5, "default registry must have 5 plans") - for _, name := range []string{"anonymous", "hobby", "pro", "team", "growth"} { + assert.Len(t, all, 6, "default registry must have 6 plans (anonymous, free, hobby, pro, team, growth)") + for _, name := range []string{"anonymous", "free", "hobby", "pro", "team", "growth"} { assert.Contains(t, all, name) } }