Skip to content

[Decision] 阶段 7a 之前,包发布的权限集在 sys_permission_set 里多出一行标成「管理员」的记录:现在另开小 PR 给投影器加判断挡掉(A),还是等 7a 整个删掉投影器(B) #23227

Closed

Description

@objectstack-fleet

Ruled: 6145047801 · letter B · no guard; the projector goes with stage 7a (#22975 zero-row acceptance); this card closes · 2026-10-13T12:04Z
Part of #15204
Filing gate ②:只有维护者能做的决定。选 A 等于为批次规则 4「只删不修」(6094179271)开一个例外,规则是维护者定的。也算 ③:维护者在本席会话中要求「补这 4 张决策卡」。立卡:epic PM session_01Rerax7QTjKMPCUZxQUtPFR(marchtian),席位 epic:#15194。
Prior rulings on this card: none(新卡)。相关记录:D 的维护者速读 6130417182「过渡期的一处行为」,7a 卡上的验收 6129253247,engine 车道的采纳 6129999436。

锚点: 这个问题原本挂在 #22900(阶段 6b-2 D)的维护者速读里,借那个 PR 的 needs-user-decision 标签。D 已于 2026-10-13 02:19Z 合入,标签已摘,问题没有了归处。自然锚点 #22975(7a 的卡)正由 domain:engine 车道推进,给它挂决策标签会让它退出活动队列,所以单开本卡。

查重: 用语义检索搜 objectstack 卡,关键词 permission set projection / admin row / package publish / projector guard / stage 7a,命中 1 张:#22975(7a 本身,open,不是决策卡)。没有同题的开着的卡或决策卡。

动手的读者: 裁 B,没有人要动手,本卡关闭。裁 A,本席把一张执行卡交给 domain:engine 车道(os-steve),1 个 PR,在 7a 之前合入。

维护者速读

事情: D 删掉了包发布时的物化器,但 ADR-0094 投影器要到阶段 7a 才删。所以从 D 合入起,到 7a 合入之前:

  • 通过包入口发布某个包的权限集,sys_permission_set 表里会多出一行,标成「管理员」(managed_by: 'admin'),不带包名。
  • 这一行在 main 上,也在已发布的 18.0.0-next.0 里,已知限制第 3 条(6139333945)写明了。

D 的开发实测过:

  • 权限判定不读这一行;
  • 卸载包时这一行会被删掉;
  • 在数据页面编辑这一行,结果和 D 之前一样;
  • 在数据页面删除这一行,会连同 base 存的元数据和目录里的权限集一起删掉。这个权限集上的授权会留下并失效。墙内只有平台运营者能做这个删除。

7a 什么时候删它: 7a 的验收已写明「发布后零行」,engine 车道已采纳(6129999436)。7a 要等阶段 8 合入才开 PR。阶段 8 的测试半 S8-T(#22962)已于 2026-10-13 08:50Z 合入,阶段 8 本身是 #23222,目前还是草稿。v18 正式版的发布条件 (c) 要求阶段 7 合入,所以这一行不会进正式版,只会出现在 next 预发布里。

两个选项:

  • A: 现在另开一个小 PR,给投影器加约 15 行判断,不为包的权限集建行,连测试约 +90 行(D 开发的估计,未实测)。投影器在 permission-set-projection.ts 里,批次规则 4 规定这个文件只删不修,所以选 A 就是你为规则 4 开一个例外。7a 合入时这段判断随投影器一起删掉。
  • B: 不动,等 7a。

本席推荐 B。 选 A 还是 B?

背景(实测:objectstack origin/main 8024e1243a,2026-10-13T09:25Z)

  • 投影器还在写: packages/plugins/plugin-security/src/permission-set-projection.ts:571 的 upsertEnvPermissionSet。projectPermissionMutation(:835)在每次 permission 发布或保存时调用它;启动时 reconcilePermissionSetProjection 会把已发布的权限集重新投影。
  • D 之前和之后的差别(增量审查 6129112138,D 的开发实测):
    • D 之前,物化器先写一行 managed_by: 'package' 加 package_id。
    • D 之后,只剩投影器写,写的是 managed_by: 'admin'、没有 package_id。
    • 可写 base 直接发布时,main 上本来就写「管理员」行。
    • 这一行被删后,下次启动时投影器的对账会把它重建出来(开发用文件数据库重启实测过)。
  • 7a 的位置: C3 #15204 stages 7a ∥ 7b → 8-post, build ahead: delete the permission-set projection and the position write-through that stage 8 leaves unreferenced, then the post-stage-8 catalog gates and residue #22975,domain:engine,pm:dispatched。认领 6120370976 写明「no PR opens before S8 is on main」。

Governing text

前提(每条带复核命令)

  • 投影器还在:git grep -n "export async function upsertEnvPermissionSet" origin/main -- packages/plugins/plugin-security/src/permission-set-projection.ts,应命中 1 次。
  • D 已合入:git merge-base --is-ancestor c8a9783eca origin/main && echo merged。
  • 7a 的零行验收已被车道采纳:gh api repos/objectstack-ai/objectstack/issues/comments/6129999436 --jq .body | grep -c "zero",应 ≥1。
  • 7a 不早于阶段 8:gh api repos/objectstack-ai/objectstack/issues/comments/6120370976 --jq .body | grep -c "no PR opens before S8",应为 1。
  • 阶段 8 还没合入:gh api repos/objectstack-ai/objectstack/pulls/23222 --jq .merged,应为 false。

选项 × 真实代价

选项 做什么 能感知的后果 工作量
A 现在加判断 给 upsertEnvPermissionSet 加判断,不为包的权限集建行;加测试和消融;为规则 4 记一个例外 7a 之前的 next 预发布里不再出现这一行;数据页面无从编辑或删除包的权限集 domain:engine 车道 1 个 PR,约 +90 行(D 开发的估计,未实测),要过契约审查;无具名先例;7a 合入时这段代码删掉
B 等 7a 不动 直到 7a 合入,next 预发布里包发布的权限集会多一行「管理员」记录;不影响权限判定;正式版不受影响 0(7a 的验收已含零行)

业务含义直译

  • A: 仓库明天整栋拆除,今天先给一扇贴错门牌的门换门牌。
  • B: 门牌错一天,贴告示(已知限制第 3 条),明天整栋拆。

四轴(从业务看)

  • 项目长远合理性(领起):
    • 两年后的样子:权限集只存在于注册表,表里没有任何投影行(ADR-0131 D3/D13,完成 ADR-0094 D1)。
    • 参照主流做法:Salesforce 的托管包权限集只以包元数据存在,Setup 里显示为属于包,没有另一份「管理员」副本。
    • B 直接走向这个终态。A 给一段注定删除的代码加逻辑,寿命只到 7a。
  • 实际业务拉动: 今天没有用户报告撞上它。会看到它的只有在 next 预发布里打开 sys_permission_set 数据页的人,权限判定不受影响。零实测拉动。
  • 防 AI 犯错(出错时谁看到什么):
    • B:7a 之前,一个读 sys_permission_set 的 AI 或管理员会看到一行写着「管理员」的记录,误以为这个权限集是管理员自己建的、可以随意改。这是静默的误标。
    • A:这一行不出现。
    • 但这张表在阶段 8 后就退役,读它本身就是旧路径。
  • 创业阶段不扩散: B 不写代码。A 新增一段会被删掉的代码,还要为规则 4 开例外。

os-decision-facets

  • ① 项目长远合理性:B 直达「零投影行」的终态;A 给待删代码加逻辑,寿命只到 7a。
  • ② 实际业务拉动:零实测拉动;只在 next 预发布里、只在数据页上看得到,不影响权限判定。
  • ③ 防 AI 犯错:A 略优,去掉 7a 之前的一行静默误标;B 靠已知限制第 3 条明说。
  • ④ 创业阶段不扩散:B 零代码;A 新增待删代码并为规则 4 开例外。

Prior rulings read: projection, projector, managed_by, upsertEnvPermissionSet → 19 hits; ADR-0094 D1, ADR-0131 D13 (others incidental: ADR-0005 §1, ADR-0029 D9.7, ADR-0057 D7/D12, ADR-0061 D5, ADR-0068 D2/D3, ADR-0082 §2); thread: #22900 (6129112138, 6130417182), #22975 (6129253247, 6129999436), #15204 (6094179271).

推荐

推荐 B,回退 A。

  • 只看①选 B;②③④ 是否翻转:否。③ 在 7a 之前略偏 A,但这一行只在 next 预发布里出现,发布条件 (c) 保证 7a 先于正式版合入。
  • 工作量:A 约 +90 行,B 为 0。
  • 置信缺口:
  • 什么情况下该改选 A: 如果阶段 8 或 7a 在 v18 正式版之前被推迟、拆出,或发布条件 (c) 被改写成不要求阶段 7,这一行就可能进正式版。那时 A 才值得做。

裁后执行


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 13, 2026

    @objectstack-fleet
    ContributorAuthor

    Ruling: batch #336 item 5 · letter B · maintainer 「其他同意」 2026-10-13T11:59Z

    Director seat, summon #41, session_01TJKP6W6UDYEBHtccVdpVoz (GitHub os-steve; written as objectstack-fleet[bot] through the relay, read back). Presented in this seat's chat as batch #336 item 5 with recommendation B (fallback A); the maintainer's word on the remaining four items of the batch was 「其他同意」. The card's premises were re-read by this seat on origin/main before the batch and hold (upsertEnvPermissionSet still exported; D's merge c8a9783eca is an ancestor of main; PR #23222 is an open draft). Thread-read: none.

    B — no guard is added; the projector goes with stage 7a. Batch rule 4 (6094179271, the maintainer's: permission-set-projection.ts is touched only to delete it) takes no exception here. Until 7a lands, a permission set published through the package door leaves one managed_by: 'admin' row in sys_permission_set; authorization does not read it, uninstall removes it, and known-limitation item 3 (6139333945) states it. Release-cut condition (c)'s first half ("C9 with stage 7") stands under batch #336 item 1 (ruling B on #23230 kept both halves), so the row reaches next prereleases only, never the GA cut. A is not taken.

  2. objectstack-fleet commented on Oct 13, 2026

    @objectstack-fleet
    ContributorAuthor

    Closed completed at 2026-10-13T12:09Z by the director seat (summon #41, session_01TJKP6W6UDYEBHtccVdpVoz, written as objectstack-fleet[bot] through the relay): the ruling is recorded (6145047801, letter B, the maintainer's 「其他同意」): no guard before 7a, batch rule 4 takes no exception, and the remedy is 7a's zero-row acceptance on #22975 (pointer 6145194655); known-limitation item 3 stays until 7a lands; the epic ledger carries the line (#15204, 6145185086). Flip condition on the ruling: stage 8 or 7a slipping past the GA cut, or condition (c) losing "with stage 7", reopens this card to the box. needs-user-decision left with the ruled transition; domain:engine, priority:p2, target:v18 and area:access stay as attribution.

  3. objectstack-fleet commented on Oct 14, 2026

    @objectstack-fleet
    ContributorAuthor

    Correction note on known-limitation item 3 · domain:engine seat 2 · session_01ADzJtzYTLUfgrRZHxkagkX · 2026-10-14T06:20Z. ⛔ Not a claim, ⛔ no label change.

    Known-limitation item 3 (comment 6139333945, the transitional managed_by: 'admin' sys_permission_set row after a package-door publish) no longer holds on main. #22975's 7a landed as dac99c2277 (PR #23368). It deletes the permission-set projector, the last writer of that table, and pins zero rows on both kernels for a package-door publish, a writable base's publish and a restart. This is the remedy director ruling #23227 → B named (6145194655, ruling 2). The pending changeset for #23258 was corrected in the same PR, and the maintainer's approval confirmed it. The known-limitations list for the next prerelease can drop item 3.

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:p2Medium: important, M3target:v18

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions