Skip to content

Commit c9be979

Browse files
docs(organizations): drop the retired orphan claim from the SYSTEM_CTX writer lists (#25283)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgULzXHHREefG78bonpN6vqt)_ Fixes #25203 Part of #15212 Clause-②: no Metadata-protocol: none ## What this changes Items 9 and 10 of the card: two comments in `@objectstack/organizations` that still named the retired orphan claim (`claimOrphanOrgRows`) among the legitimate SYSTEM_CTX writers that name another organization. That writer no longer exists, so both lists now name only the writers that do. - `packages/plugins/organizations/src/organizations-plugin.ts` (Middleware A, the `isSystem` short-circuit note): "the per-org seed replay, the orphan claim, imports, migrations" becomes "the per-org seed replay, imports, migrations". - `packages/plugins/organizations/src/organizations-plugin.test.ts` (the comment above the system-context cross-org test): "per-org seed replay / orphan-claim, migrations" becomes "per-org seed replay, migrations". Comments only: no code, no assertion and no test name moves. ## Why this closes the card This is the card's last slice. Items 1, 2, 3, 6, 7 and 8 landed through #25266, and item 4 landed with #25210. Item 5 is a governed `.claude/**` line and has its own carrier, #25276, which remains open and is not addressed here. ## What stays `git grep -n -i orphan -- packages/plugins/organizations/src` after the edit, every remaining hit and why it stays: - `organizations-plugin.ts:151` and `:434-435`: they describe the retirement itself ("NO ORPHAN CLAIM", "There used to be a Fallback A"), which is true. Left alone on purpose. - `first-organization-orphan-rows.pin.test.ts:7`: the suite docblock says `claimOrphanOrgRows` "used to run here" and that the claim is retired. True. - `first-organization-orphan-rows.pin.test.ts:152-207`: fixture row ids and names (`acc_orphan`, `task_orphan_1`, "Orphan account") for organization-less rows. They name the data shape, not the retired writer. - `org-scoping-engine.ts:16`: names `OrphanCleanupEngine` in `plugin-sharing`, an unrelated live engine. ## Verification - `pnpm --filter @objectstack/organizations test`: Test Files 16 passed (16), Tests 239 passed (239), lock VERDICT command-exit 0, at `641031d3d`. - `pnpm --filter @objectstack/organizations typecheck`: lock VERDICT command-exit 0, at `641031d3d`. - The derived local gate list (`node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`, 56 commands) was run at `641031d3d`; exit codes are in the dispatch report on the card. ## Changeset None. The diff moves only source comments, which publish nothing, so this PR carries `skip-changeset`. --- _Generated by [Claude Code](https://claude.ai/code/session_01FaVyM6YvQLg9CsjPVCYc5K)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9d96b2b commit c9be979

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/plugins/organizations/src/organizations-plugin.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ describe('OrganizationsPlugin', () => {
176176
expect(opCtx.data.organization_id).toBeUndefined();
177177
});
178178

179-
// [#2937] The legitimate "set org_id on behalf" path (per-org seed replay /
180-
// orphan-claim, migrations) runs under SYSTEM_CTX — it must keep an explicit
179+
// [#2937] The legitimate "set org_id on behalf" path (per-org seed replay,
180+
// migrations) runs under SYSTEM_CTX — it must keep an explicit
181181
// cross-org value verbatim, and it meets neither the stamp nor the wall.
182182
it('[#2937] system context preserves an explicit cross-org organization_id (on-behalf writes unaffected)', async () => {
183183
const plugin = new OrganizationsPlugin();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ export class OrganizationsPlugin implements Plugin {
375375
//
376376
// `isSystem` short-circuited above, so the legitimate writers that
377377
// deliberately name another organization — the per-org seed replay,
378-
// the orphan claim, imports, migrations — run under SYSTEM_CTX and
379-
// meet neither this stamp nor the wall.
378+
// imports, migrations — run under SYSTEM_CTX and meet neither this
379+
// stamp nor the wall.
380380
if (data.organization_id == null || data.organization_id === '') {
381381
data.organization_id = opCtx.context.tenantId;
382382
}

0 commit comments

Comments
 (0)