Skip to content

[spec] Remove tenancy.strategy + tenancy.crossTenantAccess at the next major — no requirement (owner decision) #2763

Description

@os-zhuang

Owner 决策(2026-07-10)

对象级 tenancy 隔离策略没有需求。平台的多租户模型只有两种,且都不需要对象级配置:

  1. 每租户独立数据库 —— 部署/环境级(EnvironmentKernelFactory,每环境自带 database_url),零开发、零对象级配置;
  2. 共享数据库 + 组织行级隔离 —— organization_id 注入 + RLS 谓词,机制旋钮是 tenancy.enabled(对象级 org-scope 豁免)与 tenancy.tenantField

因此 TenancyConfigSchema 里两个零消费者字段按 enforce-or-remove 处置为 REMOVE:

字段 承诺 现实 处置
strategy: 'shared'|'isolated'|'hybrid' 每租户独立 DB / 混合 零消费者;对象粒度库隔离在架构上不成立(跨库 join 不存在) 删除(下个 spec major)
crossTenantAccess: boolean 允许跨租户访问"需显式权限" 零消费者;跨可见性治理已由 sharing/OWD(ADR-0056)、externalSharingModel(ADR-0090 D11)、access posture 覆盖 删除(下个 spec major)
enabled / tenantField 行级隔离开关/列名 live(sql-driver:1577/1586、security-plugin、registry;sys_sso_provider 等平台对象用 enabled:false 声明环境级对象) 保留

先例:ADR-0056 D8 —— "compliance-grade config must never merely look live",安全形状的假配置整块移除。

移除 PR 清单(major 窗口开时)

过渡期

编译期 authorWarn 已上线(#2750):作者设这两个字段会收到告警+指向真实机制的 hint。无紧迫性,等 major 窗口。

相关但独立:对象 ledger 剩余 dead 主体(versioning/partitioning/cdc aspirational 块)同教义,另行决策。

来源:#2707/#2727/#2750 liveness 收口讨论。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions