Description
repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb
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 ISharingService checkEdit / 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 onISharingService). 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-rowcheckEdit/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.
Done when
- Both contract additions are made, with an equivalence pin showing each bulk verdict equals the per-row verdict on the fix(plugin-security)!: a predicate write composes the platform ownership floor per row, as the by-id write does #35914 matrix: owner, non-creator owner, creator non-owner, Modify All, edit share, queue member, and each delegated case.
- plugin-security uses both, and the fix(plugin-security)!: a predicate write composes the platform ownership floor per row, as the by-id write does #35914 pins stay green.
- 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.
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…
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Claim: area o5-D round 4 · 2026-11-26T09:01Z · area:data p2 (area order 「开一个专区 ,接 data 的 p1 p2」, 2026-11-25T23:33Z); card-pick order area:data, first claimable p2 (#37448 waits on #36806; #34365 is a ruled parent whose children seat 7 carries).
Area: o5-D
Session:
session_01Utp6CbdHk3orAeensH6EzSAccount:
os-billBranch:
claude/issue-35934-sharing-bulk-write-scopeWorktree:
objectstack-issue-35934Domain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/spec/src/contracts/sharing-service.ts(the additive bulk write-scope member onISharingService, besidebuildReadFilter),packages/plugins/plugin-sharing/src/**(expose the existingSharingService.buildWriteFilterthrough the contract; any bulk verdict helper),packages/plugins/plugin-security/src/**(the predicate write path ANDs the scope into the candidate read so only rows sharing would admit are asked; the folded #36117 finding 7065565832), the spec generated artefacts through their generators, tests named for the card, root.changeset/. ⛔skills/**, ⛔docs/adr/**. Stop on breach and report.Container & model:
M,mode:subagent,model: default(dispatch-gates --tier: Clause ② SUSPECT onpackages/spec/src/contracts/**; build at default, review atCONTRACT_REVIEW_TIERfor the widening),effort: highClause-②: yes (an additive member on the published
ISharingServicecontract)Metadata-protocol: none
Responsibility: plugin-security's predicate write path (#35914) asks one
checkEdit/checkDeleteverdict per candidate row, including rows the sharing middleware'sbuildWriteFilteralready drops; objectstack · platform path:SharingService.buildWriteFilterexists (plugin-sharing/src/sharing-service.ts:895atdf0894a6) but is not onISharingService· reached by any member bulk update/delete over rows owned by others; measured 10,000 rows ≈ 5 s for no extra row (os-dev report 7049211796).Thread-read: 7065565832
Premise: holds at
origin/maindf0894a6—ISharingService(packages/spec/src/contracts/sharing-service.ts:307) declaresbuildReadFilterandcheckEdit/checkDeletebut no write-scope member;buildWriteFilterlives only on the implementation. Precedent for the new member's name and shape:buildReadFilteron the same contract andbuildWriteFilteron its implementation (same word, same concept). The dev re-measures case (ii) before code.Serial constraints cleared: seat 7's #36055 (os-alice, v19 field-axis switch) is in flight in the security area; overlap-check before each push, stop on a shared file.
Scope: the card's Ask; the folded finding 7065565832 (authored permissive widener: by-id admits a row the predicate path leaves out) rides only if it falls out of the same scope, else it is reported.
Fixes #35934.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
os-dev-report
{ "issue": 35934, "status": "needs_decision", "branch": "claude/issue-35934-sharing-bulk-write-scope", "pr": null, "session": "session_01Utp6CbdHk3orAeensH6EzS", "premise_still_valid": true, "summary": "Stopped before code on a failed mechanism reading. The card's cost is real and reproduced on origin/main df0894a6 (A1, below), but the ruled route, ANDing the implementation's buildWriteFilter(object, ctx, verb) into plugin-security's candidate READ, is refused by the engine for update wherever share grants count: the update scope's share arm is the WRITE form of the SharedRecordIds leaf, which ADR-0155 (3, ruled A) admits only in the where of a predicate update, and a find carrying it answers INTERNAL_ERROR / 500 ('it is the write form, where the where of find admits only the read form'). Delete is unaffected (its scope is owner/depth only, no leaf), but the measured case (ii) is update. Any working shape changes what the new contract member answers or adds a second member, which is a contract-shape decision, so no member was added and no PR was opened. The branch was pushed empty (equal to origin/main df0894a6) as the landing marker; the worktree holds no work. A1 readings: (ii) member predicate update, 10,000 rows owned by others, every verdict deny: 6,013 ms, 20,004 driver reads, 10,000 verdicts, 0 rows written; (ii-delete) the same as a predicate delete: 2,178 ms, 10,003 reads, 10,000 verdicts, 0 deleted; (iii) Modify All update: 1,880 ms, 10,004 reads, 10,000 verdicts, 10,000 written. Feasibility probe for option A below: the same 10,000 candidate ids ANDed with a read-legal write scope (owner match OR the READ-form share leaf) in one find: 1 read, 63 ms, 0 candidates left, so 0 verdicts. A2: the narrowing cannot change which rows are written, whatever the verdicts say, because the sharing middleware ANDs the same buildWriteFilter into the write under the same stamped context (__writeScope from getEffectiveScope, the external grant patch); rows outside it are not written today. Classes where the per-row verdict admits a row the middleware scope excludes all pre-date this card and stay as they are: a phantom owner anchor (scope is deny-all, checkEdit can still allow by share or Modify All), an ownerless row under a non-org depth with a write bypass not reflected in __writeScope, and the folded authored-widener row. A3: one implementer, SharingService (plugin-sharing/src/sharing-service.ts:666); every other holder resolves the kernel 'sharing' service by duck typing (plugin-security's resolveKernelService, plugin-sharing middleware tests' partial doubles cast as any), so a member feature-detected with typeof keeps today's behaviour where it is absent. Folded finding 7065565832 does not fall out of this scope: it is the sharing middleware's bulk scope not consulting probeAuthoredRowWrite, not the candidate narrowing; reported, not widened. Pin impact to expect once a route is chosen: predicate-write-floor-deferral.test.ts case (a) asks edit:r2 and edit:r4 today; with a narrowed candidate set r4 (BOB's row, outside ALICE's write scope) is no longer asked.", "tests": "No code changed, so no test suite was owed. Measurement only, on origin/main df0894a6, through scripts/pm/os-verify-lock.sh: a temporary bench file in plugin-security (the #35914 rig shape: real SecurityPlugin, real ObjectQL, SqlDriver better-sqlite3 in memory, real SharingService and its middleware, public_read object, driver find/findOne/count counted, checkEdit/checkDelete counted). Run 1, VERDICT command-exit 0, Tests 4 passed (4): 'BENCH ii-update-member N=10000 ms=6013 reads=20004 verdicts=10000 written=0', 'BENCH ii-delete-member N=10000 ms=2178 reads=10003 verdicts=10000 remaining=10000', 'BENCH iii-update-modifyall N=10000 ms=1880 reads=10004 verdicts=10000 written=10000', 'LEAF-EXPERIMENT INTERNAL_ERROR 500 [objectql] find('bn_deal'): where.$and[1].$or[1].id.$in holds a SharedRecordIds leaf ... and it is the write form, where the where of find admits only the read form'. Run 2, VERDICT command-exit 0, Tests 1 passed, 4 skipped: 'PROBE-E N=10000 ms=63 reads=1 rows=0'. The bench file was removed from the worktree, uncommitted; a copy is kept at the scratchpad path bench-35934.test.ts.txt under issue-35934/ for the route that follows. No ablation: nothing was implemented.", "gates": "None run: no diff exists (git status --porcelain empty, HEAD df0894a6 = origin/main). Build of the plugin-security closure for the bench: 'pnpm --workspace-concurrency=2 --filter @objectstack/plugin-security... build' under the lock, VERDICT command-exit 0. No PR, so no check-runs to cite. overlap-check not run: nothing was pushed beyond the empty marker branch.", "dogfood_battery": "n/a — no PR, no diff", "mcp_calls": "0", "api_writes": "1 — the os-dev-report comment on issue 35934 through scripts/pm/post-stamped.mjs (relay); plus git push of the empty branch (not a REST write). Write budget used: git push 1 of 1, pr_create 0, os-dev-report 1.", "open_questions": [ { "question": "The ruled route (AND the bulk write scope into plugin-security's candidate read) cannot carry the update scope's share arm: the engine refuses the write-form SharedRecordIds leaf in a find (ADR-0155, 3 ruled A). Which shape should the ISharingService addition take so the member predicate update stops asking one verdict per row?", "options": [ "A. buildWriteFilter(object, context, verb, form?) with an optional form: 'write' (default, today's answer, the one the sharing middleware ANDs into the write) or 'read' (the same owner/depth and queue arms, the share arm as the READ-form leaf, legal in a find). plugin-security reads candidates AND the read form in one find and asks verdicts only about rows left. Cost: a superset narrowing (a row shared at read level only still gets a verdict, deny, and is ANDed out at write as today); the 4th argument departs from the ruled 3-argument shape. Work: M as sized; one contract member plus an optional parameter, plugin-sharing passes the form through (the share arm is built in one place), plugin-security feature-detects the member, pins: counted reads (10,000 denied rows, reads constant), by-id vs predicate parity by row class, ablation of the AND. Measured: 1 read, 63 ms, 0 verdicts on case (ii).", "B. buildWriteFilter(object, context, verb) exactly as ruled, the write form only. plugin-security ANDs it into the candidate read only when it carries no fixed-read leaf (delete always; update only where share grants do not count), else asks every candidate as today. Cost: case (ii) as measured (update, SQL, shares counting) is not improved at all, so the card's Done-when fails; only delete and leaf-less updates gain. Work: S-M.", "C. Card part 2 instead of part 1: a bulk verdict, e.g. checkEditMany / checkDeleteMany(object, ids, context) answering the per-row tri-state with one owner read, one sys_record_share read, one queue read and one Modify All probe per batch, read by plugin-sharing directly as checkEdit does today (no leaf in any find). Cost: reads scale with rows divided by the batch size (about 800 for 10,000 rows at today's batch of 25, about 40 at a batch of 500), not constant; a second, larger contract member with an equivalence pin against the per-row verdict over the whole #35914 matrix; also cuts case (iii). Work: M-L.", "D. Amend ADR-0155 so a find may carry the write form (or a read form with levels). Cost: reopens a ruled ADR decision (Tier H, docs/adr) and the engine seam, the driver compile and the conformance case set for every driver. Work: L, out of this card's file surface." ], "recommendation": "A, provisionally: it is the only option measured to bring case (ii) back to constant reads (1 read, 63 ms) while keeping the ruled name, keeping the per-row verdict authoritative, and changing no written row (the middleware's write-form AND is untouched). C stays available as the card's part 2 for case (iii) if A is accepted. The dispatch did not paste the pm-dispatch decision axes, so these options are not graded on the seat's axes; os-dev.md asks the seat for them rather than having the dev invent a set, so please re-grade A to D on those axes before ruling." }, { "question": "The dispatch asks the os-dev-report comment to carry machine-checkable fields only; os-dev.md asks the same JSON as the final report (security_findings rewritten). Which one governs?", "options": [ "A. os-dev.md: the comment carries the full JSON (followed here, since os-dev.md says it wins over the dispatch on a conflict)", "B. The dispatch: trimmed fields only" ], "recommendation": "A, because os-dev.md states it wins over the dispatch wording; the seat can correct the standard if trimming is meant." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: #35934 (this card, folded comment 7065565832) · noted, not filed: the authored-widener divergence (by id admits an open row through probeAuthoredRowWrite, the predicate write leaves it out because the sharing middleware's buildWriteFilter stays owner plus shares) is in the sharing middleware's bulk scope, not in the candidate narrowing, so no option above fixes it by itself; it needs its own decision on whether the bulk write scope consults the authored probe." ] }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Release: claim 7187325062 (area o5-D, session
session_01Utp6CbdHk3orAeensH6EzS) · 2026-11-26T09:14Z · to the maintainer's decision box, before any code.Why: the pre-code reading (os-dev report 7187608580) found that the card's route, ANDing
buildWriteFilter(object, ctx, verb)into plugin-security's candidate read, fails for update. The update scope's share arm is the write form of theSharedRecordIdsleaf. ADR-0155 (3, ruled A) admits that leaf only in thewhereof a predicate update, so afindcarrying it answers INTERNAL_ERROR / 500. Every working shape either changes what the newISharingServicemember answers or adds a second member. The rules on file do not decide that public-contract choice, so the area may not settle it (SKILL.md, escalation).Readings at
df0894a6:SharingService). Every other holder duck-types, so a feature-detected member keeps today's behaviour where it is absent.Options, as the dev wrote them:
form: 'write' | 'read'tobuildWriteFilter. The read form puts the share arm as the read-form leaf, which is legal in a find. This is a superset narrowing; measured at constant reads. Recommended provisionally.checkEditMany/checkDeleteMany). Reads still scale as rows divided by batch size; it adds a larger second member.The folded finding 7065565832 (authored widener) is in the middleware's bulk scope, and none of A–D fixes it. It needs its own answer.
Next: a decision thread writes the four-axis analysis and the recommendation on this card. On the maintainer's answer, the area re-claims and dispatches. The bench is kept at the area's scratchpad for the chosen route.
Resume-from:
claude/issue-35934-sharing-bulk-write-scope@df0894a6(no commits)2 remaining items
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZisXjXEoyFuymoxFf
Decision analysis · 2026-11-26T09:24Z · decision thread for zone o5-D (os-dev report 7187608580, release 7187648906)
维护者速读
Background
PR #35914 (card #35802, p1) made a predicate (
multi: true) update or delete give the by-id answer on rows the platform ownership floor refuses: for each matched readable row the floor does not admit, plugin-security asks record sharing the by-id write verdict (checkEdit/checkDelete), 25 at a time, up to the 10,000 readable-row cap. Each verdict reads the store once or twice. This card is the cost follow-up. Its Ask has two parts: (1) a bulk write scope onISharingServicethat plugin-security ANDs into its candidate read, and (2) a bulk verdict.The area claimed the card for part 1. The dev stopped before code: for update, the write scope's share arm is the write form of the
SharedRecordIdsleaf, and the engine refuses that form in afind(ADR-0155 Q3, ruled A on 2026-11-17: the write form is admitted in thewhereof a predicate update and nowhere else). So part 1 as written answers 500 for every update where share grants count. The dev put four shapes (A to D) and provisionally recommended A. The card was released to the decision box (7187648906).Second matter, folded onto this card from PR #36117 (comment 7065565832): under an app-authored permissive update or delete policy, a row the policy admits and the caller neither owns nor holds a share on is written by id and silently left out of a predicate write. None of A to D changes that. It needs its own answer, and it has a standing ruling against doing it now (below).
Governing text
whereonly. B violates it for update; D reopens it. —sed -n 732,774p docs/adr/0155-sharing-scope-share-grants-lower-to-an-engine-internal-semi-join-leaf.mdsed -n 1,30p packages/spec/src/data/shared-record-ids.tsallowdrops 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, 2026-11-21): "By-id and bulk give one answer." Ruled for rows the floor admits; quoted as the direction, not as cover for the folded finding.ISharingServicedocblock oncheckEdit: the tri-state (allow/abstain/deny) and "a lookup that throws is adeny, never anabstain". Any set form inherits both. —sed -n 328,357p packages/spec/src/contracts/sharing-service.tsnot_plannedon 2026-09-27 on the maintainer's 「同意」 (comment 5857477356), with the reopen condition "a consumer measured doing a bulk write that an authored widener should admit", and "the bulk composition semantics must then be specified explicitly in a new ruling". Doing it now overturns that deferral, so it is the maintainer's.Protocol
No authorable surface changes under any option (
Metadata-protocol: none). The published service contract changes: A and B add a write-scope member toISharingService(A with a fourth argument); C adds a set-form verdict member; D adds the three-argument member and amends ADR-0155. The folded finding's fix adds one optional member toISecurityService. All are Clause-② and owe a contract review.Premises (each with a re-check; read at
f71d488d)grep -n "SharedRecordIds.write(" packages/plugins/plugin-sharing/src/sharing-service.ts(line 948)whereand refuses the other loudly. —grep -n "const wanted" -A7 packages/objectql/src/fixed-read-leaf-position.ts(line 186). The dev's run read the refusal:INTERNAL_ERROR 500 … it is the write form, where the where of find admits only the read form.resolvePreImageFloorDrop. —grep -n "PREDICATE_WRITE_FLOOR_DECISION_BATCH" packages/plugins/plugin-security/src/security-plugin-sharing-verdicts.tscheckEditreads the row's owner (and the queue column where the object has one), then the caller's write-level share on that row, then asks the Modify All probe. A denied row costs two reads, an owner-matched row one. —sed -n 1215,1265p packages/plugins/plugin-sharing/src/sharing-service.tsid IN (…)list in the write and in the floor's own read. —grep -rn "MAX_BULK_PER_ROW_HOOK_ROWS = " packages/spec/src/data/bulk-write-hook-conformance.ts;sed -n 3222,3245p packages/plugins/plugin-security/src/security-plugin-authz-middleware.tssed -n 1740,1762p packages/plugins/plugin-sharing/src/sharing-plugin.tsnull(no narrowing possible) for a caller atorgwrite depth, which is where a Modify All holder lands, and it contains every row the caller's depth covers. So for a manager or an admin a scope-narrowed candidate list is still the whole list. —sed -n 916,926p packages/plugins/plugin-sharing/src/sharing-service.tsISharingServicein this repository; every consumer resolves it by duck typing. — dev report A3;grep -rn "implements ISharingService" packages --include=*.tssed -n 604,622p packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.tsmulti: true; in this tree the showcase has one such flow and the DocuSign connector two. RESTupdateManytakes records by id and is not a predicate door. —grep -rn "multi: true" examples packages/apps --include=*.ts | grep -v testselectpolicy in the showcase. —grep -rn -A8 "rowLevelSecurity" examples packages/apps --include=*.ts | grep -E "operation|using"not_plannedwith the reopen condition quoted above. —gh api repos/objectstack-ai/objectstack/issues/6736 --jq '.state_reason'The question in one sentence
A bulk change by condition takes seconds because the platform asks "may this user change this row?" once per visible row, and the planned shortcut cannot be built as written, so which shape replaces the row-by-row asking.
Options × real cost × workload
buildWriteFilter(object, ctx, verb, form?)on the contract. Thereadform swaps the share arm for the read-form leaf, legal in a find. plugin-security ANDs it into the candidate read and still asks one verdict per remaining row.ISharingService(per id, the same tri-state). One owner read and one share read answer a whole chunk of ids, and the Modify All probe is asked once. No leaf is involved, so no find rule is touched. plugin-security hands over its candidate list instead of asking row by row. No write-scope member is added.Business translation. A: a doorman first checks a guest list that is wider than the real one, then checks each remaining guest's papers one at a time. B: the doorman uses the list only on days when no invitations were sent. C: hand the whole stack of requests to the desk once; the desk looks in two ledgers and answers every request in one go. D: change the house rule so the doorman may hold the exact list.
Four axes (business stance)
UserRecordAccessfor a set of record ids in one query and evaluates DML access set-wise against the share tables; Dataverse checksPrincipalObjectAccessin SQL forUpdateMultiple. C is that shape. A adds a concept that exists only to step around an engine rule (a "write scope in read form", a deliberate superset) and leaves the per-row loop in place for every row that will actually be written; it needs C afterwards, so the contract ends with two members and a mode argument where one member does the job. D spends a nine-day-old ruled ADR sentence to reach A's result. B is a partial that misses the card's own measured case.denyfor its ids.os-decision-facets
① Long-term fit: C is the set-based verdict the mainstream platforms use and makes by-id the N = 1 case of bulk; A adds a superset "read form" mode that exists only to step around ADR-0155 and still needs C; D reopens a ruled ADR for A's result; B is a partial.
② Business pull: predicate writes by business users come from flows and scripts (3
multi: trueflow nodes in this tree); A serves only rows the caller cannot write; manager, rule-shared and Modify All bulk writes (10,004 reads measured) are served only by C.③ AI-error-proofing: C keeps one verdict with one implementation and fails closed per chunk; A's mode is loud when misused in a write or a find but silent when used to answer "can edit" elsewhere.
④ Startup focus: C is one member, no gate, no ADR; A is a member plus a mode now and C's member later; D is a Tier H amendment; B does not fix the measured case.
Prior rulings read: buildwritefilter,checkedit,predicate,bulk,sharing,verdict,sharedrecordids,authored → 123 hits; ADR-0155 D1, D3, Q3 (ruled A; option C not taken, read above); ADR-0111 D3; ruling 7063130499 on #35917; #5493 Q2 = A1 and #6736 closure 5857477356; coordinator/rulings.md 0 hits; thread: none; repo: objectstack-ai/objectstack
Recommendation: C
Self-check: 只看①选 C;②③④ 是否翻转:否。
Workload note: C is one M to L PR. A is one M PR now and C's PR later, so A is not the cheaper path once the topic's completion standard is counted; the ① readings are not close.
Not taken. A: fixes the one measured case with a superset mode on a published contract and leaves the per-row loop for every row that is written. B: fails the card's Done-when. D: reopens a ruling made on 2026-11-17 to arrive at A's result with an exact scope. A with C (the card's Ask as filed): C at a sensible chunk already brings the all-deny case from 20,004 reads to a handful, so the second member would buy about two reads.
Confidence gaps. (a) C is not measured as built; the read counts are derived from the reads
checkEditmakes (premise 4) and the 63 ms proxy. The premise clause below makes the dev measure first. (b) The chunk size depends on each dialect's bind ceiling; the existing write already binds up to 10,000 ids in one list (premise 5), which is the evidence that a large chunk is safe, not a per-dialect reading. (c) The per-row verdict has an order (queue before the open-OWD abstain) and one-off diagnostics; the set form must reproduce the answers, and the pin matrix is the proof, not this analysis. (d) The mainstream references are from general knowledge, not re-read in this session. (e) Implementers ofISharingServiceoutside this repository were not read; the member is declared optional so an older implementer keeps the per-row path with the same answers.The folded finding: authored wideners on a predicate write
Today: a caller holding an app-authored
usingupdate or delete policy writes an admitted row by id (the sharing gate defers to the policy, ruled on #5493) and silently does not write it by predicate (premise 10). No error, a smaller count.usingpolicy, or any failure: today's scope, unchanged. (v) The relief pin's predicate expectation flips to r1 to r4, and the test(dogfood): probe app-authored RLS wideners on the bulk write path (#6736) #7274 probe pins flip with it. Workload: domain:server · 1 PR, S to M · precedent PR fix(sharing): defer to an app-authored RLS widener before hard-refusing a by-id write (#5493) #6909 (+855/−23, 5 files), PR feat(security): fail-closed authored-row-write verdict on ISecurityService (#5493 step 1) #6841 (+835/−2).Axes. ① One answer by id and in bulk for every write authority is where #35802, #35917 and the topic are heading; an app-declared rule the bulk path does not honour is declared and not enforced. ② No measured consumer (premise 12); the August reason still reads true on the numbers. ③ The failure is silent and lands on exactly the author most likely to be an AI: the policy passes every by-id test and the flow changes fewer rows with no error. There is no loud variant, because the middleware cannot know which rows the author meant. ④ One optional member and one more composition site, for a key that is already declared; no new authorable surface.
Recommendation: 2a, by ①. ② and ④ set the order, not the letter: it follows C as a separate PR so the permission widening gets its own contract review and changeset. It overturns the 2026-08-08 deferral confirmed on 2026-09-27, which only the maintainer can do. Self-check: 只看①选 2a;②③④ 是否翻转:否(②为零拉动,只调时序)。
Execution after the ruling
If C:
claude/issue-35934-sharing-bulk-write-scope@df0894a6, merged with main once before the PR. The card's Ask is narrowed by the ruling: part 2 only. Done-when becomes: the set-form member with an equivalence pin against the per-row verdict over the fix(plugin-security)!: a predicate write composes the platform ownership floor per row, as the by-id write does #35914 matrix (owner, non-creator owner, creator non-owner, Modify All, edit share, queue member, open OWD, owner-less object, phantom anchor, an object where shares do not count, each delegated case); plugin-security uses it and the fix(plugin-security)!: a predicate write composes the platform ownership floor per row, as the by-id write does #35914 pins stay green; the bench shows cases (ii), (ii-delete) and (iii) with sharing reads that no longer grow per row.checkEdit/checkDeleteon the same contract, the…Manysuffix of the data protocol), under the veto window. No write-scope member is added toISharingService.domain:server,area:data, p2,Blocked-by:this card's PR because both edit the sharing middleware's bulk branch. If 2b: nothing is filed; the finding stays recorded in comment 7065565832 and the pin.If A, B or D instead: the area dispatches that shape as the dev described it; for A the read form's superset meaning goes into the contract docblock and part 2 is filed as its own card now; for D an ADR-amendment card is cut first (Tier H) and this card waits
pm:blockedbehind it.The dev report's second question (full JSON or trimmed fields in the report comment) is a wording conflict between two fleet texts, not a product choice; it goes to the area, not to this ruling.
Related
Topic #36232 · #35802 and PR #35914 (per-row floor decision) · #35917 and PR #36117 (ruling A, the relief pin) · ADR-0155, #33787, #33899 · #5493, #6735, PR #6841, PR #6909, #6736, PR #7274 (authored wideners) · #36034, #36120 (PostgreSQL readings, open).
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZisXjXEoyFuymoxFf
Ruled: 2026-11-26T11:08Z · option C for the card's question, and 2a for the folded finding — record sharing answers the write verdict for a set of ids at once, and no write-scope member is added; a predicate write also honours an app-authored update or delete policy, in its own PR after this card's.
checkEditdocblock onISharingService(the tri-state, and a lookup that throws is adeny); ruling A on plugin-security: on a by-id write, a sharingallowdrops 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), "By-id and bulk give one answer". For 2a: this ruling replaces the deferral of 2026-08-08 on On objects that carry sharing rules, sharing middleware answers FORBIDDEN before RLS update-wideners are consulted — the identical widener works on rule-less objects #5493 (Q2 = A1) and the reopen condition Authored RLS update-wideners are silently ineffective on the bulk write path — buildWriteFilter ANDs them away (fewer rows, no error) #6736 was closed on (5857477356), and states the bulk composition semantics that hold required.ISharingServicegains a set form of the write verdict: for a list of record ids it answers, per id, the same tri-state the per-rowcheckEdit/checkDeleteanswer. No write-scope member (buildWriteFilter) is added to the contract. One implementation: the per-row members answer what the set form answers for one id, and the by-id path gains no read. A chunk whose read fails answersdenyfor each of its ids. The service owns the chunking. The member is optional on the contract; plugin-security feature-detects it and keeps the per-row path where it is absent, with the same answers. The name is the seat's on precedent (checkEdit/checkDeleteon the same contract, the…Manysuffix of the data protocol), under the veto window.domain:server,area:data, p2, blocked by this card's PR because both edit the sharing middleware's bulk branch). The security service gains an optional filter-shaped answer: the authored policies' own scope for an object, a verb and a caller, with the platform ownership floor taken out. The sharing middleware ORs it into its bulk write scope. (i) Bulk scope = sharing scope OR authored scope, then ANDed into the write as today; plugin-security's own layers (tenant wall, floor OR authored policies, readable rows) are untouched and still decide. (ii) Verb for verb: an authored update policy widens update only, a delete policy delete only. (iii) Not for a delegated write, where the by-id probe abstains too. (iv) An absent member, no authoredusingpolicy, or any failure leaves today's scope. (v) The relief pin's predicate expectation inpredicate-write-floor-deferral.test.tsmoves to r1 to r4, and the PR test(dogfood): probe app-authored RLS wideners on the bulk write path (#6736) #7274 probe's two measure cases move with it.usingpolicy. If it does not hold, the dev reports a fork. It does not widenbuildWriteFilter,checkEditorcheckDeletethemselves, and it does not probe row by row on the bulk path.needs-user-decision→pm:queue, no assignee. Zone o5-D re-claims withRuling-ref:this comment and resumes fromclaude/issue-35934-sharing-bulk-write-scope@df0894a6(no commits). The seat files the 2a card.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Claim: area o5-D round 5 · 2026-11-26T11:10Z · area:data p2, re-claimed on the maintainer's ruling (area order 「开一个专区 ,接 data 的 p1 p2」, 2026-11-25T23:33Z).
Area: o5-D
Ruling-ref: 7190344023
Session:
session_01Utp6CbdHk3orAeensH6EzSAccount:
os-billBranch:
claude/issue-35934-sharing-bulk-write-scopeWorktree:
objectstack-issue-35934Domain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/spec/src/contracts/sharing-service.ts(the optional set form of the write verdict onISharingService, besidecheckEdit/checkDelete; ⛔ no write-scope member),packages/plugins/plugin-sharing/src/**(one implementation: the set form, and the per-rowcheckEdit/checkDeleteanswering through it for one id with no extra read on the by-id path; service-owned chunking; a failed chunk read answersdeny),packages/plugins/plugin-security/src/**(the predicate write path feature-detects the set form and keeps the per-row path where it is absent), the spec generated artefacts through their generators, tests named for the card, root.changeset/. ⛔skills/**, ⛔docs/adr/**, ⛔ the 2a authored-scope change (its own card, after this PR). Stop on breach and report.Container & model:
M,mode:subagent,model: default(dispatch-gates --tier: Clause ② SUSPECT onpackages/spec/src/contracts/**; build at default, review atCONTRACT_REVIEW_TIERfor the widening),effort: highClause-②: yes (an optional member added to the published
ISharingServicecontract)Metadata-protocol: none
Responsibility: plugin-security's predicate write path (#35914) asks one
checkEdit/checkDeleteverdict per candidate row; objectstack · platform path: none (no set-form verdict on the contract) · reached by any member, manager or Modify All bulk update/delete; measured 10,000 rows: 6,013 ms / 20,004 reads for a member update (os-dev report 7187608580).Thread-read: 7190344023
Premise: inbox → ruled 7190344023. The dev re-runs premises 1 to 9 of 7187970489, then measures the ruling's named premise first on the kept bench: ≤ 10,000 ids answered with at most two store reads per chunk plus one bypass probe per call, chunk ≥ 1,000, equal to the per-row verdict on every matrix row. If it fails, the dev reports a fork. No fallback to A, to a read-form narrowing, or to per-row asks for one row class.
Serial constraints cleared: seat 7's #36055 (os-alice, v19 field-axis switch) in plugin-security: overlap-check before each push, stop on a shared file.
Scope: the card's Ask narrowed to part 2 as ruled; Done-when as ruled in 7190344023.
Fixes #35934.Resume-from:
claude/issue-35934-sharing-bulk-write-scope@df0894a6(no commits)objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
os-dev-report
{ "issue": 35934, "status": "done", "pr": "https://github.com/objectstack-ai/objectstack/pull/37558", "head": "14bf9f91", "premise_readings": { "P0": "re-read at 54ea3c8c: premises 1 (sharing-service.ts:948), 2 (:186), 3 (security-plugin-sharing-verdicts.ts:313), 5 (:282) and 9 (one implementer, SharingService :666) hold at their lines; 4, 7 and 8 hold by code reading", "P1": "holds: chunk 1,000 ids gives 2 sharing reads per chunk (rows, plus write shares on update); no row class needs a per-row read; SQLite N=10,000: member update 24 reads / 270 ms, member delete 13 / 111 ms, Modify All update 14 / 242 ms (main: 20,004 / 6,013 ms, 10,003 / 2,178 ms, 10,004 / 1,880 ms)" }, "files_changed": [ ".changeset/35934-sharing-write-verdict-set-form.md", "packages/spec/src/contracts/sharing-service.ts", "packages/spec/src/contracts/sharing-service.test.ts", "packages/plugins/plugin-sharing/src/sharing-service.ts", "packages/plugins/plugin-sharing/src/sharing-service.test.ts", "packages/plugins/plugin-security/src/security-plugin-sharing-verdicts.ts", "packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts", "packages/plugins/plugin-security/src/security-plugin.ts", "packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.ts" ], "line_budget": "+965 / -116 across 9 files: source +480 / -113, tests +467 / -3, changeset +18; all inside the claim's file surface; no spec generated artefact moved (check:generated: 14 up to date)", "gates": "dispatch-gates --commands: 95 derived (same list at c6f613be and 14bf9f91), --ran: 95 run, 0 NOT-MEASURED, 0 UNRUN. Full run at c6f613be: 92 exit 0, 3 exit 1. check:dts-closure and check:dual-build-cjs-loads were red from a race with a concurrent closure build of mine; both exit 0 on re-run. check:where-matcher was a real finding in the new test double, fixed in 14bf9f91, exit 0. 20 test-reading families re-run at 14bf9f91: 20 exit 0. Tests: plugin-sharing 1,748 passed / 11 skipped; plugin-security 7,330 passed / 45 skipped; spec sharing-service.test 15 passed; typechecks pass; dogfood sharing write files 9/9, 110 passed. check:dev-prereqs scan NOT MEASURED (unrelated ui packages unbuilt on this box). overlap-check --branch=HEAD at 14bf9f91: VERDICT clean.", "deviations": [ "no empty-branch probe push: the branch already existed at df0894a6 from the earlier run", "check:dev-prereqs scan not measured, see gates", "ablation 4 (plugin-security feature-detect) was run once, before the merge; plugin-security source is unchanged since then", "the bench file stays uncommitted, as ordered" ], "security_findings": "none" }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
os-dev-report
Addendum to 7193076972: rework of the Test Core (9/10) red on 14bf9f9. The 10,000-record set-form pin timed out at 5,000 ms under shard load.
{ "issue": 35934, "status": "done", "pr": "https://github.com/objectstack-ai/objectstack/pull/37558", "head": "bd194d3f", "cause": "the test double: of the pin's 736 ms locally, the double's find took 709 ms, seeding took 5 ms and the verdict path about 20 ms. The double rebuilt and linearly scanned each $in list once per row (rows x ids).", "fix": "the double tests each $in list as a Set built once per list (WeakMap per list), so a read costs the rows it scans plus the ids it names. The combinator refusal from 14bf9f91 is kept. No timeout was added, and the counted-read assertions are unchanged.", "durations_local_ms": { "10,000 records: two reads per chunk": "977 -> 56", "queue membership over 2,500 rows": "46 -> 3", "fail-closed over 1,500 ids": "22 -> 2", "per-row CONTROL, 300 rows": "9 -> 9" }, "ablation_3": "WRITE_VERDICT_CHUNK = 1 at bd194d3f: 4 cases red, all on assertions, none on timeouts (reads 10000 vs 10, 2500 vs 3, and both fail-closed cases); restored, blob == HEAD", "where_matcher_control": "with the combinator throw removed, check:where-matcher exits 1 naming this double; restored, exits 0", "gates": "plugin-sharing pnpm test: 78 files, 1748 passed / 11 skipped; typecheck passes; VERDICT command-exit 0. 20 test-reading families at bd194d3f, including where-matcher, objectql-double-limit, engine-double-contract, nul-bytes and test-source-alias: 20 exit 0. dispatch-gates --commands: the 95-command list is unchanged. overlap-check --branch=HEAD: VERDICT clean against origin/main 41164656, 0 PR heads share a file.", "files_changed": ["packages/plugins/plugin-sharing/src/sharing-service.test.ts"], "line_budget": "+11 / -1", "deviations": ["none"], "security_findings": "none" }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Close-out · area o5-D · 2026-11-26T15:22Z
Delivered by PR #37558 (merged,
58570d8002), ruling C (7190344023):ISharingServicegains the optionalcheckEditMany/checkDeleteMany. They answer per id the same tri-state verdict ascheckEdit/checkDelete, which are now their one-id case.SharingService, with chunks of 1,000 ids and 2 sharing reads per chunk. A failed chunk denies its ids.Clause-②: yes (widening). Seat ACCEPT 7194167786; contract PASS 7193294421, delta 7194156298.Remaining, all open:
pm:queuein a separate stroke.sharing-service.mdxdocs gap and the stale per-row cost in.changeset/35802, which must be fixed before the release.os startunder vitest's default 5000 ms timeout and time out on a loaded shard #37603: the cli refusal-test timeout flake met on this PR's CI.pm:dispatchedis removed in this stroke; the merge closed the card as completed.