|
17 | 17 | * |
18 | 18 | * Under a walled posture that row is invalid state. It was measured to be |
19 | 19 | * unreadable by anyone: plugin-security's Layer 0 composes a STRICT |
20 | | - * `organization_id = :tenant` and the middleware ANDs it over the driver's |
21 | | - * `(organization_id = :tenant OR organization_id IS NULL)`, and the conjunction |
22 | | - * of the two is the strict equality alone — so on a walled deployment every |
| 20 | + * `organization_id = :tenant` and the middleware ANDed it over the driver's |
| 21 | + * v17 predicate `(organization_id = :tenant OR organization_id IS NULL)`, and |
| 22 | + * the conjunction of the two is the strict equality alone — so on a walled deployment every |
23 | 23 | * principal, at every rung, listed ZERO positions, permission sets and sharing |
24 | 24 | * rules while the tables held rows. |
25 | 25 | * |
|
32 | 32 | * |
33 | 33 | * An organization-less row is INVALID STATE under a walled posture — refuse or |
34 | 34 | * warn loudly, never treat it as a platform-wide default. The older reading, in |
35 | | - * which a NULL organization marked a platform row visible to every tenant, |
36 | | - * survives only as DRIVER-LEVEL COMPATIBILITY BEHAVIOUR: `applyTenantScope` |
37 | | - * still emits the `OR organization_id IS NULL` arm, and this module depends on |
38 | | - * that arm being there — it is precisely how a per-organization pass can still |
39 | | - * SEE a pre-fix organization-less row and therefore say something about it. |
| 35 | + * which a NULL organization marked a platform row visible to every tenant, is |
| 36 | + * retired at every layer: ADR-0131 D8 removed the driver's |
| 37 | + * `OR organization_id IS NULL` arm from `applyTenantScope`, and |
| 38 | + * `check-tenant-chokepoint` refuses it. A per-organization pass therefore no |
| 39 | + * longer SEES an organization-less row at all — the tenant predicate is |
| 40 | + * `organization_id = :tenant` and nothing else — and the 18.x upgrade ceremony |
| 41 | + * (ADR-0131 D10) attributes or retires such rows before a walled deployment |
| 42 | + * boots. |
40 | 43 | * |
41 | 44 | * ## What replaces a reap |
42 | 45 | * |
|
69 | 72 | * So the pass said so instead. Its guard (retired with the seeder) named the |
70 | 73 | * rows and named the remedy, and — this is the load-bearing half — the pass |
71 | 74 | * still CREATES the organization's own copy. The failure shape it exists to |
72 | | - * prevent is the silent no-op: a tenant-threaded pass sees the pre-fix |
73 | | - * organization-less row through the driver's compatibility arm, reads the name |
74 | | - * as already represented, takes the update branch and creates nothing, leaving |
75 | | - * the deployment exactly as broken as before while reporting success. |
| 75 | + * prevent is the silent no-op: a tenant-threaded pass that saw the pre-fix |
| 76 | + * organization-less row through the driver's v17 NULL arm (retired by ADR-0131 |
| 77 | + * D8) read the name as already represented, took the update branch and created |
| 78 | + * nothing, leaving the deployment exactly as broken as before while reporting |
| 79 | + * success. |
76 | 80 | * {@link resolveOwnOrganizationRow} is the one read that distinguishes "this |
77 | 81 | * organization has its row" from "somebody's organization-less row is visible |
78 | 82 | * here", and every seeder in this catalog routes through it. |
@@ -111,13 +115,15 @@ export function rowOrganizationId(row: any): string | null { |
111 | 115 | * Resolve THIS organization's own row for a name, out of what a tenant-scoped |
112 | 116 | * read returned. |
113 | 117 | * |
114 | | - * A scoped read passes through `applyTenantScope`, whose compatibility arm |
115 | | - * returns the caller's rows AND any organization-less ones. Those two are not |
116 | | - * interchangeable and the seeders must never treat them as such: |
| 118 | + * A scoped read passes through `applyTenantScope`, which since ADR-0131 D8 |
| 119 | + * returns the caller's rows only — the driver's NULL arm is retired. A row |
| 120 | + * set can still mix the two classes when it comes from a driver with no |
| 121 | + * native tenant scoping or from an unscoped read, and they are not |
| 122 | + * interchangeable; the seeders must never treat them as such: |
117 | 123 | * |
118 | 124 | * - a row stamped with `organizationId` is this organization's — update it; |
119 | 125 | * - an organization-less row is a PRE-FIX residue that merely happens to be |
120 | | - * visible here. Reading it as "already seeded" is the silent no-op this |
| 126 | + * in the row set. Reading it as "already seeded" is the silent no-op this |
121 | 127 | * catalog exists to prevent, so it is reported separately and never returned |
122 | 128 | * as the organization's own row. |
123 | 129 | * |
|
0 commit comments