Skip to content

Commit 2c3574c

Browse files
docs(spec): tenancy-posture names @objectstack/organizations as open code, the licence as the commercial entitlement (#29239)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JvmLZEmdwHTktmbLd7981y)_ Fixes #28826 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`packages/spec/src/security/tenancy-posture.ts` 里四处注释不再把 `@objectstack/organizations` 称为 "enterprise";指许可证的地方改称「商业授权(commercial entitlement)」。只改注释,外加一条 spec patch changeset。 - 为什么改:ADR-0132 之后该运行时已在本仓以 Apache-2.0 开源,商业仓只是同名子类加上许可证门。旧注释会让读者和 AI 以为组织隔离或写入盖章是闭源代码。 - 风险与回滚:零行为变化,没有 schema、类型或 `.describe()` 改动,生成的参考文档不动。回滚即 revert 本 PR。 - 先看:`packages/spec/src/security/tenancy-posture.ts`(文件头 "Open code, entitled activation" 一节,以及 `OrgScopingEntitlement` 的说明)。 - 两分钟验证:`grep -n -i enterprise packages/spec/src/security/tenancy-posture.ts`,预期无输出(main 上有 4 处)。 - 需要你做的:无,席位落地。 ## What changes Each of the four `enterprise` hits on `main` was read for whether it meant the package or the commercial licence: - File header, "Open code, entitled activation" (L27 on `main`): meant both. It now says that enabling `group` or `isolated` needs the `@objectstack/organizations` runtime mounted (ADR-0105 D12, ADR-0093 D5), that this runtime is open code from this repository under Apache-2.0 (ADR-0132 D1), and that what stays commercial is the entitlement: the licence gate that the same-named commercial package adds by subclassing the open one (ADR-0132 D2, D3). "Open code does not mean free activation" is kept: ADR-0105 D12 as amended by ADR-0132 still states the code-vs-activation split. - `postureStampsOrganization` docblock (L70): meant the package. Now "The `@objectstack/organizations` runtime (open code, ADR-0132 D1) fills an absent value too". - `OrgScopingEntitlement` docblock (L99): meant the commercial package. Now "the commercial package of the same name ... under its commercial entitlement", plus one sentence that the open package entitles both walled postures by construction (ADR-0132 D4). - Same docblock, per-deployment wall shaping (L114): meant any mounted runtime. Now "only a mounted `org-scoping` runtime may declare anything here, and on a commercial host that is the licence-gated one". - `.changeset/28826-tenancy-posture-open-runtime-wording.md`: `@objectstack/spec` patch, with the two declaration lines. No `.describe()` in the file says "enterprise" (the file has none at all), so nothing generated moves. `check:generated` confirms it. ## Tests No forced test edits and no new tests: comment-only change. No ablation, because no tested behaviour changed. <details><summary>Readings on e6a8c4d</summary> - `pnpm --filter @objectstack/spec build`: VERDICT command-exit 0. - `pnpm --filter @objectstack/spec check:generated`: VERDICT command-exit 0, "All 14 generated artifacts are up to date". - `pnpm --filter @objectstack/spec test`: VERDICT command-exit 0, Test Files 790 passed (790), Tests 23370 passed, 1 todo. - `pnpm --filter @objectstack/spec typecheck`: VERDICT command-exit 0. </details> ## Acceptance notes - Not changed, on purpose: the next header paragraph ("Cloud ADR-0016's 铁律 ... not by giving the posture away") does not say "enterprise", so it is outside this card. It predates ADR-0132, which reads the same iron rule as "a wall is enforcement". Noted here, not filed. - No consumer tests: the claim is `Clause-②: no` / `Metadata-protocol: none`, and the published surface is unchanged apart from comment text in the emitted declarations. ## Verification All readings on head `e6a8c4d7` (objectstack-ai/objectstack). - `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE`: "73 derived famil(ies) accounted for — 73 run, 0 NOT-MEASURED (a DERIVED zero — all 73 recorded an exit code and none of them is 3)". Every one of the 73 exited 0. - Four of them first exited 3 (prerequisite not met, not a red): `check-plugin-teardown-shape --self-test` needed full history, and `check:doc-formula-expressions`, `check:dual-build-cjs-loads`, `check:lean-entry-closure` needed built packages. After `git fetch --unshallow` and `pnpm build` (VERDICT command-exit 0, 117/117 tasks) all four exited 0. - `node scripts/check-changeset-no-major.mjs --base origin/main --event FILE` with this body: exit 0, "LEVEL AXIS: this PR declares clause-② `no` and metadata-protocol `none` ... a non-protocol change at `patch`". - `pnpm check:dev-prereqs` (local-only family): exit 0. - Not run locally, left to CI: `pnpm lint`, the repo-wide scans, and consumer packages (none are owed for a comment-only `Clause-②: no` change). --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmRYknavAqEfbSsc1GG)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent f125ce4 commit 2c3574c

2 files changed

Lines changed: 27 additions & 10 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the tenancy-posture docblocks name `@objectstack/organizations` as open code and the licence as the commercial entitlement
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The file header and the docblocks in `packages/spec/src/security/tenancy-posture.ts` still called the `@objectstack/organizations` runtime "enterprise", although it ships from this repository under Apache-2.0 since ADR-0132 D1. They now name the package without that adjective, and say "commercial entitlement" where they mean the licence gate that the commercial package of the same name adds by subclassing the open one (ADR-0132 D2, D3). What stays true is unchanged: a walled posture (`group` or `isolated`) still needs that runtime mounted to activate (ADR-0093 D5). Comment-only: no schema, type or runtime behaviour changes.

‎packages/spec/src/security/tenancy-posture.ts‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
*
2525
* The wall's IMPLEMENTATION is open — the Layer 0 compiler, `accessible_org_ids`
2626
* resolution and the D5 write stamping all ship in open packages — but ENABLING
27-
* a multi-organization posture (`group` or `isolated`) requires the enterprise
28-
* `@objectstack/organizations` runtime (ADR-0105 D12). The two are separate
29-
* questions and must not be conflated: open code does not mean free activation.
27+
* a multi-organization posture (`group` or `isolated`) requires the
28+
* `@objectstack/organizations` runtime to be mounted (ADR-0105 D12, ADR-0093 D5).
29+
* That runtime is open code too: it ships from this repository under Apache-2.0
30+
* (ADR-0132 D1). What stays commercial is the entitlement — the licence gate the
31+
* commercial package of the same name adds by subclassing the open one (ADR-0132
32+
* D2, D3). The two are separate questions and must not be conflated: open code
33+
* does not mean free activation.
3034
*
3135
* Cloud ADR-0016's 铁律 (强制免费、治理收费) is satisfied by the first half alone —
3236
* it guarantees that a deployment RUNNING a multi-org shape is safe, which the
@@ -67,8 +71,8 @@ export function postureEnforcesWall(posture: TenancyPosture): boolean {
6771
* `packages/drivers/driver-sql`). An explicit value is never overwritten; where
6872
* `@objectstack/plugin-security` installs the wall on the write, it holds that
6973
* value to the Layer 0 verdict, storing it where the wall admits it and
70-
* refusing the write where it does not. The enterprise
71-
* `@objectstack/organizations` runtime fills an absent value too, in its write
74+
* refusing the write where it does not. The `@objectstack/organizations`
75+
* runtime (open code, ADR-0132 D1) fills an absent value too, in its write
7276
* middleware, but it is not the only stamper.
7377
*
7478
* What does need that runtime is ACTIVATING a walled posture (ADR-0105 D12):
@@ -96,9 +100,11 @@ export function postureUsesUnionScope(posture: TenancyPosture): boolean {
96100
*
97101
* Presence-of-package answers "may this deployment run multi-org at all"; it
98102
* cannot answer "which shapes of it" — that is a packaging decision, and the
99-
* commercial runtime owns it. Declaring the set here lets the enterprise package
100-
* gate `group` and `isolated` independently (different tiers, a license flag, a
101-
* trial) without the open core hard-coding anyone's price list.
103+
* commercial runtime owns it. Declaring the set here lets the commercial package
104+
* of the same name gate `group` and `isolated` independently under its
105+
* commercial entitlement (different tiers, a licence flag, a trial) without the
106+
* open core hard-coding anyone's price list. The open package entitles both
107+
* walled postures by construction (ADR-0132 D4).
102108
*
103109
* Omitting `supportedPostures` entitles every walled posture, which is what
104110
* every runtime predating this seam did.
@@ -111,8 +117,9 @@ export function postureUsesUnionScope(posture: TenancyPosture): boolean {
111117
* declaration leaves behaviour byte-identical to a runtime predating the key.
112118
*
113119
* They exist because the alternative seams are dead. Host self-declaration of
114-
* the boundary is a paywall bypass (only a mounted enterprise runtime may
115-
* declare anything here, which is what keeps the org-create gate intact), and
120+
* the boundary is a paywall bypass (only a mounted `org-scoping` runtime may
121+
* declare anything here, and on a commercial host that is the licence-gated
122+
* one, which is what keeps the org-create gate intact), and
116123
* carrying `tenancy` through `objectExtensions` silently drops it in the merge
117124
* (objectstack#12680). Nor can the per-object authoring channel
118125
* (`tenancy: { enabled: false }`) express either fact: that declaration travels

0 commit comments

Comments
 (0)