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 bulk write also honours app-authored update/delete policies (authored scope ORed into the middleware bulk write scope) #37535
Filing gate: maintainer-directed. The key words are Bill's option on the decision card 「批量改记录时,要不要也认应用自己写的放行规则?」: 「现在定:批量也认」 (2026-11-26T11:07Z). Ruling record: #35934 comment 7190344023 (folded finding 7065565832, ruled 2a). Analysis: 7187970489.
Overturns: the deferral of 2026-08-08 on #5493 (Q2 = A1), and the reopen condition #6736 was closed on (5857477356), as the ruling names.
Blocked-by: #35934 (its PR: both edit the sharing middleware's bulk branch; this lands after it).
Ruled terms (copied from 7190344023)
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, and a delete policy widens delete only.
(iii) Not for a delegated write, where the by-id probe abstains too.
(iv) An absent member, no authored using policy, or any failure leaves today's scope.
First, the dev re-runs premises 10 and 12 of comment 7187970489 and the PR #7274 probe.
Named, falsifiable premise: with the authored scope ORed into the middleware's bulk scope, the rows a predicate write changes equal the rows the by-id write admits, on the relief fixture and on the #7274 fixtures. No row changes for a caller who holds no authored using policy.
If the premise does not hold, the dev reports a fork. The dev does not widen buildWriteFilter, checkEdit or checkDelete themselves, and does not probe row by row on the bulk path.
Done when
The optional filter-shaped member exists on the security service, and the sharing middleware ORs it into the bulk write scope per (i) to (iv).
(v)'s pins are moved.
The premise is measured and stated in the PR.
A predicate update and a predicate delete each change exactly the rows the by-id path admits, with a control for a caller without an authored policy and for a delegated write.
Triage: lands in area:data · domain:server · Feature · priority:p2 · pm:blocked · size S; rationale: a predicate bulk write should also honour app-authored update/delete policies, after #35934 lands on the same middleware branch. p2 as filed; blocked by #35934.
Unblocked · area o5-D · 2026-11-26T15:23Z · Blocked-by: target #35934's PR #37558 merged at 58570d8002 (2026-11-26T15:22Z), and #35934 is closed as completed. pm:blocked → pm:queue, with no assignee. The ruled terms (i)–(v) and the premise clause of 7190344023 stand as copied. Area o5-D is clocking out (maintainer, 12:38Z: 「data 区当前任务处理完就下班」), so it does not claim this card; it is for the next area:data holder.
Picked by card-pick.mjs --order area:data --seat repo:objectstack#8 at 2026-11-28T01:42Z: rank 9 (p2, order 1), unblocked for "the next area:data holder" (7196209370). The maintainer in this seat's session, verbatim: 「开一个 objectstack 全仓座位」 with intake area:data, then 「batch 调到 5,可以用云卡」.
Claim: PM loop round 1
Session: session_017xRBcSAaBEfQpU2yJexSJ8
Account: sunhaolin
Branch: claude/issue-37535-bulk-authored-scope
Worktree: objectstack-issue-37535
Domain: domain:server
Seat: repo:objectstack#8
File surface: packages/plugins/plugin-sharing/src/sharing-plugin.ts (bulk write branch ~1740) + sharing-service.ts (SharingSecurityProbe), packages/plugins/plugin-security/src/security-plugin-authored-row-write.ts + security-plugin.ts, packages/spec/src/contracts/security-service.ts + its test (one optional member on ISecurityService), tests incl. predicate-write-floor-deferral.test.ts and sharing-service.test.ts, one changeset per moved package; ⛔ no change to buildWriteFilter, checkEdit or checkDelete themselves (ruled term), no row-by-row probe on the bulk path (stop on breach; explain in the report)
Container & model: M, mode:cloud, model: opus (dispatch-gates --tier: no path-derived mandate; default tier), effort: high (S card, permission semantics: not mechanical, M treatment; build-heavy: spec + plugins)
Clause-②: yes
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7196209370
Premise: holds, one context line corrected — read-only check on origin/main at 2026-11-28T01:42Z: no authored-scope member (zero authoredScope, control checkAuthoredRowWrite hits); bulk branch sharing-plugin.ts:1740 unchanged; relief pin predicate-write-floor-deferral.test.ts:618-637 expects ['r1','r2']. Correction: PR #37558 (#35934) did not edit sharing-plugin.ts (its 9 files are the security plugin's verdict path, sharing-service.ts and ISharingService), so the same-branch conflict the card names is gone. The PR #7274 probe cases were not located by git grep 7274; the dev locates them as the ruling's premise clause requires.
Serial constraints cleared: seat 1's #38019/#38017/#37983/#37961/#37907 hold packages/services/service-knowledge/service-settings (disjoint); seat 3's #37856 / #36495 declare packages/**. Textual overlap re-checked with overlap-check.mjs before every push.
Scope this dispatch: the whole card. Fixes #37535. Clause-② (an optional member on a published contract) ⇒ L2 review owed before the queue.
{
"issue": 37535,
"status": "done",
"branch": "claude/issue-37535-bulk-authored-scope",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38131",
"session": "session_017xRBcVFZPt78r8HPjDVLC9",
"premise_still_valid": true,
"summary": "ISecurityService gains the optional getAuthoredRowWriteFilter (the filter-shaped twin of checkAuthoredRowWrite; undefined widens nothing). plugin-security serves it from one moved helper (authoredRowWriteLayers) that the verdict also reads, so a row matches the filter iff the verdict admits it. plugin-sharing's bulk branch ORs it into the write scope via a fail-closed passthrough (SharingService.probeAuthoredRowWriteFilter), verb for verb, skipping delegated writes and an already-null scope; buildWriteFilter, checkEdit and checkDelete are untouched, and there is no per-row probe on the bulk path. Premises 10 and 12 re-run at f72f3353 hold, and the PR #7274 probe is packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts (the one file PR #7274 added; it cites #6736, which is why git grep 7274 missed it). The named premise holds: on the relief fixture and the #7274 fixtures the predicate rows equal the by-id rows, and no row changes for a caller without an authored using policy. Landing point as named, plus security-plugin-security-service.ts (where the service registration lives since cut 11). Assignee untouched by this run.",
"tests": "HEAD c2c17a47 (merged origin/main 8e3980a9, which touches none of these sources). plugin-security `pnpm test` at ace203aa (last code commit): 290/290 files, 7330 passed, 45 skipped. plugin-sharing `pnpm test` at 2d086e65: 78/78 files, 1754 passed, 11 skipped. Post-merge focused on c2c17a47: plugin-security 3 files/115, plugin-sharing 3/76, spec security-service contract 1/32, dogfood bulk-widener-probe + authored-row-write-scope 2/17, all green. Typecheck plugin-security and plugin-sharing exit 0; spec build + check:generated: 14/14 up to date. Ablation A (middleware OR line replaced by a never-true guard, ablation-replace.mjs + dist preflight 'marker present in 2 built files'): 8 widening pins red in predicate-write-floor-deferral.test.ts (relief pin, 4 widening, 2 verb-for-verb, tenant wall), plus the composition pin in authored-row-write-deferral.test.ts, all controls green; against the dogfood probe both MEASURE cases red ('expected [ n_bob_open ]', 2 survivors), the old main pins exactly. Ablation B (three delegated guards removed): both delegated controls red ('expected [r1,r2,r3,r4] to deeply equal []'). Each restore was proven by blob == HEAD, an empty git diff HEAD, a rebuilt dist with the marker absent and the fix present, and a clean tree. Two first ablation attempts were no-ops and were re-run (a DTS build refusal, and a void marker esbuild dropped, which the preflight caught).",
"gates": "dispatch-gates --commands on c2c17a47: 119 families, all run; --ran over the exit-coded record: '119 derived, 118 run, 1 NOT-MEASURED, 0 UNRUN' (exit 0). NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test exit 3 (its positive control is pinned to commit 621a4876, unreachable in this shallow clone). Post-merge first reads that were stale local state, each green on re-run on the same head after the AGENTS §9 refresh: check:docs-transcript-drift (a pre-merge lint dist derived 87 against the docs' 88; exit 0 after the lint rebuild), check:i18n (exit 3, CLI closure; exit 0 after its named build), check:type-check-debt (exit 3, the merge added a dependency without pnpm install; exit 0 after install). Local-only check:dev-prereqs exit 1 ('35 of 110 workspace packages ... not on disk', unbuilt ui/ packages): a reading of this worktree, not the diff. overlap-check before each push: VERDICT clean exit 0. CI check-runs on PR #38131: in_progress at report time, not awaited.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "4 — all reads: issue_read get #37535, issue_read get_comments #37535, issue_read get_comments #35934, pull_request_read get_files #7274; no write tool",
"api_writes": "2 relay strokes, each one repository_dispatch (POST /repos/objectstack-ai/objectstack/dispatches) executed as objectstack-fleet[bot]: (1) pr_create = POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /issues/38131/assignees [sunhaolin], read back byte-identical (14589 bytes); (2) this report, POST /repos/objectstack-ai/objectstack/issues/37535/comments via post-stamped.mjs. git push x4 (not REST).",
"open_questions": [
{
"question": "Ruling term (v) names two pins to move. A third pin of the same divergence existed: plugin-security/src/operator-id-write-gate-33928.test.ts pinned that a two-key {id, stage} predicate under multi 'leaves the row' an authored policy admits (private OWD, read share). It went red under the fix and was moved to 'written, as by id'. Accept it as within the ruling?",
"options": [
"A accept: the same divergence, and the ruling's premise is predicate rows = by-id rows",
"B ask the maintainer to name it"
],
"recommendation": "A: the expectation is exactly the behaviour 2a removes. The file's other point (which branch each shape takes) is still pinned against the engine's dispatch in plugin-sharing's file of the same name. No contract or product choice moved."
},
{
"question": "Member name getAuthoredRowWriteFilter (the ruling leaves naming to precedent): getReadFilter for filter-shaped answers, checkAuthoredRowWrite for the same question as a verdict.",
"options": [
"A keep getAuthoredRowWriteFilter",
"B another spelling under the veto window"
],
"recommendation": "A, on the two precedents on the same contract."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: content/docs/permissions/rls.mdx carried a sentence this change made false (a policy-admitted row 'is not reached' by a predicate write; write it by id). Corrected in this PR, as the rules require for a published text the change makes false. Recorded in Acceptance notes."
],
"deviations": "File surface: + security-plugin-security-service.ts (the registration producer), plugin-security operator-id-write-gate-33928.test.ts (third divergence pin), registered-security-service-members.pin.test.ts (its typecheck reds until the member is listed), plugin-sharing authored-row-write-deferral.test.ts (the existing harness for the passthrough's by-id twin, used in place of sharing-service.test.ts), plugin-sharing lifecycle-verb-write-gate.test.ts + operator-id-write-gate-33928.test.ts (partial middleware doubles gain the method), packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts (the #7274 probe, private package, no changeset), content/docs/permissions/rls.mdx (one paragraph made false). Clause-② / Metadata-protocol copied verbatim from the claim (no arm). The harness's model-named Co-Authored-By trailer was not used; commits carry the model-free pair AGENTS.md requires.",
"files_changed": 18,
"line_budget": "705 insertions / 160 deletions vs origin/main (865 changed; under the 3000 human-merge threshold)"
}
Done · 2026-11-28T04:53Z — PR #38131 merged; this card closed as completed by its Fixes line. Delivered per ruling 7190344023 (2a): ISecurityService.getAuthoredRowWriteFilter (optional), and the sharing middleware's bulk write scope = sharing scope OR the authored scope, verb for verb, never for a delegated write, unchanged on absence or failure; (v)'s pins moved, plus a third pin of the same divergence (L2 record 7233479562 judged it within the ruling); content/docs/permissions/rls.mdx corrected. Nothing remains. pm:dispatched removed; the cloud dev session session_017xRBcVFZPt78r8HPjDVLC9 is archived.
Activity
objectstack-fleet commentedon Nov 26, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:data · domain:server · Feature · priority:p2 ·
pm:blocked· size S; rationale: a predicate bulk write should also honour app-authored update/delete policies, after #35934 lands on the same middleware branch. p2 as filed; blocked by #35934.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Unblocked · area o5-D · 2026-11-26T15:23Z ·
Blocked-by:target #35934's PR #37558 merged at58570d8002(2026-11-26T15:22Z), and #35934 is closed as completed.pm:blocked→pm:queue, with no assignee. The ruled terms (i)–(v) and the premise clause of 7190344023 stand as copied. Area o5-D is clocking out (maintainer, 12:38Z: 「data 区当前任务处理完就下班」), so it does not claim this card; it is for the next area:data holder.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
Picked by
card-pick.mjs --order area:data --seat repo:objectstack#8at 2026-11-28T01:42Z: rank 9 (p2, order 1), unblocked for "the next area:data holder" (7196209370). The maintainer in this seat's session, verbatim: 「开一个 objectstack 全仓座位」 with intakearea:data, then 「batch 调到 5,可以用云卡」.Claim: PM loop round 1
Session:
session_017xRBcSAaBEfQpU2yJexSJ8Account:
sunhaolinBranch:
claude/issue-37535-bulk-authored-scopeWorktree:
objectstack-issue-37535Domain:
domain:serverSeat:
repo:objectstack#8File surface:
packages/plugins/plugin-sharing/src/sharing-plugin.ts(bulk write branch ~1740) +sharing-service.ts(SharingSecurityProbe),packages/plugins/plugin-security/src/security-plugin-authored-row-write.ts+security-plugin.ts,packages/spec/src/contracts/security-service.ts+ its test (one optional member onISecurityService), tests incl.predicate-write-floor-deferral.test.tsandsharing-service.test.ts, one changeset per moved package; ⛔ no change tobuildWriteFilter,checkEditorcheckDeletethemselves (ruled term), no row-by-row probe on the bulk path (stop on breach; explain in the report)Container & model:
M,mode:cloud,model: opus (dispatch-gates --tier: no path-derived mandate; default tier),effort: high(S card, permission semantics: not mechanical, M treatment; build-heavy: spec + plugins)Clause-②: yes
Metadata-protocol: none
Responsibility:
n/a — not a defect cardThread-read: 7196209370
Premise: holds, one context line corrected — read-only check on origin/main at 2026-11-28T01:42Z: no authored-scope member (zero
authoredScope, controlcheckAuthoredRowWritehits); bulk branchsharing-plugin.ts:1740unchanged; relief pinpredicate-write-floor-deferral.test.ts:618-637expects['r1','r2']. Correction: PR #37558 (#35934) did not editsharing-plugin.ts(its 9 files are the security plugin's verdict path,sharing-service.tsandISharingService), so the same-branch conflict the card names is gone. The PR #7274 probe cases were not located bygit grep 7274; the dev locates them as the ruling's premise clause requires.Serial constraints cleared: seat 1's #38019/#38017/#37983/#37961/#37907 hold
packages/services/service-knowledge/service-settings(disjoint); seat 3's #37856 / #36495 declarepackages/**. Textual overlap re-checked withoverlap-check.mjsbefore every push.Scope this dispatch: the whole card.
Fixes #37535. Clause-② (an optional member on a published contract) ⇒ L2 review owed before the queue.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcVFZPt78r8HPjDVLC9
os-dev-report
{ "issue": 37535, "status": "done", "branch": "claude/issue-37535-bulk-authored-scope", "pr": "https://github.com/objectstack-ai/objectstack/pull/38131", "session": "session_017xRBcVFZPt78r8HPjDVLC9", "premise_still_valid": true, "summary": "ISecurityService gains the optional getAuthoredRowWriteFilter (the filter-shaped twin of checkAuthoredRowWrite; undefined widens nothing). plugin-security serves it from one moved helper (authoredRowWriteLayers) that the verdict also reads, so a row matches the filter iff the verdict admits it. plugin-sharing's bulk branch ORs it into the write scope via a fail-closed passthrough (SharingService.probeAuthoredRowWriteFilter), verb for verb, skipping delegated writes and an already-null scope; buildWriteFilter, checkEdit and checkDelete are untouched, and there is no per-row probe on the bulk path. Premises 10 and 12 re-run at f72f3353 hold, and the PR #7274 probe is packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts (the one file PR #7274 added; it cites #6736, which is why git grep 7274 missed it). The named premise holds: on the relief fixture and the #7274 fixtures the predicate rows equal the by-id rows, and no row changes for a caller without an authored using policy. Landing point as named, plus security-plugin-security-service.ts (where the service registration lives since cut 11). Assignee untouched by this run.", "tests": "HEAD c2c17a47 (merged origin/main 8e3980a9, which touches none of these sources). plugin-security `pnpm test` at ace203aa (last code commit): 290/290 files, 7330 passed, 45 skipped. plugin-sharing `pnpm test` at 2d086e65: 78/78 files, 1754 passed, 11 skipped. Post-merge focused on c2c17a47: plugin-security 3 files/115, plugin-sharing 3/76, spec security-service contract 1/32, dogfood bulk-widener-probe + authored-row-write-scope 2/17, all green. Typecheck plugin-security and plugin-sharing exit 0; spec build + check:generated: 14/14 up to date. Ablation A (middleware OR line replaced by a never-true guard, ablation-replace.mjs + dist preflight 'marker present in 2 built files'): 8 widening pins red in predicate-write-floor-deferral.test.ts (relief pin, 4 widening, 2 verb-for-verb, tenant wall), plus the composition pin in authored-row-write-deferral.test.ts, all controls green; against the dogfood probe both MEASURE cases red ('expected [ n_bob_open ]', 2 survivors), the old main pins exactly. Ablation B (three delegated guards removed): both delegated controls red ('expected [r1,r2,r3,r4] to deeply equal []'). Each restore was proven by blob == HEAD, an empty git diff HEAD, a rebuilt dist with the marker absent and the fix present, and a clean tree. Two first ablation attempts were no-ops and were re-run (a DTS build refusal, and a void marker esbuild dropped, which the preflight caught).", "gates": "dispatch-gates --commands on c2c17a47: 119 families, all run; --ran over the exit-coded record: '119 derived, 118 run, 1 NOT-MEASURED, 0 UNRUN' (exit 0). NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test exit 3 (its positive control is pinned to commit 621a4876, unreachable in this shallow clone). Post-merge first reads that were stale local state, each green on re-run on the same head after the AGENTS §9 refresh: check:docs-transcript-drift (a pre-merge lint dist derived 87 against the docs' 88; exit 0 after the lint rebuild), check:i18n (exit 3, CLI closure; exit 0 after its named build), check:type-check-debt (exit 3, the merge added a dependency without pnpm install; exit 0 after install). Local-only check:dev-prereqs exit 1 ('35 of 110 workspace packages ... not on disk', unbuilt ui/ packages): a reading of this worktree, not the diff. overlap-check before each push: VERDICT clean exit 0. CI check-runs on PR #38131: in_progress at report time, not awaited.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "4 — all reads: issue_read get #37535, issue_read get_comments #37535, issue_read get_comments #35934, pull_request_read get_files #7274; no write tool", "api_writes": "2 relay strokes, each one repository_dispatch (POST /repos/objectstack-ai/objectstack/dispatches) executed as objectstack-fleet[bot]: (1) pr_create = POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /issues/38131/assignees [sunhaolin], read back byte-identical (14589 bytes); (2) this report, POST /repos/objectstack-ai/objectstack/issues/37535/comments via post-stamped.mjs. git push x4 (not REST).", "open_questions": [ { "question": "Ruling term (v) names two pins to move. A third pin of the same divergence existed: plugin-security/src/operator-id-write-gate-33928.test.ts pinned that a two-key {id, stage} predicate under multi 'leaves the row' an authored policy admits (private OWD, read share). It went red under the fix and was moved to 'written, as by id'. Accept it as within the ruling?", "options": [ "A accept: the same divergence, and the ruling's premise is predicate rows = by-id rows", "B ask the maintainer to name it" ], "recommendation": "A: the expectation is exactly the behaviour 2a removes. The file's other point (which branch each shape takes) is still pinned against the engine's dispatch in plugin-sharing's file of the same name. No contract or product choice moved." }, { "question": "Member name getAuthoredRowWriteFilter (the ruling leaves naming to precedent): getReadFilter for filter-shaped answers, checkAuthoredRowWrite for the same question as a verdict.", "options": [ "A keep getAuthoredRowWriteFilter", "B another spelling under the veto window" ], "recommendation": "A, on the two precedents on the same contract." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: content/docs/permissions/rls.mdx carried a sentence this change made false (a policy-admitted row 'is not reached' by a predicate write; write it by id). Corrected in this PR, as the rules require for a published text the change makes false. Recorded in Acceptance notes." ], "deviations": "File surface: + security-plugin-security-service.ts (the registration producer), plugin-security operator-id-write-gate-33928.test.ts (third divergence pin), registered-security-service-members.pin.test.ts (its typecheck reds until the member is listed), plugin-sharing authored-row-write-deferral.test.ts (the existing harness for the passthrough's by-id twin, used in place of sharing-service.test.ts), plugin-sharing lifecycle-verb-write-gate.test.ts + operator-id-write-gate-33928.test.ts (partial middleware doubles gain the method), packages/qa/dogfood/test/bulk-widener-probe.dogfood.test.ts (the #7274 probe, private package, no changeset), content/docs/permissions/rls.mdx (one paragraph made false). Clause-② / Metadata-protocol copied verbatim from the claim (no arm). The harness's model-named Co-Authored-By trailer was not used; commits carry the model-free pair AGENTS.md requires.", "files_changed": 18, "line_budget": "705 insertions / 160 deletions vs origin/main (865 changed; under the 3000 human-merge threshold)" }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
ACCEPT → PR #38131 comment 7233671627 · L2 PASS 7233479562 · 2026-11-28T04:06Z · landing armed; this card closes on merge (
Fixes #37535).objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
Done · 2026-11-28T04:53Z — PR #38131 merged; this card closed as completed by its
Fixesline. Delivered per ruling 7190344023 (2a):ISecurityService.getAuthoredRowWriteFilter(optional), and the sharing middleware's bulk write scope = sharing scope OR the authored scope, verb for verb, never for a delegated write, unchanged on absence or failure; (v)'s pins moved, plus a third pin of the same divergence (L2 record 7233479562 judged it within the ruling);content/docs/permissions/rls.mdxcorrected. Nothing remains.pm:dispatchedremoved; the cloud dev sessionsession_017xRBcVFZPt78r8HPjDVLC9is archived.