|
| 1 | +--- |
| 2 | +'@objectstack/spec': minor |
| 3 | +--- |
| 4 | + |
| 5 | +feat(spec)!: remove `tenancy.strategy` + `tenancy.crossTenantAccess`; tenancy block is now strict (#2763) |
| 6 | + |
| 7 | +> ⚠️ RELEASE NOTE — breaking by strict semver, shipped as `minor` per the |
| 8 | +> launch-window policy (owner decision on PR #2962): the fields had zero |
| 9 | +> consumers, behavior is unchanged, and the parse error carries the |
| 10 | +> migration. Fold into the v15 release page's "What's new in 15.x" section |
| 11 | +> when versioning. |
| 12 | +
|
| 13 | +BREAKING CHANGE: `TenancyConfigSchema` drops its two zero-consumer fields, and |
| 14 | +the `tenancy` block is now `.strict()` — an unknown key is a loud parse error |
| 15 | +with tombstone guidance instead of a silent zod strip (#1535; precedent |
| 16 | +ADR-0056 D8 "compliance-grade config must never merely look live", ADR-0049 |
| 17 | +enforce-or-remove). |
| 18 | + |
| 19 | +The platform has exactly two tenancy modes, and neither needs object-level |
| 20 | +strategy config: database-per-tenant isolation is an environment/deployment |
| 21 | +choice (each environment carries its own database URL), and shared-database |
| 22 | +row isolation is `tenancy.enabled` + `tenancy.tenantField` (both stay, both |
| 23 | +live: sql-driver row scoping, security-plugin org scoping). Cross-tenant |
| 24 | +visibility is governed by sharing rules / OWD (ADR-0056), |
| 25 | +`externalSharingModel` (ADR-0090 D11), and the object access posture — never |
| 26 | +by a blanket boolean. |
| 27 | + |
| 28 | +Migration (delete the keys; nothing read them, so behavior is unchanged): |
| 29 | + |
| 30 | +- FROM `tenancy: { enabled: false, strategy: 'shared' }` → TO `tenancy: { enabled: false }` |
| 31 | +- FROM `tenancy: { enabled: true, strategy: '...', tenantField: 'x', crossTenantAccess: false }` → TO `tenancy: { enabled: true, tenantField: 'x' }` |
| 32 | +- Wanted per-tenant databases? Deploy per environment (EnvironmentKernelFactory) — not object metadata. |
| 33 | +- Wanted cross-tenant visibility? Use sharing rules / OWD or `externalSharingModel`. |
| 34 | + |
| 35 | +The compile-time authorWarn for these fields (#2750) and their liveness-ledger |
| 36 | +entries are retired with the removal; the schema itself now carries the |
| 37 | +prescription. |
0 commit comments