feat(spec)!: 删除 tenancy.strategy + tenancy.crossTenantAccess — tenancy 块 strict 化 + tombstone(#2763) - #2962
Merged
Merged
Conversation
…rict tenancy block with tombstones (#2763) BREAKING CHANGE: TenancyConfigSchema drops its two zero-consumer fields and the tenancy block is now .strict(): an unknown key — a retired strategy/ crossTenantAccess or a typo — is a loud parse error with tombstone guidance instead of a silent zod strip (#1535; ADR-0049 enforce-or-remove, precedent ADR-0056 D8). The platform has exactly two tenancy modes, neither needing object-level strategy config: database-per-tenant isolation is an environment/deployment choice (each environment carries its own database URL), and shared-database row isolation is tenancy.enabled + tenancy.tenantField (both stay live: sql-driver row scoping, security-plugin org scoping). Cross-tenant visibility is governed by sharing/OWD (ADR-0056), externalSharingModel (ADR-0090 D11) and access posture — never a blanket boolean. Per the #2763 removal checklist: - TenancyConfigSchema: fields removed; strictTenancyError zod error map (pattern of strictVisibilityError, ADR-0089 D3a) carries the upgrade prescription pointing at the two real modes - liveness ledger: the two dead entries removed (authorWarn #2750 retires with them); README count table regenerated (object 37/12/1; also fixes pre-existing field/position count drift) - gen:schema + gen:docs: references regenerated (object.mdx no longer advertises 'isolated (separate DB per tenant)'; includes pending regeneration drift from earlier schema changes) - downstream grep: platform-objects sys_sso_provider + test fixtures (plugin-security, driver-sql, driver-sqlite-wasm, spec, cli) drop the retired keys; objectstack-data SKILL.md recipe updated; cloud repo companion PR removes the keys from its service-tenant objects - changeset: major, with FROM → TO migration Spec suite 6792/6792 green; check:liveness green; api-surface unchanged (exports are the same — only the schema shape narrowed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UQjM9nQiF8DRQ3XhuWktHp
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 6 package(s): 109 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…major in the v16 release PR The check-changeset-no-major gate enforces the v15 flow (#2950 precedent): feature PRs land breaking changesets as minor; the release PR promotes to major and adds the vN.mdx upgrade guide. Owner confirmed option A. The changeset body now carries the promotion note. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UQjM9nQiF8DRQ3XhuWktHp
… line per launch-window policy Owner decision (PR #2962 discussion): spec 15.0.0 is already published to npm without this removal, and the launch-window policy ships zero-consumer breaking changes as minor rather than burning a major. Tombstones, liveness notes, and the changeset now say 'removed after v15.0 (#2763)' instead of pinning 16.0.0; the changeset stays minor and folds into the v15 release page's 'What's new in 15.x' section at versioning time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UQjM9nQiF8DRQ3XhuWktHp
os-zhuang
marked this pull request as ready for review
July 15, 2026 14:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
落地 #2763 的 owner 决策(2026-07-10):
TenancyConfigSchema的两个零消费者字段按 enforce-or-remove 处置为 REMOVE。发版路线(owner 已确认):spec 15.0.0 已发布且不含本移除;按 launch-window 政策(CI 门禁原文:破坏性变更随 minor 发、不烧大版本号),本移除随下一个 15.x minor 发布,changeset 为
minor,tombstone 文案采用版本无关写法 "removed after v15.0 (#2763)"。发版时把迁移段落并入 v15 release 页的 "What's new in 15.x"。变更内容(对照 #2763 的移除 PR 清单)
TenancyConfigSchema删除strategy/crossTenantAccess,只保留 live 的enabled+tenantFieldworkflows: [...](and any unknown ObjectSchema key) is silently stripped at build — no error/warning (ADR-0032 'no silent failure', metadata layer) #1535):tenancy 块改为.strict(),并挂strictTenancyErrorerror map(复用 ADR-0089 D3astrictVisibilityError的模式)。未知键不再被 zod 静默 strip,而是响亮报错;两个 retired 键的报错各带 tombstone 处方,指向两种真实模式:库隔离 = 环境级部署(每环境自带 database URL);行级隔离 =enabled+tenantField。crossTenantAccess的 tombstone 指向 sharing/OWD(ADR-0056)、externalSharingModel(ADR-0090 D11)与 access posturegen:schema+gen:docs再生 references:references/data/object.mdx不再宣传 “isolated (separate DB per tenant)”。再生同时带出了此前未再生的漂移(Lifecycle、position、execution-context、security explain/misc、ui/action)——references 目录本就是 AUTO-GEN,以再生输出为准../objectui(无使用)与../cloud(3 个 service-tenant 平台对象有使用,companion PR 见下)。仓内清扫:sys_sso_provider、plugin-security / driver-sql / driver-sqlite-wasm / spec / cli 测试夹具、objectstack-dataSKILL.md 配方、手写文档data-modeling/objects.mdx+protocol/objectql/schema.mdx迁移(行为无变化 —— 两个键从未被读取)
tenancy: { enabled: false, strategy: 'shared' }→tenancy: { enabled: false }tenancy: { enabled: true, strategy: '…', tenantField: 'x', crossTenantAccess: false }→tenancy: { enabled: true, tenantField: 'x' }验证
packages/spec全量测试 251 文件 / 6792 用例绿(含 5 个新增 tombstone/strict 用例)pnpm build70/70 任务绿;受影响包测试全绿:cli 505、plugin-security 423、driver-sql 275、driver-sqlite-wasm 119、platform-objects 80check:liveness绿(proof-tag 警告为既有、与本 PR 无关)gen:api-surface无 diff(导出面不变,仅 schema 形状收窄)合并顺序
strategy键)后合并——旧 spec 里strategy是必填,新 spec 里它是 tombstone,两边只能各配各的 spec 版本(cloud#837 当前 CI 红即此原因,属预期)关联:#2763(决策)、#2750(过渡期 authorWarn)、#1535(no-silent-strip)、#2707/#2727(liveness 收口)
🤖 Generated with Claude Code
https://claude.ai/code/session_01UQjM9nQiF8DRQ3XhuWktHp