Skip to content

Re-gate Team tier out of self-serve checkout (CEO directive: Team not rolled out)#245

Merged
mastermanas805 merged 1 commit into
masterfrom
fix/team-checkout-gate-2026-06-04
Jun 4, 2026
Merged

Re-gate Team tier out of self-serve checkout (CEO directive: Team not rolled out)#245
mastermanas805 merged 1 commit into
masterfrom
fix/team-checkout-gate-2026-06-04

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Why

HARD CEO directive (2026-06-04): the Team plan ($199 "unlimited") is NOT rolled out and must not be marketable / claimable / chargeable until its unlimited-resource delivery is PROVEN built. This PR reverses the 2026-05-29 (BIZ-1) change that had enabled Team self-serve checkout.

The forum audit (docs/sessions/2026-06-04/TEAM-PLAN-GATE-AND-BUILD.md) found Team was reachable in checkout with only the external Razorpay block accidentally preventing charges — remove that block and Team was instantly buyable with zero code change. This closes the code-level hole.

What

  • billing.go — reject plan=team on both /api/v1/billing/checkout and the in-app plan-change path with a distinct 400 tier_not_yet_available (not the generic invalid_plan), so the dashboard/agents render "contact sales", not "you made a typo".
  • Self-serve-purchasable set is now exactly {hobby, hobby_plus, pro}.
  • Registry-iterating test (TestCheckout_SelfServePurchasablePlans_AreExactlyHobbyHobbyPlusPro) so team can never silently re-enter the purchasable set (rule 18).
  • openapi.go + openapi.snapshot.json + plans.yaml — note Team is gated for rollout (no limit changes).
  • Inline comments reference the directive + memory so a future agent doesn't "re-fix" it back to buyable.

Tests

TestCreateCheckout_TeamPlan_Rejected, TestCheckout_SelfServePurchasablePlans_AreExactlyHobbyHobbyPlusPro, TestResidualChangePlan_TeamTier_Rejected (pass standalone) + TestCov2_Checkout_TeamTierRejected / TestCov2_Checkout_TeamTierYearlyRejected / TestCov2_ChangePlan_TeamTierRejected (DB-backed, run in CI). Local go build + go vet green.

Refs: memory project_team_plan_not_rolled_out_no_payment.

🤖 Generated with Claude Code

@mastermanas805 mastermanas805 enabled auto-merge (squash) June 4, 2026 16:56
…nge (CEO directive)

The Team plan ($199 "unlimited") is NOT rolled out and must not be
marketable / claimable / chargeable until its unlimited-resource delivery
is PROVEN built. This reverses the 2026-05-29 (BIZ-1) change that enabled
Team checkout.

- billing.go: reject plan=team on both /billing/checkout and the in-app
  plan-change path with a DISTINCT 400 `tier_not_yet_available` (not the
  generic `invalid_plan`) so the UI/agents render "contact sales", not
  "you made a typo". Self-serve-purchasable set is now exactly
  {hobby, hobby_plus, pro}.
- registry-iterating test asserts team can never silently re-enter the
  purchasable set (rule 18).
- openapi + plans.yaml: note Team is gated for rollout (no limit changes).

Refs: memory project_team_plan_not_rolled_out_no_payment,
docs/sessions/2026-06-04/TEAM-PLAN-GATE-AND-BUILD.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 force-pushed the fix/team-checkout-gate-2026-06-04 branch from 74a6dd0 to cac653a Compare June 4, 2026 17:03
@mastermanas805 mastermanas805 merged commit b0b3c3c into master Jun 4, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant