From 641031d3dbf2d812deaf807d641344429829ebba Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 19:33:39 +0000 Subject: [PATCH] docs(organizations): drop the retired orphan claim from the SYSTEM_CTX writer lists Middleware A's comment and the matching test comment listed the orphan claim among the legitimate system-context writers that name another organization. That writer is retired; the lists now name only the writers that still exist. Comments only, no behaviour change. Claude-Session: https://claude.ai/code/session_01FaVyM6YvQLg9CsjPVCYc5K Co-authored-by: Claude --- .../plugins/organizations/src/organizations-plugin.test.ts | 4 ++-- packages/plugins/organizations/src/organizations-plugin.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/plugins/organizations/src/organizations-plugin.test.ts b/packages/plugins/organizations/src/organizations-plugin.test.ts index 5f3bf54e9a8..47be9e6ed26 100644 --- a/packages/plugins/organizations/src/organizations-plugin.test.ts +++ b/packages/plugins/organizations/src/organizations-plugin.test.ts @@ -176,8 +176,8 @@ describe('OrganizationsPlugin', () => { expect(opCtx.data.organization_id).toBeUndefined(); }); - // [#2937] The legitimate "set org_id on behalf" path (per-org seed replay / - // orphan-claim, migrations) runs under SYSTEM_CTX — it must keep an explicit + // [#2937] The legitimate "set org_id on behalf" path (per-org seed replay, + // migrations) runs under SYSTEM_CTX — it must keep an explicit // cross-org value verbatim, and it meets neither the stamp nor the wall. it('[#2937] system context preserves an explicit cross-org organization_id (on-behalf writes unaffected)', async () => { const plugin = new OrganizationsPlugin(); diff --git a/packages/plugins/organizations/src/organizations-plugin.ts b/packages/plugins/organizations/src/organizations-plugin.ts index dd2e6514de9..ffc984df06a 100644 --- a/packages/plugins/organizations/src/organizations-plugin.ts +++ b/packages/plugins/organizations/src/organizations-plugin.ts @@ -375,8 +375,8 @@ export class OrganizationsPlugin implements Plugin { // // `isSystem` short-circuited above, so the legitimate writers that // deliberately name another organization — the per-org seed replay, - // the orphan claim, imports, migrations — run under SYSTEM_CTX and - // meet neither this stamp nor the wall. + // imports, migrations — run under SYSTEM_CTX and meet neither this + // stamp nor the wall. if (data.organization_id == null || data.organization_id === '') { data.organization_id = opCtx.context.tenantId; }