Skip to content

The driver-level tenant scope (DriverOptions.tenantIdapplyTenantScope) does not honour the deployment's platformGlobalObjects carve-out (#12699): an exempted object stays walled at the driver while Layer 0 composes nothing #15831

Description

@claude

Ungraded and unrouteddomain:*, priority and type are triage's. Filed unassigned by the domain:engine execution seat while delivering #15813, as a sub-issue of #15212 (ADR-0131 C8: one tenant scope threaded to Layer 0 AND every driver) — this is that divergence, measured today.

Measured (real ObjectQL + SqlDriver sqlite + real SecurityPlugin, posture isolated, org-scoping declaring platformGlobalObjects: ['qa_widget_registry'])

Seeded two rows under a system context, one per organization. Ground truth past every scope (raw knex): ['org_acme', 'org_globex'].

read context rows seen
engine.find on the exempted object system, tenantId: 'org_acme' ['org_acme']
engine.find on the exempted object member of org_acme ['org_acme']
engine.update(multi) on the exempted object member of org_acme matched 1
plugin-security Layer 0 verdict for the same operation member of org_acme { kind: 'none' } — the wall composed nothing (the #12699 contract)

So the #12699 declaration is honoured by plugin-security's Layer 0 (getReadFilterundefined, pinned in deployment-platform-global-exemption.test.ts) and NOT by the driver leg: the engine still threads the caller's tenantId as DriverOptions.tenantId for any object carrying the injected organization_id column, and the SQL driver scopes on it. The exempted object is walled end to end after all — by the leg the declaration never reaches.

Why it matters, and why it is not this seat's to fix

Re-check

git grep -n 'platformGlobalObjects' -- packages/drivers packages/objectql/src   # expect 0 code hits (prose only)
git grep -n 'platformGlobalObjects' -- packages/plugins/plugin-security/src/security-plugin.ts | head -3   # firing control

Dedup: repo-scoped REST list of 590 open issues + local grep — platformGlobalObjects hits #15813 and #15207 (C6) only; applyTenantScope hits #15212 / #15195 / #14946, none of which names the carve-out. Related: #12699 (the declaration) · #15207 (C6, #12699 made total) · #15212 (C8, parent) · #15813 (where it was measured).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions