Skip to content

ui(fields): the permission-ref picker lists permission sets by name only, so once two packages hold one name it offers two options with one value and a grant written through it names no package #32770

Closed
1 of 1 issue completed

Description

@objectstack-fleet

domain:ui#6 · os-sales · session_01L6bhgUAXJEaRNwDiLuAvEZ

Follow-up of #32537 (PR #32769). Part of #31527 (ADR-0150). On the release line; does not gate #31698 PR-2 (epic seat): with two holders, a grant this picker writes with no package is read by the server as granting nothing (fail closed), and no first-party package pair holds one name.

Filing category: ① product defect (user-visible once #31698 PR-2 lands). reach: read on main f1bb362c; the card thread of #32537 recorded it as out of its PR's scope (report 6828732821, out_of_scope_findings). The card #32537 lists this widget in its caller list ("Read-only by name, same card"); its PR covers the other four callers and leaves this one, so the seat carries it here.

维护者速读

授权表单里选权限集用的是 permission-ref 下拉框,它只按名字列出权限集,写入的也只有名字。#31698 PR-2 之后,两个包可以各带一个同名权限集(比如 sales_rep)。到那时这个下拉框会出现两个值相同、分不清是哪个包的选项;通过它写下的授权不带包,而服务端遇到两个包都持有的名字、又没指明包时,判为不授予任何权限。这种情况服务端判为不授予(fail closed),第一方包里也没有同名的一对,所以专题席判定它不卡 PR-2,只需在发版前修好。

What happens

  • ui/packages/fields/src/widgets/RegistryRefField.tsx (permission-ref → GET /api/v1/meta/permission) builds its options as { value: item.name, label: itemText(item) } (~:319–325) and writes only the name (the docblock, ~:37–46: "the value written is the NAME — one string").
  • Its users on main: sys_user_permission_set.permission_set (packages/plugins/plugin-security/src/objects/sys-user-permission-set.object.ts :107, the grant's set column), sys_user (:395), sys_idp_group_mapping (~:139, ~:187), and text action params (packages/spec/src/ui/action.zod.ts ~:266).
  • With two holders of one name served by /meta/permission (one item per (package, name), ADR-0150 D4), the picker lists two options with the same value. Picking either writes the bare name. A grant row with no permission_set_package on a name two packages hold is read as granting nothing (storedPermissionSetScope, ADR-0150 D8 R1; mirrored client-side by storedGrantHolders in PR fix(app-shell): the permission-set pages send the holder's package to the grant, clone and activation doors #32769).

Expected

  • Where the served registry has more than one holder of a name, the picker offers one option per holder, each naming its package beside the label (the generic {label} ({name}) text plus the holder, no new product-named widget), and the stored value addresses that holder. On a grant form that carries permission_set_package, the holder's package is written there, as Setup's assignment page does after PR fix(app-shell): the permission-set pages send the holder's package to the grant, clone and activation doors #32769.
  • One holder per name, and the environment's own set: options, value written and screen unchanged (CONTROL).
  • A form whose target has no package column (an action param, an idp mapping) is judged against what its server reader accepts. If it can only name a set by its name, say so in the PR and refuse to offer an ambiguous pick, ⛔ never resolving it by order.

Reader who acts: domain:ui (@object-ui/fields; widening its value shape, or how a form pairs the two columns, may be Clause-②: yes, so declare it). Triage decides the grade; it sits on the #31527 release line (it does not gate #31698 PR-2).

Dedupe: repo:objectstack-ai/objectstack is:issue permission-ref package holder → 29 hits and is:issue RegistryRefField package → 8 hits. None covers the two-holder picker. The nearest are #32537 (its caller list names this widget), #32164 (closed: the server doors), #27861 (closed: the Permission Sets tab showed API names) and #32250 (a refused grant on /data names no candidates).

Related: #32537, PR #32769, #31698, #31527.


Generated by Claude Code

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch (requested by domain:ui#6) → domain:ui · p1 · pm:queue · 2026-11-12T16:14Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. added
    area:access
    domain:ui
    pm:queue
    priority:p1
    on Nov 12, 2026
  3. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#6 · os-sales · session_01L6bhgUAXJEaRNwDiLuAvEZ

    Claim: PM loop round 1
    Session: session_01L6bhgUAXJEaRNwDiLuAvEZ
    Account: os-sales
    Branch: claude/issue-32770-permission-ref-holders (provisional; this Claim is restated with the card thread's designated branch once it names it)
    Worktree: objectstack-issue-32770
    Domain: domain:ui
    Seat: domain:ui#6
    File surface: ui/packages/fields/src/widgets/RegistryRefField.tsx (the permission-ref options, the value it writes, and how a grant form pairs permission_set with permission_set_package), its tests under ui/packages/fields/src/**, the form-side pairing of the two grant columns if it lives outside the widget (under ui/packages/fields/src/** or ui/packages/app-shell/src/**; name the file in the PR), ui/packages/i18n/src/** (add keys only, then gen:zh-hant), root .changeset/; read-only: PR #32769's ui/packages/app-shell/src/views/metadata-admin/permission-set-holder.ts (the holder conventions; ⛔ not edited here while #32769 is open), packages/plugins/plugin-security/src/objects/sys-user-permission-set.object.ts, packages/platform-objects/src/identity/{sys-user,sys-idp-group-mapping}.object.ts, packages/spec/src/ui/action.zod.ts (the widget's users and what each server reader accepts); ⛔ no packages/** edits (a reader that can only take a bare name is reported for a split, never resolved by order; stop on breach and explain in the report)
    Container & model: M, own card thread (p1, on the #31527 release line), model: default tier (dispatch-gates --tier: "no path-derived mandate" for ui/**), effort: xhigh (p1)
    Clause-②: yes (declared up front: widening the widget's value shape or a new @object-ui/i18n key; if neither happens, the PR says no and why)
    Metadata-protocol: none
    Responsibility: the permission-ref picker in objectstack ui/ (RegistryRefField.tsx ~:319-325 builds { value: item.name, label } from GET /api/v1/meta/permission and writes only the name) | /meta/permission serves one item per (package, name) (ADR-0150 D4), so two holders of one name give two options with one value | every administrator who grants a permission set through a form once #31698 PR-2 lets two packages hold one name
    Thread-read: 6829083301
    Premise: holds on main 776474e8 (RegistryRefField.tsx:325 and :372 map value: item.name); the card thread re-reads on the merged ref before writing. Per the epic seat (16:51Z) this card does not gate #31698 PR-2: a package-less grant on a name two packages hold is read by the server as granting nothing (fail closed). It is p1 on the release line.
    Serial constraints cleared: disjoint at file level from PR #32769 (#32537: metadata-admin/, setup/, i18n packs; it does not touch RegistryRefField.tsx, which #32537's claim listed and its PR left to this card) and from every in-flight domain:ui claim (ui#2: #32713 auth/src/__tests__/, #32643 first-run checklist, #32462 dashboard tests). Shares ui/packages/i18n with PR #32769 (ordinary concurrency; merge-main after it lands). #32774 (pm:blocked on #32537) stays unclaimed.


    Generated by Claude Code

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 12, 2026
  5. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#6 · os-sales · session_01L6bhgUAXJEaRNwDiLuAvEZ

    Claim: PM loop round 1
    Session: session_01L6bhgUAXJEaRNwDiLuAvEZ
    Account: os-sales
    Branch: claude/project-thread-52nlh4 (the card thread's designated branch, on origin/main 776474e8; restates claim 6830594063)
    Worktree: the card thread's own container (session_01L6bhgUggWHogPsPxUuTMZX)
    Domain: domain:ui
    Seat: domain:ui#6
    File surface: ui/packages/fields/src/widgets/RegistryRefField.tsx (the permission-ref options, the value it writes, and how a grant form pairs permission_set with permission_set_package), its tests under ui/packages/fields/src/**, the form-side pairing of the two grant columns if it lives outside the widget (under ui/packages/fields/src/** or ui/packages/app-shell/src/**; name the file in the PR), ui/packages/i18n/src/** (add keys only, then gen:zh-hant), root .changeset/; read-only: PR #32769's ui/packages/app-shell/src/views/metadata-admin/permission-set-holder.ts (the holder conventions; ⛔ not edited here while #32769 is open), packages/plugins/plugin-security/src/objects/sys-user-permission-set.object.ts, packages/platform-objects/src/identity/{sys-user,sys-idp-group-mapping}.object.ts, packages/spec/src/ui/action.zod.ts (the widget's users and what each server reader accepts); ⛔ no packages/** edits (a reader that can only take a bare name is reported for a split, never resolved by order; stop on breach and explain in the report)
    Container & model: M, own card thread (p1, on the #31527 release line), model: default tier (dispatch-gates --tier: "no path-derived mandate" for ui/**), effort: xhigh (p1)
    Clause-②: yes (declared up front: widening the widget's value shape or a new @object-ui/i18n key; if neither happens, the PR says no and why)
    Metadata-protocol: none
    Responsibility: the permission-ref picker in objectstack ui/ (RegistryRefField.tsx ~:319-325 builds { value: item.name, label } from GET /api/v1/meta/permission and writes only the name) | /meta/permission serves one item per (package, name) (ADR-0150 D4), so two holders of one name give two options with one value | every administrator who grants a permission set through a form once #31698 PR-2 lets two packages hold one name
    Thread-read: 6829083301
    Premise: holds on main 776474e8 (RegistryRefField.tsx:325 and :372 map value: item.name); the card thread re-reads on the merged ref before writing. Per the epic seat (16:51Z) this card does not gate #31698 PR-2: a package-less grant on a name two packages hold is read by the server as granting nothing (fail closed). It is p1 on the release line.
    Serial constraints cleared: disjoint at file level from PR #32769 (#32537: metadata-admin/, setup/, i18n packs; it does not touch RegistryRefField.tsx, which #32537's claim listed and its PR left to this card) and from every in-flight domain:ui claim (ui#2: #32713 auth/src/__tests__/, #32643 first-run checklist, #32462 dashboard tests). Shares ui/packages/i18n with PR #32769 (ordinary concurrency; merge-main after it lands). #32774 (pm:blocked on #32537) stays unclaimed.


    Generated by Claude Code

  6. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#6 · os-sales · session_01L6bhgUAXJEaRNwDiLuAvEZ

    Claim: PM loop round 1
    Session: session_01L6bhgUAXJEaRNwDiLuAvEZ
    Account: os-sales
    Branch: claude/project-thread-52nlh4 (the card thread's designated branch, on origin/main 776474e8; restates claim 6830653764 with the file surface the card thread measured: route A)
    Worktree: the card thread's own container (session_01L6bhgUggWHogPsPxUuTMZX)
    Domain: domain:ui
    Seat: domain:ui#6
    File surface: ui/packages/fields/src/widgets/RegistryRefField.tsx (the permission-ref options, the value it writes, the read-only label by the stored package) and its tests under ui/packages/fields/src/**; ui/packages/types/src/data.ts (DataSource.listMetadataItems items gain an optional packageId, additive) and ui/packages/data-objectstack/src/** (carry the served _packageId into it), their tests; ui/packages/components/src/renderers/form/form.tsx (hand onAutofill to permission-ref on a create form only); ui/packages/plugin-form/src/** (the create write path keeps the permission_set_package the widget wrote for the grant object, nothing else; edit and every other readonly key unchanged; the server's stamp hook stays the judge) and its tests; ui/packages/i18n/src/** (add keys only, then gen:zh-hant), root .changeset/; read-only: PR #32769's ui/packages/app-shell/src/views/metadata-admin/permission-set-holder.ts (⛔ not edited while #32769 is open), packages/plugins/plugin-security/src/objects/sys-user-permission-set.object.ts, packages/platform-objects/src/identity/{sys-user,sys-idp-group-mapping}.object.ts, packages/spec/src/ui/action.zod.ts; ⛔ no packages/** edits (targets whose server reader takes only a bare name — edit of a grant, create_user and the two group-mapping action params — list a package holder's option disabled with the reason, never resolved by order; stop on breach and explain in the report)
    Container & model: M, own card thread (p1, on the #31527 release line), model: default tier (dispatch-gates --tier: "no path-derived mandate" for ui/**), effort: xhigh (p1)
    Clause-②: yes (declared up front: widening the widget's value shape or a new @object-ui/i18n key; if neither happens, the PR says no and why)
    Metadata-protocol: none
    Responsibility: the permission-ref picker in objectstack ui/ (RegistryRefField.tsx ~:319-325 builds { value: item.name, label } from GET /api/v1/meta/permission and writes only the name) | /meta/permission serves one item per (package, name) (ADR-0150 D4), so two holders of one name give two options with one value | every administrator who grants a permission set through a form once #31698 PR-2 lets two packages hold one name
    Thread-read: 6829083301
    Premise: holds on main 776474e8 (RegistryRefField.tsx:325 and :372 map value: item.name); the card thread re-reads on the merged ref before writing. Per the epic seat (16:51Z) this card does not gate #31698 PR-2: a package-less grant on a name two packages hold is read by the server as granting nothing (fail closed). It is p1 on the release line.
    Measured (card thread, 776474e8): listMetadataItems drops _packageId; permission_set_package is readonly and sanitizeFormData strips it on create and edit; the server's insert accepts a named holder (409 when not held) and its update re-stamps; the action params' routes take a bare name. Route A meets the card's Expected as written. Red line: the client keeps one key on create only; every server verdict is unchanged; the epic seat re-reads before landing.
    Serial constraints cleared: no open pull request touches ui/packages/{types/src/data.ts,data-objectstack,components/src/renderers/form,plugin-form} (all 39 open PRs' files read at 17:26Z); disjoint at file level from PR #32769 (#32537: metadata-admin/, setup/, i18n packs; it does not touch RegistryRefField.tsx, which #32537's claim listed and its PR left to this card) and from every in-flight domain:ui claim (ui#2: #32713 auth/src/__tests__/, #32643 first-run checklist, #32462 dashboard tests). Shares ui/packages/i18n with PR #32769 (ordinary concurrency; merge-main after it lands). #32774 (pm:blocked on #32537) stays unclaimed.


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#6 · os-sales · session_01L6bhgUggWHogPsPxUuTMZX
    os-dev-report

    {
      "issue": 32770,
      "status": "done",
      "branch": "claude/project-thread-52nlh4",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/32793",
      "session": "session_01L6bhgUggWHogPsPxUuTMZX",
      "premise_still_valid": true,
      "summary": "permission-ref now lists one option per holder of a permission-set name the registry serves more than once, each naming its package or the environment, and still writes the name. On a grant's create form a package's pick also writes permission_set_package (the record form hands the widget its sibling writer on a create only, and the form write keeps that one readonly key on that one object on a create only). Bare-name targets (grant edit, create_user, both group-mapping actions) list package holders disabled with a note; the environment's own set stays pickable; nothing is resolved by order. A name one holder serves is byte-identical to main. The contract widening is optional: DataSource.listMetadataItems items may carry packageId (the served _packageId).",
      "tests": "New pins: RegistryRefField.packageHolders-32770 (12), listMetadataItems-7611 (+2), form-create-only-autofill-32770 (5), objectFormPermissionSetHolder-32770 (12, incl. ObjectForm end to end with the real widget). Package suites fields + data-objectstack + plugin-form + types + i18n + components form renderer: 1229 files / 21474 tests pass (lock VERDICT command-exit 0, on b12e015b). Ablation: 16 legs via scripts/ablation-replace.mjs inside the verify lock, each pin red, each restored blob == HEAD with an empty git diff HEAD (no dist rebuild: these suites resolve @object-ui/* to src). Live: showcase on os dev with the console rebuilt, real insert door: CONTROL 201 name only; mocked second holder: 409 for the package that does not hold the name, 201 with the package kept for the real holder; edit form lists both package options disabled with the note and sends nothing. Evidence in the project files, issue-32770/live.",
      "gates": "dispatch-gates --commands on 5fe46e3b: 40 derived, 40 run, all exit 0 (ui vitest run scripts/: 171 files, 5062 tests); --ran: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN. check:test-source-alias was red on the first head and fixed (module-top react-runtime import in the components pin). type-check for the six touched packages: 58/58 turbo tasks. check:type-check-debt OK. check-sdui-manifest exit 0. eslint --no-inline-config on the 25 changed ui files: 0 errors from this diff (4 pre-existing console lines carry inline disables on main). CI check-runs: pending at report time.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "GitHub MCP reads only: issue_read and pull_request_read (get, get_files) — the exact count from before a context compaction was not retained; no write tool was called",
      "api_writes": "3 — git push of the branch (not REST); relay pr_create (run 43286005055, PR #32793); this comment via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · noted, not filed — RegistryRefCell (list/detail read face) still draws a stored name's label by name only; where two holders label one name differently it can draw the other holder's label (display-only; needs the row's package at each list call site)",
        "carrier: seat · noted, not filed — a field named permission_set with widget permission-ref on any other object would get the create-form writer and offer package picks whose package the form strips; no platform or example object declares one"
      ]
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#6 · os-sales · session_01L6bhgUAXJEaRNwDiLuAvEZ

    Landing: PR #32793 at 9fb7a627 is in the merge queue (ready + auto-merge). Epic red-line PASS-with-nits 6833497353, contract review TIER_DEFAULT PASS 6833224374 + delta 6833774499. Follow-up: #32795 (the read's nits). On merge this card closes and the seat posts the landing note.


    Generated by Claude Code

  9. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#6 · os-sales · session_01L6bhgUAXJEaRNwDiLuAvEZ

    Landed: PR #32793 merged as 8ce5827f (2026-11-12T20:12Z); this card closed with it. pm:dispatched removed in this stroke. The permission-ref picker lists one option per holder of a name and a New grant form saves the picked holder's package; targets that take a bare name offer only what they can address. Follow-up: #32795 (the epic read's nits).


    Generated by Claude Code

  10. removed
    pm:dispatched
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:accessdomain:uipriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions