Background
#3280 converged the developer-facing org identifier onto organizationId across the JS authoring surface:
ctx.session.tenantId was kept as a deprecated alias carrying the identical value, marked @deprecated in TSDoc. This issue tracks its eventual removal from the hook/action ctx.session surface, once a deprecation window has passed.
Scope of the removal (when it happens)
Explicit non-goals (do NOT remove/rename)
The generic driver-layer tenancy abstraction stays as-is — it is not "org", the isolation column is configurable, and it legitimately carries an environment id in database-per-tenant kernels:
ExecutionContext.tenantId, DriverOptions.tenantId
SqlDriver.applyTenantScope / tenantFieldByTable, TenancyConfig.tenantField
ExecutionLog.tenantId (flow-execution audit isolation field)
Timing
Schedule for the next major (v11/v12 train). Do not land before a real deprecation window — the alias must stay green for at least one minor cycle so third-party .hook.ts / .action.ts authors can migrate. The @deprecated TSDoc + the #3289 guard are the migration aids in the meantime.
Related
Background
#3280 converged the developer-facing org identifier onto
organizationIdacross the JS authoring surface:ctx.user.organizationId/ctx.session.organizationId(Unify the developer-facing org identifier: hooks exposesession.tenantIdwhile RLS/seed/columns useorganizationId(addorganizationIdas the blessed name) #3280, merged in feat(spec,objectql): unify developer-facing org identifier in hooks — organizationId is blessed (#3280) #3284).ctx.user.organizationId/ctx.session.organizationId(feat(runtime): expose organizationId to action-body ctx (user + session) — follow-up to #3280 #3288).ctx.session.tenantIdwas kept as a deprecated alias carrying the identical value, marked@deprecatedin TSDoc. This issue tracks its eventual removal from the hook/actionctx.sessionsurface, once a deprecation window has passed.Scope of the removal (when it happens)
session.tenantIdfromHookContextSchema.session(spec) — keep onlyorganizationId.tenantIdalias emitted by the engine'sbuildSession()and the runtime'sbuildActionSession()/ actionctx.user.scripts/check-org-identifier.mjsfrom a hard-fail authoring guard to also coveringpackages/**where those are authoring-example bodies (leave the driver layer alone).@objectstack/spec+@objectstack/objectql(+@objectstack/runtime).Explicit non-goals (do NOT remove/rename)
The generic driver-layer tenancy abstraction stays as-is — it is not "org", the isolation column is configurable, and it legitimately carries an environment id in database-per-tenant kernels:
ExecutionContext.tenantId,DriverOptions.tenantIdSqlDriver.applyTenantScope/tenantFieldByTable,TenancyConfig.tenantFieldExecutionLog.tenantId(flow-execution audit isolation field)Timing
Schedule for the next major (v11/v12 train). Do not land before a real deprecation window — the alias must stay green for at least one minor cycle so third-party
.hook.ts/.action.tsauthors can migrate. The@deprecatedTSDoc + the #3289 guard are the migration aids in the meantime.Related
session.tenantIdwhile RLS/seed/columns useorganizationId(addorganizationIdas the blessed name) #3280 (the convergence), feat(spec,objectql): unify developer-facing org identifier in hooks — organizationId is blessed (#3280) #3284, feat(runtime): expose organizationId to action-body ctx (user + session) — follow-up to #3280 #3288, chore(lint): org-identifier authoring guard for deprecated session.tenantId (#3280 follow-up) #3289.