You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spec)!: reject unknown keys on RLS policies, sharing rules, and positions (#4001 step 2) (#4099)
Second click of the unknown-key strictness ratchet (first: flow + permission,
#4071), covering the remaining small security-class authoring surfaces from
the ledger's next-target list:
- security/rls.zod.ts: RowLevelSecurityPolicySchema is .strict() — a silently
dropped key meant a row-level restriction was never compiled into the
filter. The runtime shapes stay tolerant; the retired `priority` keeps its
tombstone.
- security/sharing.zod.ts: the sharing-rule base, criteria extension, and
sharedWith recipient are .strict() (strictness and the error map ride the
base into the extension).
- identity/position.zod.ts: PositionSchema is .strict() and gains the
protection block + ADR-0010 runtime envelope, closing the sibling gap the
#4071 ledger flagged.
Fourth ledger finding: position.test.ts asserted a fictional hierarchy — a
pre-ADR-0090 `parent` key that only ever "passed" because .strip ate it.
Rewritten to assert rejection with the flatness guidance.
Verified: spec 6973 tests + tsc clean; all 12 check gates; plugin-security
677 / lint 546 / metadata 276 / platform-objects 239 / metadata-protocol 99;
dogfood 72 files / 418 tests; showcase / crm / todo validate clean.
|`permission.zod.ts`| 4 | authorable |**strict as of #4001**; `EffectiveObjectPermissionSchema` explicitly `.strip()`s (wire) |
171
-
|`rls.zod.ts`| 3 | authorable |**next candidate**— a stripped RLS key is a silent policy hole |
172
-
|`sharing.zod.ts`| 2 | authorable |**next candidate** — same class|
179
+
|`rls.zod.ts`| 3 | authorable |**`RowLevelSecurityPolicySchema` strict as of #4001 step 2**(a stripped RLS key is a silent policy hole); `RLSUserContextSchema` / `RLSEvaluationResultSchema` are runtime shapes — stay tolerant|
180
+
|`sharing.zod.ts`| 2 | authorable |**strict as of #4001 step 2** — rule + recipient shapes; strictness and the error map ride the base into the criteria extension|
173
181
174
182
### `studio/` — 27 sites
175
183
@@ -189,20 +197,23 @@ tightening (the #4001 "sharing-rule lesson": candidates, not verdicts).
0 commit comments