Skip to content

Commit 20b8fe9

Browse files
committed
docs(adr-0058): clarify that D4's using default is per operation, not per policy
A dated note under D4, not an amendment: the check-to-using default is applied across the applicable policies for a write operation, and a USING-only policy adds nothing once any applicable policy declares check. Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8e8a56f commit 20b8fe9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎docs/adr/0058-expression-and-predicate-surface.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,14 @@ With D1/D2, the spec sharing-rule **`condition` (CEL) is compiled** to `criteria
609609

610610
Compile the RLS **`check`** clause (defaulting to `using` when omitted) with the same canonical compiler and enforce it on the **write pre-image path** that already exists for by-id writes (ADR-0056/`#1994`) and on the AST-injected bulk path. A `check` that the compiler cannot lower is a compile error (D2). This closes the declared-but-unenforced `check` gap (ADR-0049).
611611

612+
> **Note (2026-09-24, #19953) — a clarification of "defaulting to `using` when omitted", not an amendment.**
613+
> The default is applied per write operation across the applicable policies, not policy by policy. When any
614+
> applicable policy for the operation declares `check`, only the declared checks take part, OR-combined, and a
615+
> policy with only a `using` beside them adds nothing. Only when none declares `check` does each applicable
616+
> policy's `using` stand in as its check, OR-combined. The published contract is
617+
> `RowLevelSecurityPolicySchema.check`; the runtime selector is `writeCheckPolicies` in
618+
> `packages/plugins/plugin-security/src/security-plugin.ts`. The rest of D4 is unchanged by this note.
619+
612620
### D5 — One fail-policy matrix for the whole expression surface
613621

614622
Today each surface invents its own behavior. Standardize on **three tiers keyed by (when) × (security-relevance)**:

0 commit comments

Comments
 (0)