Skip to content

docs(permissions): under record sharing a predicate write is bounded by the write scope - #34498

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34219-rls-predicate-write-scope
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34219-rls-predicate-write-scope

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #34219

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么: 只改三处权限文档:在启用记录共享时,批量(multi: true)更新或删除只写调用者按共享可写的行;只读共享的行即使应用的 update 放宽规则放行,批量写也不碰它、不报错,按 id 单独写才行。
  • 为什么改: 文档原来说批量写能放宽到「调用者能读到的行」,与 fix(plugin-sharing)!: the write gate judges by id exactly the writes the engine runs by id #34033 之后引擎的实际行为不符,按文档写规则的作者会以为批量写改到了只读共享的行。
  • 风险与回滚: 无行为变化,纯文档。回滚即撤本 PR。
  • 先看: content/docs/permissions/rls.mdx 新增段;permissions-matrix.mdx 性能提示里加的一句;releases/v17/17-2.mdx 迁移表第一行的补句。
  • 两分钟验证: 打开 /docs/permissions/rls,在「A write widener never reaches a row the caller cannot read」段后能看到「Under record sharing, a predicate write is bounded by the write scope」。
  • 需要你做的: 无,席位落地。

What changes

  • content/docs/permissions/rls.mdx: a new paragraph after the write-widener floor. With record sharing composed, a predicate (multi: true) update / delete on a private object writes only the rows the caller may write: owner depth and queue, plus edit shares for an update (a share never grants delete, ADR-0111 D3). A row held only through a read share, which an app update widener admits, is left as it was and the write answers no error. Addressing it by id alone writes it. A scalar id beside other keys under multi: true, and a falsy id, run as predicate writes and meet the same bound (the two shapes PR fix(plugin-sharing)!: the write gate judges by id exactly the writes the engine runs by id #34033 moved, per its BREAKING note).
  • content/docs/permissions/permissions-matrix.mdx: the predicate-write sentence in the performance tip gains the same bound and remedy.
  • content/docs/releases/v17/17-2.mdx: the migration row that prescribes multi: true for { where: { id, …other } } now says that, under record sharing, that form is a predicate write bounded by the write scope, and points at the by-id remedy.

Sources for every sentence: PR #34033's BREAKING text and its measured table (update { id, stage: 'open' } on a read-shared row admitted only by the app RLS widener: base 1 row written, head no error, 0 rows; { where: { id } }: written), ADR-0111 D3, and contract record 6904564182 (M1).

Tests

Docs only. No test changed.

Acceptance notes

  • None.

Verification

Derived gates (dispatch-gates --commands) are listed in the os-dev report on the card.

…by the write scope

rls.mdx and permissions-matrix.mdx said a predicate (multi: true) update or
delete reaches every row the caller can read, which an app update widener
then admits. With record sharing composed, a predicate write is bounded by
the caller's write scope (owner depth, queue, and edit shares for an update),
so a row held only through a read share is left unwritten with no error;
addressing it by id alone writes it. The v17.2 migration row that prescribes
the multi: true form now says so and points at the by-id remedy.

Claude-Session: https://claude.ai/code/session_01ADHkmRfW5u1LRmhWwaYHRp
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 16, 2026
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Nov 16, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp

Final head for review: 170118174f51b22790cb47c3c00f4ec44b1a5447. Local: all 53 derived gates exit 0 at this head, dispatch-gates --ran 53 run, 0 NOT-MEASURED (os-dev-report 6932226359 on #34219, record /mnt/project-files/objectstack-seat2/34219-gates-ran.txt). CI families are read from this PR's check runs.

维护者速读

  • 改了什么: 只改三处权限文档:在启用记录共享时,批量(multi: true)更新或删除只写调用者按共享可写的行;只读共享的行即使应用的 update 放宽规则放行,批量写也不碰它、不报错,按 id 单独写才行。
  • 为什么改: 文档原来说批量写能放宽到「调用者能读到的行」,与 fix(plugin-sharing)!: the write gate judges by id exactly the writes the engine runs by id #34033 之后引擎的实际行为不符。
  • 风险与回滚: 无行为变化,纯文档。回滚即撤本 PR。
  • 先看: content/docs/permissions/rls.mdx 新增段。
  • 两分钟验证: 打开 /docs/permissions/rls,写放宽段之后能看到「Under record sharing, a predicate write is bounded by the write scope」。
  • 需要你做的: 无,区落地。
  • 席位意见: 文档与 PR fix(plugin-sharing)!: the write gate judges by id exactly the writes the engine runs by id #34033 的实测表、ADR-0111 D3 一致;发布页那一句是卡点名的事实补正,走专用 docs-only PR(AGENTS.md 发布页通道二)。

席位核对 · ACCEPT (L1 self-review per l1-review-checklist: docs only, 18 lines, Clause-② no, no contract surface) · Head-sha: 1701181

  • Shape. Draft, base main, body opens with the attribution lines and Fixes #34219; the PR delivers the whole card (the three corrections it names), so Fixes is right. No other open card number sits beside a closing keyword.
  • Scope. 3 files, +16/−2, all under content/docs/, each named by the card. content/docs/releases/v17/17-2.mdx is release-owned; this is the dedicated docs-only PR for a factual gap the card names (AGENTS.md release-page channel two), not a rider on code. Docs-only ⇒ skip-changeset label, no empty changeset.
  • Sentences checked against sources (contract record 6904564182 M1, PR fix(plugin-sharing)!: the write gate judges by id exactly the writes the engine runs by id #34033's BREAKING text and measured table, ADR-0111 D3):
  • Gates (check-runs at this head). 52 runs, 0 failed; Lint & Repo Gates, TypeScript Type Check, Type Check · source gates, Test Core 1–8 and the Test Core roll-up, Build Docs, Check Documentation Links: success; the rest skipped by path.
  • Accepted deviations. None.
  • Out of scope. None found.
  • Landing. check-governed-merges --pr 34498: NOT governed, 18 lines ≤ 3000. K = 0. L2 not owed (no contract surface). The area lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp

Landing · Head-sha: 1701181 · ACCEPT → comment 6932426046

Probe Reading
check-governed-merges --pr 34498 NOT governed; +16/−2 = 18 lines ≤ 3000
check-runs at this head 52 runs, 0 failed; Lint & Repo Gates and TypeScript Type Check success

State: ready for review and auto-merge enabled; #34219 closes with the merge (Fixes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants