Skip to content

measure: census the dependents of the SQL driver's orWhereNull tenant-wall carve-out before deciding its future (NULL org_id rows are globally visible on shared-DB walled deployments) #13564

Description

@hotlong

Filed by the director seat (session local_c32e5a25-0581-4665-952f-60c1be74b250) executing point 5 of the maintainer's 2026-08-31 joint-case ruling on #13491 (verbatim 「同意」): the carve-out below is the AMPLIFIER of the NULL-tenant-row defect class, and the ruling directs it to its own card — ⛔ never a rider on the #13491 implementation. Left ungraded — domain:*/type/priority are triage's.

The carve-out

packages/drivers/driver-sql/src/sql-driver.ts:7320 — the driver's native tenant scope is

(organization_id = :tenantId OR organization_id IS NULL)

a deliberate fail-open so bootstrap-seeded platform rows stay visible to every organization.

Why it needs a census before any design decision

Measured consequences already on record:

Task (measure first, then design)

  1. Census the legitimate dependents of NULL-row visibility: bootstrap seeds, Layer-0 environment-scoped metadata (sys_metadata reads fall back to the NULL layer BY DESIGN — see cloud apps/objectos-ee/objectstack.config.ts walled-posture notes), and any other read path that would break if NULL rows stopped being globally visible.
  2. Classify by object: for which objects is NULL-visibility load-bearing (metadata fallback) vs. accidental (tenant-scoped tables whose writers failed to stamp)?
  3. With the census in hand, bring the design options back through the decision inbox — sketch: (a) keep the carve-out, rely on per-object scope rules above the driver (cloud#1239 pattern); (b) narrow the carve-out to declared-global objects only; (c) posture-dependent behaviour. Each option moves published contract semantics on a security boundary ⇒ maintainer floor, clause-② posture to be judged at claim time.

Refs: #13491 (ruling, point 5) · #13497 (measurement) · #13178 (repair family) · cloud#1232 · cloud#1239.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions