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
{{ message }}
Repository navigation
sharing: a predicate write asks one write verdict per candidate row, so a member bulk update over 10,000 rows owned by others costs ~5 s for no extra row; give ISharingService a bulk write-scope and verdict contract #35934
Filing gate ③. This is a follow-up from PR #35914 (card #35802), filed on the seat's 19:58Z call; the measurements are in os-dev report 7049211796. Dedupe: ISharingService bulk, buildWriteFilter contract and writeVerdicts returned no open card except #35802 itself.
What happens
With #35914, a predicate (multi: true) update or delete composes the platform write floor per row, the way the by-id path does. Each matched readable row that the floor does not already admit costs one ISharingServicecheckEdit / checkDelete verdict, asked in batches of 25 and bounded by the existing 10,000 readable-row cap. That includes rows the sharing middleware's own buildWriteFilter will AND out anyway.
Measured on SQLite on the #35914 rig, with origin/main shown before the arrow:
Case
Before → after
Reads
Rows written
(i) A member's predicate update over 1,000 readable rows owned by others; every verdict is deny
44 ms → 1,085 ms
3 → 2,004
0
(ii) The same over 10,000 rows
47 ms → 5,298 ms
3 → 20,004
0
(iii) A Modify All holder over 10,000 rows
47 ms → 1,796 ms
2 → 10,003
10,000, all of which the by-id path also admits
(iv) Under an authored using write policy
0 verdicts asked (the S2 early return)
On a networked database each read is a round trip, so the real cost is larger.
Ask
Two parts, both additive to the ISharingService contract in packages/spec, so they need a contract decision:
A bulk write scope (for example buildWriteFilter(object, ctx, verb) exposed on ISharingService). plugin-security ANDs it into the candidate read, so only rows the sharing middleware would let through are asked about. This removes the member all-deny cost, cases (i) and (ii). It changes no row's answer, because a row outside that scope is ANDed out by the sharing middleware today.
A bulk verdict (for example writeVerdicts(object, ids, verb, ctx)) that answers the same tri-state as per-row checkEdit / checkDelete, with one owner-scope read, one share read and one Modify All check per batch. This cuts case (iii) from 1 read per row to about 3 reads per batch.
The bench shows case (ii) back near the main baseline and case (iii) at or below 3 reads per 25-row batch.
Business rationale
Flows, scheduled jobs and server-side bulk updates run predicate writes as business users. After #35914, a rep's bulk update over a shared org-readable object pays for one sharing verdict per row it can see, even when it can write only a handful. Today that is bounded by the 10,000 cap and named in #35914's changeset. A rep's bulk action over a large account list goes from milliseconds to seconds.
Reader: area:data, plugin-sharing and the spec contract owner. Grade, domain and queue are left to triage.
Triage: lands in domain:server (plugin-security / sharing) · pm:queue; rationale: area:data · Task · after #35914 a predicate update or delete asks one sharing write verdict per candidate row (batches of 25, up to the 10,000-row cap), including rows buildWriteFilter will drop anyway; measured on SQLite: 1,000 denied rows 44 ms → 1,085 ms, 10,000 about 5 s, for no extra row written; a regression the fix introduced → p2 · size M (a bulk write-scope and verdict contract on ISharingService).
Folded finding from PR #36117 (card #35917), same mechanism as this card · 2026-11-21T16:19Z
Filed here instead of as a new card: it is the predicate path's sharing bulk write scope, which this card's bulk write-scope contract replaces, in the same files (filing gate dedupe rule: an unclaimed open card on the same mechanism takes the comment).
What. Under an authored permissive update/delete widener, an OPEN row the caller neither owns nor holds a share on is admitted by id (the authored probe checkAuthoredRowWrite lifts the sharing refusal) but left out of a predicate (multi: true) write, because the sharing middleware's bulk scope (buildWriteFilter) stays owner + shares.
Suggested. When this card defines the bulk write-scope / verdict contract, make the predicate scope agree with the by-id authored lift, and flip the relief pin's predicate expectation to r1–r4. Grade stays this card's (p2); triage may re-grade.
Activity
objectstack-fleet commentedon Nov 20, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(plugin-security / sharing) ·pm:queue; rationale: area:data · Task · after #35914 a predicate update or delete asks one sharing write verdict per candidate row (batches of 25, up to the 10,000-row cap), including rowsbuildWriteFilterwill drop anyway; measured on SQLite: 1,000 denied rows 44 ms → 1,085 ms, 10,000 about 5 s, for no extra row written; a regression the fix introduced → p2 · size M (a bulk write-scope and verdict contract onISharingService).objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv
Folded finding from PR #36117 (card #35917), same mechanism as this card · 2026-11-21T16:19Z
Filed here instead of as a new card: it is the predicate path's sharing bulk write scope, which this card's bulk write-scope contract replaces, in the same files (filing gate dedupe rule: an unclaimed open card on the same mechanism takes the comment).
checkAuthoredRowWritelifts the sharing refusal) but left out of a predicate (multi: true) write, because the sharing middleware's bulk scope (buildWriteFilter) stays owner + shares.packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.ts, the plugin-security: the #5492 floor deferral covers only by-id writes; a predicate (multi) update still appliesowner_only_writes, so Modify All and edit shares silently match only self-created rows #35802 relief test at PR fix(plugin-security): a sharing allow keeps the ownership floor beside an authored write policy, so a creator writes their own row by id #36117 heada82a0b1be0: by id r1, r2, r3, r4; by predicate r1, r2. The pin holds the divergence in place until it is worked.owner_only_writes, so Modify All and edit shares silently match only self-created rows #35802's original report.allowdrops owner_only_writes out of the OR of permissive policies, so an owner-creator holding an authored widener is refused on their own row #35917 (7063130499) asks for one answer on the rows the platform floor admits; this divergence is on rows the floor does not admit, outside that ruling.allowdrops owner_only_writes out of the OR of permissive policies, so an owner-creator holding an authored widener is refused on their own row #35917, plugin-security: the #5492 floor deferral covers only by-id writes; a predicate (multi) update still appliesowner_only_writes, so Modify All and edit shares silently match only self-created rows #35802, sharing: a predicate write asks one write verdict per candidate row, so a member bulk update over 10,000 rows owned by others costs ~5 s for no extra row; give ISharingService a bulk write-scope and verdict contract #35934 only).fix(plugin-security): a sharing allow keeps the ownership floor besid…