diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 00f99a1035..f56cd06f6a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -655,7 +655,7 @@ jobs: # #3280/#3290 org-identifier guard: `organizationId` is the blessed # developer-facing name for the caller's active org in hook/action bodies; - # the `session.tenantId` alias was REMOVED in v11 (#3290). Keeps our own + # the `session.tenantId` alias was REMOVED in v16 (#3290). Keeps our own # reference code (examples/, apps/, AND packages/) — which authors and AIs # copy from — off the removed name. Hard-fail (surfaces carry zero # occurrences today); tests, comments, skills/ and docs/ are excluded, and diff --git a/content/docs/kernel/runtime-services/sharing-service.mdx b/content/docs/kernel/runtime-services/sharing-service.mdx index e043ff9094..50cc041e6b 100644 --- a/content/docs/kernel/runtime-services/sharing-service.mdx +++ b/content/docs/kernel/runtime-services/sharing-service.mdx @@ -95,7 +95,7 @@ export async function mayEditContract( userId: session.userId, // The execution context names the org `tenantId`; a session exposes the // same value as `organizationId` (the `session.tenantId` alias was removed in - // v11, #3290). + // v16, #3290). tenantId: session.organizationId, positions: session.positions, }); diff --git a/packages/objectql/src/engine.test.ts b/packages/objectql/src/engine.test.ts index f73c50cc63..0ee730ca3a 100644 --- a/packages/objectql/src/engine.test.ts +++ b/packages/objectql/src/engine.test.ts @@ -535,7 +535,7 @@ describe('ObjectQL Engine', () => { await engine.insert('task', { title: 'x' }, { context: { userId: 'u1', tenantId: 'org_1' } as any }); // Blessed name carries the org; the deprecated `tenantId` alias was - // removed in v11 (#3290) and must no longer be emitted. + // removed in v16 (#3290) and must no longer be emitted. expect(session.organizationId).toBe('org_1'); expect(session.tenantId).toBeUndefined(); // `ctx.user` shortcut carries the same org for zero-relearning filtering. diff --git a/packages/objectql/src/engine.ts b/packages/objectql/src/engine.ts index dc26e1e1c9..232badbe7e 100644 --- a/packages/objectql/src/engine.ts +++ b/packages/objectql/src/engine.ts @@ -2906,7 +2906,7 @@ export class ObjectQL implements IObjectQLEngine { // active org (matches the `organization_id` column, `current_user` // RLS shape, and seed rows). It comes from `execCtx.tenantId`, which the // kernel resolves from `session.activeOrganizationId`. The deprecated - // `session.tenantId` alias (#3280) was removed here in v11 (#3290) — the + // `session.tenantId` alias (#3280) was removed here in v16 (#3290) — the // driver-layer `execCtx.tenantId` knob is a separate axis and stays. organizationId: execCtx.tenantId, positions: execCtx.positions, diff --git a/packages/objectql/src/plugin.ts b/packages/objectql/src/plugin.ts index e71cac5e28..741ff477c7 100644 --- a/packages/objectql/src/plugin.ts +++ b/packages/objectql/src/plugin.ts @@ -942,7 +942,7 @@ export class ObjectQLPlugin implements Plugin { } // Stamp the driver-layer `tenant_id` column from the caller's active org. // The hook session exposes it as `organizationId` (the `session.tenantId` - // alias was removed in v11, #3290); the column name is a separate axis. + // alias was removed in v16, #3290); the column name is a separate axis. if (isInsert && session?.organizationId && hasField(objectName, 'tenant_id')) { record.tenant_id = record.tenant_id ?? session.organizationId; } diff --git a/packages/plugins/plugin-audit/src/audit-writers.test.ts b/packages/plugins/plugin-audit/src/audit-writers.test.ts index 79decd9bbc..6165b71239 100644 --- a/packages/plugins/plugin-audit/src/audit-writers.test.ts +++ b/packages/plugins/plugin-audit/src/audit-writers.test.ts @@ -1557,7 +1557,7 @@ describe('audit writers — the record\'s own organization stamps the row (#8707 * `organizationId`, `positions`, `accessToken`, plus the conditional * `isSystem` / `actor` / `skipTriggers` / `skipAutomations` / `preserveAudit`. * There is no spread, so no other key can arrive. `session.tenantId` was a - * deprecated alias (#3280) REMOVED repo-wide in the v11 major (#3290). + * deprecated alias (#3280) REMOVED repo-wide in the v16 major (#3290). * * The writer nevertheless read `sess.tenantId` for the RLS fallback, so the * fallback could never fire: on an object with no organization column, or a diff --git a/packages/plugins/plugin-audit/src/audit-writers.ts b/packages/plugins/plugin-audit/src/audit-writers.ts index eec865f54f..d76789ed95 100644 --- a/packages/plugins/plugin-audit/src/audit-writers.ts +++ b/packages/plugins/plugin-audit/src/audit-writers.ts @@ -1348,7 +1348,7 @@ export function installAuditWriters( // [#9516] The fallback arm reads `organizationId` — the ONLY name the // engine emits. `ObjectQL.buildSession` builds the hook session as a fixed // key-set literal with no spread, and the `session.tenantId` alias (#3280) - // was removed repo-wide in the v11 major (#3290). This arm spelled the + // was removed repo-wide in the v16 major (#3290). This arm spelled the // removed name, so it resolved to `undefined` and the guard above could // never fire: every case it names — no organization column, NULL column — // stamped `organization_id: null` and went permanently invisible behind the diff --git a/packages/runtime/src/action-execution.ts b/packages/runtime/src/action-execution.ts index 876edd11ce..0afb90b6be 100644 --- a/packages/runtime/src/action-execution.ts +++ b/packages/runtime/src/action-execution.ts @@ -949,7 +949,7 @@ export function enforceActionParams(deps: ActionExecutionDeps, * * `organizationId` is the blessed name for the caller's active org — the * same value as the `organization_id` column and `current_user.organizationId` - * (RLS). The deprecated `session.tenantId` alias (#3280) was removed in v11 + * (RLS). The deprecated `session.tenantId` alias (#3280) was removed in v16 * (#3290); the driver-layer `ExecutionContext.tenantId` it is sourced from is * a distinct, configurable axis and stays. Returns `undefined` — never `{}` — * for a genuinely context-less / self-invoked call, so a body can tell "no diff --git a/packages/runtime/src/action-session-shape-contract.test.ts b/packages/runtime/src/action-session-shape-contract.test.ts index 752caed44a..161c234d63 100644 --- a/packages/runtime/src/action-session-shape-contract.test.ts +++ b/packages/runtime/src/action-session-shape-contract.test.ts @@ -85,7 +85,7 @@ describe('#5697 — action `ctx.session` matches its declared contract', () => { it('translates `ExecutionContext.tenantId` to the blessed `organizationId`', () => { const built = build({ tenantId: 'org_acme' }); expect(built).toEqual({ organizationId: 'org_acme' }); - // The v11-removed alias (#3280 / #3290) must not reappear. + // The v16-removed alias (#3280 / #3290) must not reappear. expect('tenantId' in built!).toBe(false); }); diff --git a/packages/runtime/src/domains/actions.ts b/packages/runtime/src/domains/actions.ts index 373ce4025e..0f134ee614 100644 --- a/packages/runtime/src/domains/actions.ts +++ b/packages/runtime/src/domains/actions.ts @@ -320,7 +320,7 @@ export async function handleActionsRequest(deps: DomainHandlerDeps, path: string // request (falling back to the id, quietly, when there is none). // `organizationId` remains the blessed developer-facing name for the // caller's active org (matches columns + `current_user.organizationId`); - // the deprecated `tenantId` alias (#3280) was removed in v11 (#3290). + // the deprecated `tenantId` alias (#3280) was removed in v16 (#3290). const ec: any = _context?.executionContext; const userFromAuth = actorUserFromExecutionContext( ec, diff --git a/packages/runtime/src/http-dispatcher.test.ts b/packages/runtime/src/http-dispatcher.test.ts index 00f8479029..4114e913c0 100644 --- a/packages/runtime/src/http-dispatcher.test.ts +++ b/packages/runtime/src/http-dispatcher.test.ts @@ -3965,7 +3965,7 @@ describe('HttpDispatcher — action body ctx.user identity (#2701)', () => { expect(user.permissions).toEqual(['convert_lead']); expect(user.email).toBe('rep@acme.test'); // #3280 made `organizationId` the blessed name; the `tenantId` alias was - // removed in v11 (#3290) and must no longer be emitted on ctx.user. + // removed in v16 (#3290) and must no longer be emitted on ctx.user. expect(user.organizationId).toBe('org_acme'); expect(user.tenantId).toBeUndefined(); }); diff --git a/packages/spec/src/contracts/sharing-service.ts b/packages/spec/src/contracts/sharing-service.ts index 1d46bfd925..de14469fa3 100644 --- a/packages/spec/src/contracts/sharing-service.ts +++ b/packages/spec/src/contracts/sharing-service.ts @@ -598,7 +598,7 @@ export type HierarchyScope = 'unit' | 'unit_and_below' | 'own_and_reports'; * The name follows the repo-wide convention: #3280 made `organizationId` the * blessed developer-facing name for the caller's active org (matching the * `organization_id` column and `current_user.organizationId` in RLS) and #3290 - * removed the `session.tenantId` alias in v11; `scripts/check-org-identifier.mjs` + * removed the `session.tenantId` alias in v16; `scripts/check-org-identifier.mjs` * keeps it that way. */ export interface HierarchyScopeContext { diff --git a/packages/spec/src/data/hook.test.ts b/packages/spec/src/data/hook.test.ts index 986c290f8a..08188207ed 100644 --- a/packages/spec/src/data/hook.test.ts +++ b/packages/spec/src/data/hook.test.ts @@ -609,7 +609,7 @@ describe('HookContextSchema', () => { }); // #3280 made `organizationId` the blessed developer-facing name; the - // `tenantId` alias was removed from this surface in v11 (#3290). A stray + // `tenantId` alias was removed from this surface in v16 (#3290). A stray // `tenantId` key is now stripped by the schema rather than surfaced. it('exposes session.organizationId and no longer carries the removed tenantId alias (#3290)', () => { const context = HookContextSchema.parse({ @@ -676,7 +676,7 @@ describe('HookContextSchema', () => { }, session: { userId: 'user_123', - // `session.tenantId` was removed in v11 (#3280/#3290); the blessed + // `session.tenantId` was removed in v16 (#3280/#3290); the blessed // developer-facing name is `organizationId`. This fixture kept // spelling the retired alias for two majors because nothing // type-checked it — vitest only sees `HookContextSchema.parse`, diff --git a/packages/spec/src/data/hook.zod.ts b/packages/spec/src/data/hook.zod.ts index db51ace607..b8fd2fb2cb 100644 --- a/packages/spec/src/data/hook.zod.ts +++ b/packages/spec/src/data/hook.zod.ts @@ -614,7 +614,7 @@ export const HookContextSchema = lazySchema(() => z.object({ * `organization_id` column, `current_user.organizationId` (RLS/sharing), * and seed rows. `null`/`undefined` on unscoped (platform/community) calls. * - * The former `session.tenantId` alias (#3280) was removed in the v11 major + * The former `session.tenantId` alias (#3280) was removed in the v16 major * (#3290): read the org under this single blessed name. The generic * driver-layer isolation knob (`ExecutionContext.tenantId`, * `DriverOptions.tenantId`) is a distinct, configurable axis and is diff --git a/packages/spec/src/ui/action-params.zod.ts b/packages/spec/src/ui/action-params.zod.ts index 4040ee8d14..38a47bb256 100644 --- a/packages/spec/src/ui/action-params.zod.ts +++ b/packages/spec/src/ui/action-params.zod.ts @@ -252,7 +252,7 @@ export interface ActionEngineFacade { * under two names. `positions` is canonical — it is the ADR-0090 D3 vocabulary * the rest of the platform already uses — and `roles` is the alias kept alive * only for the length of the window, then removed on the path - * `session.tenantId` already walked (#3280 deprecate → #3290 removed in v11). + * `session.tenantId` already walked (#3280 deprecate → #3290 removed in v16). * The announcement a reader migrates from is the ADR-0087 semantic migration * `action-session-roles-to-positions`. Two live spellings is the MIGRATION, * not the destination; phase 1 withheld `positions` precisely so that the @@ -331,7 +331,7 @@ export const ActionSessionSchema = lazySchema(() => z.object({ * `current_user.organizationId` (RLS). Sourced from * `ExecutionContext.tenantId`, which is the distinct driver-level isolation * axis and keeps its own name; the deprecated `session.tenantId` alias - * (#3280) was removed in v11 (#3290) and must not come back. + * (#3280) was removed in v16 (#3290) and must not come back. */ organizationId: z.string().optional().describe('Active organization id (blessed developer-facing name; absent when the call is org-less)'), @@ -384,7 +384,7 @@ export const ActionSessionSchema = lazySchema(() => z.object({ * one spelling ADR-0090 D3 forbids. Migration prescription and acceptance * criteria: the ADR-0087 semantic migration * `action-session-roles-to-positions`. Removal follows the `session.tenantId` - * alias precedent (#3280 deprecated → #3290 removed in v11), i.e. one + * alias precedent (#3280 deprecated → #3290 removed in v16), i.e. one * deprecation window after #5613's runtime half lands, not before. * * Why it is still declared at all: it is what the runtime produces today, diff --git a/packages/triggers/trigger-record-change/src/record-change-trigger.ts b/packages/triggers/trigger-record-change/src/record-change-trigger.ts index 983efe3d9c..7bd70565b4 100644 --- a/packages/triggers/trigger-record-change/src/record-change-trigger.ts +++ b/packages/triggers/trigger-record-change/src/record-change-trigger.ts @@ -448,7 +448,7 @@ export class RecordChangeTrigger implements FlowTrigger { // duplicate of what the engine now resolves authoritatively. The // engine elevates only for `runAs:'system'`. The hook session exposes // the active org as `organizationId` (the deprecated `session.tenantId` - // alias was removed in v11, #3290); it feeds the automation context's + // alias was removed in v16, #3290); it feeds the automation context's // driver-layer `tenantId` field unchanged. ...(session.organizationId ? { tenantId: session.organizationId } : {}), // Expose the record as params too, so flows with named `isInput` diff --git a/scripts/check-org-identifier.mjs b/scripts/check-org-identifier.mjs index 902147f8d9..2244c8d3f3 100644 --- a/scripts/check-org-identifier.mjs +++ b/scripts/check-org-identifier.mjs @@ -9,7 +9,8 @@ // reads `ctx.user.organizationId` / `ctx.session.organizationId`, matching the // `organization_id` column and `current_user.organizationId` in RLS. The old // `ctx.session.tenantId` was a deprecated alias; #3290 REMOVED it from the -// hook/action `ctx.session` surface entirely (v11 major), so any session-borne +// hook/action `ctx.session` surface entirely (the v16 major — see +// `content/docs/releases/v16.mdx`), so any session-borne // `tenantId` read in an authoring body now resolves to `undefined` and is // simply a bug. //