handbook: narrow versioning design doc scope
Draft
PI
9d ago+335+335+012345678901234567890123456789-0-0-0123456789
Review changes on top of #15332, based on feat-versioning so the diff is the rewrite only.
Decisions
- Full freeze for declarative-config orgs. No change reaches existing customers until they are explicitly moved. Dashboard-only orgs keep today's behavior. "Current state" now lists what really propagates today: benefit property edits, credit units at next renewal, benefit add/remove to past one-time buyers.
- No migrations DSL. Moving customers = bulk subscription update (a loop over today's subscription update) + a new one-time order endpoint. Declarative migrations get their own design doc built on these.
- New ID per version. Purchases stay pinned to their row. Checkout links and discounts are re-pointed in the publish transaction. Checkout creation accepts
external_id. - Draft lives in the API, config is its only writer.
applypublishes at once,apply --draftuploads for read-only dashboard review/publish/discard. No conflict/force/pull rules. - Live membership is derived from
catalogs/catalog_products. No storedis_current; a partial unique index is mentioned as a possible cache. - No meter versioning in v0. Today's
last_billed_eventlock stays. Balance carry-over on move is the M3 direction; a balance shared across meter versions is ruled out. - New orgs only in v0. Adoption stays an open question.
- Grants are re-pointed by benefit
external_idthrough the strategy's existingupdate, so license keys, Discord roles, etc. aren't revoked and reissued on a move. Blocking stricter benefits was considered and rejected. - API hides versions. Lists return only the live catalog, no params. Draft rows only through catalog draft endpoints.
- Webhooks:
product.createdfor the new row,product.updatedfor the row leaving the live catalog.
The benefit ā product cascade is kept and now explained: grants are rebuilt from product.benefits on reactivation, seat claims, etc., so editing links in place would break the freeze for some customers.
Also adds a catalog_benefits membership table, since benefits are versioned too.
For @psincraian
Petru's latest commit (fix: answered questions) is merged in:
- "Discounts already applied to existing subscriptions or checkouts don't change" ā References section.
- The credits answer (settle old usage, revoke old credit grant, grant new prorated credits, extra usage at new price) ā "Moving customers", as the one exception to grant re-pointing. Please confirm this matches what you meant.
š¤ Generated with Claude Code