Skip to content

Commit ef9a7a0

Browse files
committed
docs(spec): the pending defaultRowScope release note and the form ledger's omit reason say the reader is in
Claude-Session: https://claude.ai/code/session_01Nk17Z26X5DB59iQztDBADH Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1081739 commit ef9a7a0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.changeset/24338-object-default-row-scope.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Clause-②: yes (widening)
1111

1212
- **What it parses.** Every member of `RowLevelSecurityPolicySchema` except `object`, the same member schemas: `name`, `label`, `description`, `operation`, `using`, `check`, `positions` and `enabled` (default `true`). The policy's two rules hold as written: at least one of `using` / `check`, and no `check` on a `select` or `delete` policy.
1313
- **What it refuses.** `object` is refused by name, with a prescription to delete it: the target is implied. Any other unknown key is refused too, the policy's retired `priority` and `tags` included.
14-
- **What it does today: nothing.** No server reads the key in this release, so declaring it filters no rows. The describe states the contract the security plugin's row-policy collection is to meet once it reads the key: the default is to apply when no permission set the caller holds carries a row policy for the object; a policy an authored set carries is to be used as authored; a superuser-bypass principal is to be unaffected; an object without the key keeps its behaviour. No object declares the key yet; the platform's identity objects are to declare it for their own tables. Authoring the key raises the liveness lint's `liveness-planned-property` warning until then. Restrict rows with a permission set's `rowLevelSecurity` policy in the meantime.
14+
- **What it does.** The security plugin's row-policy collection (`collectRLSPolicies`), the one step every read, write and explain passes through, applies the key: when the permission sets the caller holds carry no row policy for the object and the operation (a `'*'` policy counts; one switched off, outside the caller's positions, or for another operation does not), the object's default is used in their place and judged like a held policy. A policy an authored set carries for the object is used as authored, with the default not added to it; a principal whose superuser bypass skips row policies is unaffected; an object without the key keeps its behaviour. A `using` the row-filter compiler cannot lower makes the reads it governs return no rows, with one server warning. The platform's identity objects are to declare it for their own tables in a separate change. See the `@objectstack/plugin-security` entry in this release for the reader.
1515
- **`composeStacks` with `objectConflict: 'merge'`** now refuses two stacks that declare a different `defaultRowScope` on the same object, the way it refuses every other fixed-shape config object (`access`, `enable`, `publicSharing`, …). The refusal message's list of those objects names `defaultRowScope` too. Nothing composed before is affected, because no stack declared the key.
1616
- **`@objectstack/metadata-core`: the field-level-security projection classifies the new key.** When an object document is served to a caller who cannot read some of its fields, `defaultRowScope` is treated like a validation rule: the whole policy is dropped from the served document when its `using`, `check` or prose names a field that caller cannot read, and served unchanged otherwise. No behaviour moves until an object declares the key, and no object declares it yet.
1717
- Additive: every object that parsed before still parses, and its parsed output is unchanged.

‎packages/spec/src/system/metadata-form-zod-reconciliation.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ const LEDGER: ReadonlyArray<OmitEntry | SubsetEntry> = [
533533
type: 'object',
534534
path: ROOT_PATH,
535535
key: 'defaultRowScope',
536-
why: "not offered while nothing applies it (#24164 ruling E′, item 1): no server reads the object's default row scope until the security plugin's `collectRLSPolicies` does (#24340), so a form row would let an author declare a row restriction that filters nothing, the declared-not-enforced trap Prime Directive #10 names; its writers are to be the platform identity objects, declared in code (#24341), and none declares it yet. Revisit when the reader lands: a row policy is a composite of a select, two predicate strings and a positions list, a form-face addition rather than a reconciliation",
536+
why: "not offered by this reconciliation (#24164 ruling E′, item 1): the reader is in — the security plugin's `collectRLSPolicies` applies the object's default row scope when no held set carries a row policy for the object and operation (#24340) — but a row policy is a composite of a select, two predicate strings and a positions list, so offering it is a form-face addition rather than a reconciliation of a scalar key; its writers are to be the platform identity objects, declared in code (#24341)",
537537
},
538538
{
539539
kind: 'omit',

0 commit comments

Comments
 (0)