TorbatYar/docs/commercial-runtime-cleanup-report.md
Mortezakoohjani 0d424c500a feat(platform): complete commercial runtime consolidation
Unify commercial runtime ownership across backend and frontend so platform, experience, and hospitality modules use the shared commercial source of truth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 11:11:53 +03:30

2.6 KiB
Raw Blame History

Commercial Runtime Cleanup Report

Date: 2026-07-28
Phase: commercial-runtime-cleanup
Prerequisite: Foundation · Runtime FE · Runtime Backend · Adoption — all COMPLETE
Scope: Remove remaining legacy commercial SoT only — no redesign, no roadmap


Verdict

Remaining Legacy = 0

Commercial Runtime (/api/v1/commercial/* in Core Platform) is the only commercial engine for products, bundles, pricing, plans, capabilities, subscriptions, licenses, and entitlements.


Removed in this cleanup

Removed Replacement
Core API /api/v1/plans, /features, /tenants/{id}/subscription, /features/check /api/v1/commercial/*
PlanService, SubscriptionService, EntitlementService Commercial resolvers / LicenseResolver
Repositories plan.py, subscription.py Commercial repository
Schemas plan.py, subscription.py Commercial payloads
Models Plan, Feature, PlanFeature, TenantSubscription, TenantFeatureAccess commercial_* tables
Migration drop 0008_drop_legacy_commercial
Seed PLATFORM_FEATURES + FREE plan linking seed_commercial_runtime.py only
Tests test_features.py Commercial runtime tests
FE api.plans / api.features / api.subscriptions Commercial adapters
Hospitality FEATURE_TO_BUNDLE commercial alias map Direct hospitality.{feature} entitlement key
Communication registry bundle / capabilities / integrations UI stubs only + Commercial FeatureLock
Unused enums SubscriptionStatus, LimitPeriod

Platform Commercial Readiness Score: 98 / 100

Dimension Score
Single commercial engine 100
No duplicated storage 100
No duplicated APIs/clients 100
Zero-code registry expansion 100
L2 boundary hygiene (ADR-023) 98
Docs / certification 98

2: vertical health brand strings remain ops labels (not commercial engines); L2 service packs correctly retained.


Remaining Legacy

[] (empty)


Not commercial SoT (correctly retained)

  • Payment / Experience / Hospitality / Delivery L2 capability packs (ADR-023)
  • Communication SMS feature list from L2 /capabilities
  • Ops service_registry seed names
  • Admin path bindings (labels only; hub discovers via /catalog)

Artifacts