Skip to content

Commit e010433

Browse files
committed
docs(adr): ADR-0147 round 2 — name the ADR-0139 D1/D3 departures with pointer notes; the analytics read-scope compiler takes the floor
Contract review 6583043471 on PR #29501: - must-fix 1: ADR-0147 names ADR-0139 D1 ("No second leaf") and D3 ("No DriverCapabilities bit returns") as revisited for its one leaf, and ADR-0139 gains a dated append-only pointer note at each; Amends and Acceptance criteria list all three notes. - must-fix 2: D-d gains the service-analytics compileScopedFilterToSql row (floor, chosen up front), the analytics lane in Consumers and V1, and an analytics pin in D-g. - should-fix: the explainer publishes the array as readFilter; the Consequences say the organization-membership read goes (Leg 1's own sys_member read stays) and drop the failure-surface claim; the floor substitution descends into composed ReadableIds scopes, with a nested pin; D-e cites engine.ts ScopedContext[SEED_USER_GRANTS]; O4 is not a set change. Claude-Session: https://claude.ai/code/session_01ADHkmSNasUm3e1dfbV5aaD Co-authored-by: Claude <noreply@anthropic.com>
1 parent f3a117f commit e010433

2 files changed

Lines changed: 74 additions & 21 deletions

‎docs/adr/0139-engine-internal-semi-join-leaf-readable-parent-ids.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ follow from that position, and they are the whole reason for it:
135135
The leaf is legal on `find`, `findOne`, `count` and `aggregate` (`where` only). On a write verb, in a `having`, or at
136136
any position but a `$in` comparand, the engine refuses it loudly. ⛔ No second leaf, no `EXISTS`, no correlated form.
137137

138+
> **Amendment note (2026-11-02, [ADR-0147](./0147-membership-scoped-rls-lowers-to-an-engine-internal-org-member-semi-join-leaf.md) — #29360).**
139+
> ADR-0147 (Proposed) revisits "No second leaf" for **one** leaf and nothing else: the organization-member set that
140+
> `FIELD in current_user.org_user_ids` names, under its own brand, never as a mode of `ReadableIds`. "No `EXISTS`, no
141+
> correlated form" stands. So does everything this D1 says about `ReadableIds`.
142+
138143
### D2 — ObjectQL composes the scope, once per parent object per request, fail closed
139144

140145
At the engine's executor boundary — on the final AST, after ingress parsing, the comparand doors, the middleware chain
@@ -178,6 +183,12 @@ restriction".
178183
⛔ not `INVALID_FILTER`. A consumer does not catch it into its deny-all sentinel: the read fails and says why
179184
(prefer failing to falling back). ⛔ No `DriverCapabilities` bit returns: the 17.0.0 rationale stands — a bit the
180185
engine does not consult is inert — and here the driver answers by compiling or refusing, so there is nothing to read.
186+
187+
> **Amendment note (2026-11-02, [ADR-0147](./0147-membership-scoped-rls-lowers-to-an-engine-internal-org-member-semi-join-leaf.md) — #29360).**
188+
> For `ReadableIds` this bullet stands as written. ADR-0147 (Proposed) revisits it for its own leaf only. There a
189+
> refusal is excluded, because it would fail every `sys_user` read on a driver that does not compile it. So the
190+
> engine consults a driver declaration to choose between the compiled leaf and the exact-array floor before the call.
191+
> A declaration the engine consults is not the inert bit the 17.0.0 rationale removed.
181192
- The leaf joins the per-driver conformance case-sets, so a driver that compiles it is measured and one that refuses
182193
is recorded as refusing.
183194

0 commit comments

Comments
 (0)