Skip to content

Commit c221e16

Browse files
hotlongclaude
andcommitted
docs(organizations): correct the enterprise/closed-source spellings the card's pattern could not see (#16718)
The card's measurement is a case-sensitive regex over `enterprise (@objectstack/organizations|multi-org|organizations)` plus two `closed-source`/`cloud-private` forms. Re-running it case-INSENSITIVELY, and widening to the neighbouring `cloud-private` / `enterprise package` spellings inside the two files the card names as its worst sites, turns up nine more population-1 statements. All nine are in files the previous commit already corrects; every one is a comment. - `cli/src/commands/serve.ts` (×5) · the host-importer docblock used `@objectstack/organizations` as THE example of "a cloud-private package the framework cannot see" — the same reasoning #16539 already applied to the dogfood probe: it is no longer a name this repo can use as an example of something a host root does not have. The example is now framed on what actually decides resolution (the host app's declaration), with ADR-0132's two-packages fact named. · the cloud#1013 narrative said the load "never found the cloud-private package" — true of 2026-07, asserted in the present tense. Now "then-cloud-private": the history is kept, the present claim is dropped. · the live Stage-1 mount comment said "This package is cloud-private" in the boot path itself. Now APP-DECLARED, citing ADR-0132 D3 — which build of the name a deployment gets is the host manifest's call, not `serve`'s. · the ADR-0093 D5 fail-fast comment said "the enterprise package can't provide tenant isolation". - `plugin-dev/src/dev-plugin.ts` — `ENTERPRISE @objectstack/organizations`, in capitals. The card's pattern is case-sensitive, so this hit was invisible to the 65-occurrence count while sitting two lines above one that was counted. - `plugin-auth/src/auth-plugin.ts` — "so the enterprise package needs no change to light it up", on the `org-scoping` presence probe. - `qa/dogfood/test/enterprise-organizations.ts` — the doc heading on `ORGANIZATIONS_PKG` still opened "The enterprise multi-org package", directly contradicted by the ⚠️ #16539 note two lines below it. - `qa/dogfood/test/rls-multitenant.dogfood.test.ts` — "moved to the ENTERPRISE package ... not part of this open workspace". Both halves false since #16215. The skip is unchanged and its real reason is now stated: the gate needs the runtime resolvable FROM THE APP UNDER TEST, which is what `organizationsAvailable` probes. ⛔ No behaviour change: every hunk is a comment. Populations 2 and 3 are untouched — see the PR body for the per-site accounting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent aaee264 commit c221e16

5 files changed

Lines changed: 30 additions & 22 deletions

File tree

‎packages/cli/src/commands/serve.ts‎

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,12 @@ function anchorServedApp(configArg: string): { configPath: string; configExists:
790790
* Node ESM resolves a bare `import(pkg)` against the IMPORTER's own realpath.
791791
* The CLI is reached through a workspace/`link:` dependency, so that realpath is
792792
* inside the FRAMEWORK workspace: a bare import can only see what the framework
793-
* itself installed. A package supplied by the app being served — a cloud-private
794-
* one such as `@objectstack/organizations`, a distribution one such as
795-
* `@objectstack/service-cluster`, or anything a customer installs into their own
796-
* project — is invisible to it no matter what the host app declares.
793+
* itself installed. A package supplied by the app being served — an app-declared
794+
* one such as `@objectstack/organizations` (open core since ADR-0132; a
795+
* commercial deployment resolves that same name to its own private build), a
796+
* distribution one such as `@objectstack/service-cluster`, or anything a customer
797+
* installs into their own project — is invisible to it no matter what the host
798+
* app declares.
797799
*
798800
* #4719: "resolve from the host root" means "resolve what the host root
799801
* DECLARES". The host lookup was a CJS require, CJS honours NODE_PATH, and the
@@ -815,7 +817,7 @@ function anchorServedApp(configArg: string): { configPath: string; configExists:
815817
*
816818
* • cloud#1013 — the binding sat below the AUTH block, so the enterprise
817819
* organizations load resolved in the framework workspace, never found the
818-
* cloud-private package, and every walled-posture deployment hit the
820+
* then-cloud-private package, and every walled-posture deployment hit the
819821
* ADR-0093 D5 fail-fast and exited 1.
820822
* • #10645 — the binding sat below the CLUSTER block, so `serve` could not load
821823
* an app-declared `@objectstack/service-cluster*` at all: on the published EE
@@ -3731,18 +3733,20 @@ export default class Serve extends Command {
37313733
// ── Stage 1: import. Failure here = the package is ABSENT. ──
37323734
try {
37333735
// Resolve from the HOST APP (cloud#1013). This package is
3734-
// cloud-private: it is installed in the served app's
3735-
// node_modules, never in the framework workspace the CLI's own
3736-
// realpath points at, so a bare import here could never find it
3737-
// — `objectstack serve` failed the fail-fast below on EVERY
3738-
// self-hosted walled-posture deployment, and the only way past
3739-
// it was OS_ALLOW_DEGRADED_TENANCY=1, i.e. exactly the unwalled
3740-
// state D5 exists to prevent. The host app declares the package;
3741-
// this resolves it from there.
3736+
// APP-DECLARED (ADR-0132 D3 — which build of the name a
3737+
// deployment gets is the host manifest's call, not `serve`'s):
3738+
// it is installed in the served app's node_modules, never in
3739+
// the framework workspace the CLI's own realpath points at, so a
3740+
// bare import here could never find it — `objectstack serve`
3741+
// failed the fail-fast below on EVERY self-hosted walled-posture
3742+
// deployment, and the only way past it was
3743+
// OS_ALLOW_DEGRADED_TENANCY=1, i.e. exactly the unwalled state D5
3744+
// exists to prevent. The host app declares the package; this
3745+
// resolves it from there.
37423746
orgMod = await importFromHost(organizationsPkg);
37433747
} catch (orgErr) {
37443748
// ADR-0093 D5 — degraded tenancy fails fast. Multi-org was
3745-
// requested but the enterprise package can't provide tenant
3749+
// requested but the organizations package can't provide tenant
37463750
// isolation: `tenant_isolation` RLS would be stripped and every
37473751
// org boundary inert. A deployment that asked for isolation must
37483752
// NOT serve traffic pretending to have it (ADR-0049 at the

‎packages/plugins/plugin-auth/src/auth-plugin.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ export class AuthPlugin implements Plugin {
552552
// the plugin's first service registration (consumers and tests rely on that
553553
// ordering). The `isolated` posture derives `isolationActive` from the
554554
// presence of the `org-scoping` service (registered by
555-
// @objectstack/organizations when installed), so the enterprise package
556-
// needs no change to light it up; `group` is enforced by the open engine and
555+
// @objectstack/organizations when installed), so that package needs no
556+
// change to light it up; `group` is enforced by the open engine and
557557
// never probes. `getService` is a cheap registry lookup and org-scoping
558558
// registers AFTER plugin-auth, so the probe is deferred to first read
559559
// (start()/request time).

‎packages/plugins/plugin-dev/src/dev-plugin.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@ export class DevPlugin implements Plugin {
685685
let organizationsPlugin: Plugin | undefined;
686686

687687
// 5. Security Plugin (RBAC, RLS, field-level masking)
688-
// OrganizationsPlugin (when multi-org; ENTERPRISE `@objectstack/organizations`,
689-
// ADR-0105 D12) MUST register BEFORE SecurityPlugin because
688+
// OrganizationsPlugin (when multi-org; `@objectstack/organizations`, ADR-0105
689+
// D12 as amended by ADR-0132) MUST register BEFORE SecurityPlugin because
690690
// SecurityPlugin.start() probes the `org-scoping` service (the historical
691691
// name the organizations plugin keeps registering) and caches the result for
692692
// the lifetime of the plugin.

‎packages/qa/dogfood/test/enterprise-organizations.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
import { createHostImporter, hostImportFailureKind } from '@objectstack/types/node';
9797

9898
/**
99-
* The enterprise multi-org package (ADR-0105 D12) these gates need.
99+
* The multi-org package (ADR-0105 D12 as amended by ADR-0132) these gates need.
100100
*
101101
* ⚠️ #16539: no longer cloud-private — ADR-0132 / #16215 brought it back to open core as
102102
* `packages/plugins/organizations`. It stays the SUBJECT of this probe (the app

‎packages/qa/dogfood/test/rls-multitenant.dogfood.test.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ import crmStack from '@objectstack/example-crm';
5353
import { bootStack, type VerifyStack } from '@objectstack/verify';
5454
import { runRlsProofs, formatRlsReport, type RlsReport } from '@objectstack/verify';
5555

56-
// The multi-org runtime moved to the ENTERPRISE `@objectstack/organizations`
57-
// package (ADR-0105 D12) — not part of this open workspace. Skip (loudly) when
58-
// it isn't linked in; enterprise/cloud CI, which ships the package, runs this.
56+
// The multi-org runtime lives in `@objectstack/organizations` — ADR-0105 D12 as
57+
// amended by ADR-0132: open core since #16215 (Apache-2.0, no licence check of
58+
// any kind), while a commercial deployment resolves that same name to its own
59+
// private, licence-gated build. What this gate still needs is that runtime
60+
// RESOLVABLE FROM THE APP UNDER TEST, which is what `organizationsAvailable`
61+
// probes — skip (loudly) when it is not; cloud CI, which ships the package,
62+
// runs this.
5963
//
6064
// #4700: the probe used to be a bare `import()`, which Node ESM resolves against
6165
// this file's own realpath in the framework workspace — so it answered "not

0 commit comments

Comments
 (0)