From eb547b8f34ef52059b0ac59f01548bab200cb4fd Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 09:04:56 +0000 Subject: [PATCH] docs(skills): the data skill teaches that a predicate write of a controlled_by_parent detail matches its by-id writes The writeRequiresMasterRead bullet in objectstack-data's rules/relationships.md and eval 17's expected_output said the ownership floor still binds a predicate update or delete. A non-delegated predicate (multi: true) update or delete now writes the rows a by-id write of each would, all matched rows or none; on-behalf-of keeps both users' floors. Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude --- .changeset/36285-relationships-predicate-floor.md | 10 ++++++++++ .../evals/objects-fields-relationships.json | 2 +- skills/objectstack-data/rules/relationships.md | 9 +++++---- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .changeset/36285-relationships-predicate-floor.md diff --git a/.changeset/36285-relationships-predicate-floor.md b/.changeset/36285-relationships-predicate-floor.md new file mode 100644 index 00000000000..bcd98bedccb --- /dev/null +++ b/.changeset/36285-relationships-predicate-floor.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the data skill teaches that a predicate update or delete of a `controlled_by_parent` detail writes the rows its by-id writes do + +Clause-②: no +Metadata-protocol: none + +objectstack-data's `rules/relationships.md`, the `writeRequiresMasterRead: true` bullet under "Writes under `controlled_by_parent`": it no longer says the ownership floor (rows you created) binds a predicate update or delete. It now says a predicate (`multi: true`) update or delete writes the rows a by-id write of each would, all matched rows or none, which is what the runtime does since the change noted as "a predicate update or delete of a `controlled_by_parent` detail now writes every row its caller may write by id". The on-behalf-of half is unchanged: the floor still binds an on-behalf-of update or delete, for both users. `evals/objects-fields-relationships.json`, eval 17: its `expected_output` states the same rule; its assertions are unchanged. diff --git a/skills/objectstack-data/evals/objects-fields-relationships.json b/skills/objectstack-data/evals/objects-fields-relationships.json index 1bdad089ea2..30462bf6f54 100644 --- a/skills/objectstack-data/evals/objects-fields-relationships.json +++ b/skills/objectstack-data/evals/objects-fields-relationships.json @@ -293,7 +293,7 @@ { "id": 17, "prompt": "Order lines belong to orders. Anyone who can see an order should be able to add, change or remove its lines, as far as the line object's own permissions allow; nobody needs edit rights on the order itself for that. How do I declare the line's sharing?", - "expected_output": "`order_line` is `sharingModel: 'controlled_by_parent'` with a required `master_detail` field to `order`, plus `sharing: { controlledByParent: { writeRequiresMasterRead: true } }`: read access to the order becomes the master question for every write (insert, update, delete, re-point), and the line's own object permissions, RLS and FLS decide the rest. Without the key every line write needs edit on the order. Not `ownerMayEdit` (only the owner's by-id update, and refused beside the new key), not the key one level up (`sharing.writeRequiresMasterRead`, refused), and not on a non-`controlled_by_parent` object (refused). The platform ownership floor still binds predicate and on-behalf-of updates and deletes.", + "expected_output": "`order_line` is `sharingModel: 'controlled_by_parent'` with a required `master_detail` field to `order`, plus `sharing: { controlledByParent: { writeRequiresMasterRead: true } }`: read access to the order becomes the master question for every write (insert, update, delete, re-point), and the line's own object permissions, RLS and FLS decide the rest. Without the key every line write needs edit on the order. Not `ownerMayEdit` (only the owner's by-id update, and refused beside the new key), not the key one level up (`sharing.writeRequiresMasterRead`, refused), and not on a non-`controlled_by_parent` object (refused). A predicate (`multi: true`) update or delete writes the rows a by-id write of each would, all matched rows or none. The platform ownership floor still binds on-behalf-of updates and deletes, for both users.", "files": [], "assertions": { "must_contain": [ diff --git a/skills/objectstack-data/rules/relationships.md b/skills/objectstack-data/rules/relationships.md index 63ecd9b14ec..74c58fead6d 100644 --- a/skills/objectstack-data/rules/relationships.md +++ b/skills/objectstack-data/rules/relationships.md @@ -85,10 +85,11 @@ sharing: { controlledByParent: { writeRequiresMasterRead: true } }, // or owner other write, on-behalf-of included, still needs master edit. - `writeRequiresMasterRead: true`: whoever reads the master inserts, updates and deletes the detail under its own object permissions, RLS and FLS (re-points and - each opted-in chain hop too; on-behalf-of, both users must read the master). The - ownership floor (rows you created) still binds predicate and, for both users, on-behalf-of - updates and deletes. Refused beside `ownerMayEdit: true`, which it covers. Lint - `security-controlled-by-parent-owner-policy-without-opt-in` is silent here. + each opted-in chain hop too; on-behalf-of, both users must read the master). A + predicate (`multi: true`) update or delete writes the rows a by-id write of each would, + all matched rows or none. The ownership floor (rows you created) still binds, for both + users, on-behalf-of updates and deletes. Refused beside `ownerMayEdit: true`, which it + covers. Lint `security-controlled-by-parent-owner-policy-without-opt-in` is silent here. The detail's own row policies AND in under both. Each is refused at parse under any other `sharingModel` and one level up (`sharing.KEY`).