Entitlements
Type: Domain
Schema: entitlements
Tables: 14
Primary source: doc-22 (Resource Pool Architecture Deep-Dive)
Decisions: 1-7, 46-54, 106-107, 109-111
Purpose
Entitlements answers the question: "What capabilities are available, who provisioned them, and how are they distributed?" The resource pool is the bridge between the financial world (billing accounts, subscriptions, purchases) and the resource world (workspaces, boolean entitlements, numeric entitlements, credits). It decouples "who pays" from "who uses" while maintaining a clear audit trail between them. Inspired by GCP's orthogonality principle, pools interpose between billing sources and resource containers, enabling composite funding, departmental isolation, cross-organization sponsorship, and grant-based access without coupling the financial structure to the governance structure.
Tables
| Table | Purpose |
|---|---|
resource_pools |
Capability containers bridging billing and resources; governance-scoped to an organization |
pool_provisions |
Uniform interface through which subscriptions, purchases, and grants connect to pools |
pool_provision_ladders |
Junction recording which plan ladder rung each provision occupies; carries the GiST exclusion constraint enforcing at-most-one-active-provision-per-(pool, ladder) (FK -> billing.plan_ladders) |
grants |
Non-commercial administrative access provisioning (Decision 106) |
pool_assignments |
Workspace-to-pool links that deliver capabilities (primary/secondary semantics) |
pool_ondemand_config |
On-demand resource configuration per pool, with payer designation and spending controls |
entitlement_sets |
Named, reusable collections of entitlement rules. The canonical unit of capability specification, decoupling "what is conferred" from "how it is sold." |
entitlement_set_rules |
Declares what entitlements and credits a set grants when provisioned. Single-table inheritance with four rule types. Formerly product_entitlement_rules (Decision 107); re-parented to entitlement sets. |
boolean_entitlements |
Binary feature flags materialized on pools from rule_type = 'boolean' entitlement set rules |
numeric_entitlements |
Numeric limit and quota definitions; effective limits denormalized from contributions; entitlement_type discriminates limit vs. quota |
numeric_entitlement_contributions |
Per-provision contributions to numeric entitlement limits, supporting stacking policy computation |
numeric_entitlement_usage |
Mutable consumption state, separated from entitlement definitions for write isolation |
resource_keys |
Shared namespace reference table; all resource-identifying columns FK into it (Decision 103) |
usage_events |
Append-only universal consumption records with billing attribution |
Quick Links
- Model Reference -- DDL and table descriptions
- Architecture -- Deep-dive documentation
- Module Companion -- Decisions and open issues
- Interfaces -- Cross-module dependencies