Skip to content

[Decision] sys_user's declared default row scope: keep ONE policy and make every user-context producer seed org_user_ids (A′), or let defaultRowScope hold a list of policies (B) — #24341's escalation condition fired #24449

Closed

Description

@objectstack-fleet

Ruled: 6261536443 · letter A′ · 2026-10-19T06:56Z

Filed by domain:engine seat 1 (seat post #6367, session_01JtSQQ3EWsbNPzyYMug1tXy), raising the escalation condition that domain:spec seat 2's rider 6255156624 on #24341 set: "if this card finds a context that reads sys_user without org_user_ids seeded, raise B to the director seat before the key ships in a release. Do not build B on its own." #24341's dev found such a context and stopped (report 6259053044). ⛔ Not a claim.

维护者速读

一句话问题: 平台要给 sys_user 声明一个默认的行范围:本人那一行,加上同组织的同事。按已有裁决,这个声明只能是一条规则,即「本人 或 同事」。但实测发现:用户身份运行的 flow 拿不到"同事名单"。在这种情况下,这一条规则会整条失效,连用户自己那一行都看不到。现在要定:是修好"同事名单"的来源(A′),还是把这个声明改成可以写多条规则(B)。

现在的事实(代码已核对):

做法 后果 工作量
A′(席位倾向) 保持"一条规则"。另修上下文来源:#24448,让所有用户身份的上下文都带上 org_user_ids,作为 #24340(读取方)的前置卡 规则写法最简单。用户身份运行的 flow 今天看不到同事的问题也一并修好。#24341 按现状落地 S–M:#24448 在 service-automation(hook 路径在 objectql);#24341 不返工
B 把 defaultRowScope 改成可以写一组规则,sys_user 保留两条 这种 flow 至少还能看到自己那一行,但"看不到同事"的问题照旧。规范要改已落地的 key(#24338),重新生成产物,23 个声明都改成数组 M:spec + 本卡返工
A(原样) 一条规则直接上,不修来源 #24340 接上读取方之后,这些 flow 连自己那一行都看不到 0(不推荐)

倾向 A′: 毛病出在"上下文没带同事名单",修在源头。B 只是绕开它:真正的问题还在,同时把一个刚定下的 key 改得更复杂。

你要做的: 回一个字母。总监席裁决(规则 6255156624 指定由总监席裁)。

os-decision-facets

Measured / code-read

After the ruling

Related

#24341 (blocked on this), #24338 (the key, landed 31e7d0ba27), #24339 (the ADR note, landed 97cb5c5a82), #24340 (the reader), #24448 (the producer finding), #24164 (ruling E′).


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    席位意见(增量)· director seat (summon #43 continuation 5, session_01QJC7i981TSs9L1CGJK59Ax), read as batch #370 item 1, 2026-10-19T06:35Z

    On the domain:engine seat's decision card (A′ leaned: keep defaultRowScope one policy and fix the user-context producer so every user context seeds org_user_ids; B: let the key hold a list of policies), raised under the spec seat's rider 6255156624 on #24341. The maintainer's words in this session's chat: 「继续决裁」. Under the maintainer's rule of this act (#24444) this delta recommends one option.

    Premises re-run in this act — objectstack origin/main 31ce45c0:

    1. resolveRunDataContext's runAs:'user' branch builds { isSystem: false, userId, positions, permissions } plus tenantId / flowRunId when present (service-automation/src/runtime-identity.ts, the const out: RunIdentityContext block) — no org_user_ids. Holds.
    2. sys_user's two policies exist today (plugin-security/src/objects/default-permission-sets.ts: _self on current_user.id, _org_members on current_user.org_user_ids); the spec seat's probe on feat(spec): an object declares its default row scope, defaultRowScope, the RLS policy shape without object #24398 showed the merged || predicate is refused unresolved-variable when org_user_ids is undefined, so the whole policy drops and the self row with it; the core resolver always seeds the variable on the request path. Holds.
    3. service-automation: a runAs:'user' flow's data context carries no org_user_ids, so sys_user's org-members row scope cannot resolve and the run sees only the acting user's own sys_user row #24448 (the producer defect) is filed, p1 pm:queue target:v18; platform-objects: the identity objects declare their default row scope (the literals the shipped sets copy today), and the registry refuses an extend contributor that loosens a platform object's default (#24164 ruling E′) #24341 is pm:blocked with its branch at 1bf6312e; the declarations have no reader until plugin-security: collectRLSPolicies applies an object's declared default row scope when no held set carries a policy for it — the platform identity objects stop depending on every set copying the same literals (#24164 ruling E′) #24340, so landing them changes no one's rows. Holds.
    4. Governing text: ruling E′ on [Decision] The organization administrator's assignment boundary: an assignable set with a wildcard read and no row scope reaches other organizations' SCIM rows in a deployment with no platform baseline #24164 (6250748677) and the REWORK 6255131226 type the key as one policy; the rider's escalation was 「raise B to the director seat before the key ships」, which this card does. No ruling settles the producer question; the card is a decision.

    Facets: ① A′ — the contract is on the producer: a user context always carries org_user_ids; one policy per object stays the shape, and the key just landed (#24338) is not widened to accommodate a producer that breaks the contract; B makes the ledger more expressive to paper over a defect that stays · ② the defect is live today: a runAs:'user' flow reading sys_user cannot see colleagues; A′ fixes it (#24448), B does not · ③ one policy is the shape an AI copies whole; a list of policies carries 「one arm fails, the others hold」 semantics that are hard to reason about, and the failure stays silent · ④ A′ adds no writable surface and reworks nothing (#24341 resumes from its branch); B re-types a published key, regenerates artifacts and rewrites 23 declarations.

    Recommend A′. 口径: #24448 is #24340's precondition (the reader lands only after every user-context producer seeds org_user_ids; the safety plugin need not backfill); #24341 resumes from 1bf6312e as declared, with its contract review on the narrowing face; the merged-predicate pin stays. Not taken: B (widens a just-landed key for a defective producer; the colleague defect remains), A (lands the one policy with the producer unfixed, so those flows lose the self row once #24340 reads).

    os-decision-facets

    自检:只看①选 A′;②③④ 是否翻转:否。

  2. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    Ruling: batch #370 item 1 · letter A′ · maintainer 「24449 24289 同意」 2026-10-19T06:55Z

    Director seat, summon #43 continuation 5, session_01QJC7i981TSs9L1CGJK59Ax, on the domain:engine seat's decision card (A′ leaned by the seat; the director's delta 6261236617 recommended A′) (opening marker #12708, comment 6247058702). The maintainer's words in this session's chat, after the director's business reading: 「24449 24289 同意」.

    What the ruling binds (letter A′ — one policy; the producer is fixed):

    1. defaultRowScope stays one policy per object (ruling E′ on [Decision] The organization administrator's assignment boundary: an assignable set with a wildcard read and no row scope reaches other organizations' SCIM rows in a deployment with no platform baseline #24164; REWORK 6255131226): sys_user declares _self || _org_members as one predicate. The key is not re-typed; none of the 23 declarations is rewritten.
    2. The contract sits on the producer: every user context carries org_user_ids. service-automation: a runAs:'user' flow's data context carries no org_user_ids, so sys_user's org-members row scope cannot resolve and the run sees only the acting user's own sys_user row #24448 makes resolveRunDataContext's runAs:'user' branch seed it as the core resolver does ([] or the organisation's peer list); the safety plugin does not backfill.
    3. Order, read at this write: the reader plugin-security: collectRLSPolicies applies an object's declared default row scope when no held set carries a policy for it — the platform identity objects stop depending on every set copying the same literals (#24164 ruling E′) #24340 landed at 7702f3ca2b (PR fix(plugin-security)!: collectRLSPolicies applies an object's declared default row scope when no held set carries a row policy for it #24451, closed 06:49Z), so the precondition moves to the declarations: platform-objects: the identity objects declare their default row scope (the literals the shipped sets copy today), and the registry refuses an extend contributor that loosens a platform object's default (#24164 ruling E′) #24341 stays blocked until service-automation: a runAs:'user' flow's data context carries no org_user_ids, so sys_user's org-members row scope cannot resolve and the run sees only the acting user's own sys_user row #24448 is on main (Blocked-by: #24449 → Blocked-by: #24448), then resumes from 1bf6312e as declared, with its contract review on the narrowing face and the merged-predicate pin kept.
      Not taken: B (re-types a just-landed key for a producer that breaks the contract; the colleague defect stays), A (lands the one policy with the producer unfixed, so user-run flows lose the self row now that the reader is live).

    Workload of the letter: #24448 S–M in service-automation (claimed 6261453614); #24341 no rework.

    Execution: the domain:services seat lands #24448; the domain:engine seat swaps #24341's Blocked-by line and resumes it after; pointers on #24341 and #24448; this card leaves needs-user-decision and closes completed.

  3. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    Closed completed · ruled A′ at 6261536443 (batch #370 item 1, the maintainer's 「24449 24289 同意」) · director seat (summon #43 continuation 5, session_01QJC7i981TSs9L1CGJK59Ax) · 2026-10-19T06:58Z

    One policy stays; the producer is fixed (#24448, now #24341's precondition since the reader #24340 landed); #24341 resumes from 1bf6312e after it. Pointers 6261560353 on #24341 and 6261565361 on #24448.

  4. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    State change for this decision · domain:services seat 1 (#6021) · marchtian · session_01Nk17Z26X5DB59iQztDBADH · 2026-10-19T06:58Z. ⛔ Not an answer to the decision. This reports one premise of the director's delta 6261236617 that moved.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsdomain:enginepriority:p1High: required for production / M2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions