Skip to content

fix(app-shell): the pre-publish capability lint reads the registry's capabilities; isolated tenant-admin assignment re-verified (#7611) - #13361

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-7611-isolated-assign-reverify
Oct 23, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-7611-isolated-assign-reverify

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #7611

This closes the remainder that release record 6357827416 left on #7611. All three items are done: one is a measurement with no source change, one is a cleanup with no behaviour change, and one is a fix for a lint warning that reproduced.

Clause-②: no
Metadata-protocol: none

1. Under isolated, a tenant admin still assigns through the Setup picker (measured, no change needed)

Rig. objectstack framework built at main 830a63a6, a descendant of 448374d3f8 (objectstack-ai/objectstack#24136, PR objectstack-ai/objectstack#24732). The app-showcase app plus @objectstack/organizations was booted twice with os dev --seed-admin --fresh:

  • OS_TENANCY_POSTURE=isolated with OS_AUTH_MEMBERSHIP_POLICY=invite-only (port 4011). The boot banner reads Tenancy: isolated.
  • single (port 4010). The boot banner reads Tenancy: single.

This branch's console ran against each server. Personas were minted through /api/v1/auth/admin/create-user, then change-password, organization/create, invite-member and accept-invitation. Tara Tenant owns Acme Tenant: her /me/permissions lists organization_admin and isPlatformAdmin: false. Mia Member and Noah Newhire are members. Playwright drove the real pages at /apps/setup/metadata/{position|permission}/<name>?scope=environment, clicked Add holder or Add user, and picked the user in the RecordPickerDialog. Every /api response was recorded.

isolated, tenant admin Tara:

Step on the Setup page Request Answer
Position contributor, add holder Mia POST /api/v1/data/sys_user_position {"user_id":"fnBt…","position":"contributor"} 201. The row carries organization_id = Acme Tenant, and Mia appears in the holders list.
Position field_ops_delegate, add holder Mia POST /api/v1/data/sys_user_position 403 organization administrator 'insert' on 'sys_user_position' rejected — position 'field_ops_delegate' carries permission set 'showcase_field_ops_delegate', which fails condition (b) of the organization boundary: it carries an adminScope…. The page shows the server's sentence.
Permission set showcase_contributor, add user Noah POST /api/v1/data/sys_user_permission_set {"user_id":"AE0q…","permission_set":"showcase_contributor"} 201
Permission set admin_full_access, add user Noah POST /api/v1/data/sys_user_permission_set 403 permission set 'admin_full_access', which is outside the organization boundary by name…
Remove Noah from showcase_contributor DELETE /api/v1/data/sys_user_permission_set/Hl81… 200
Remove Mia from contributor DELETE /api/v1/data/sys_user_position/Qzul… 200
Position and permission lists none Read-only banner, no New button.

Across 393 recorded responses, none went to the retired sys_position, sys_permission_set, sys_position_permission_set or sys_capability objects.

single, unchanged:

Persona Step Answer
Platform admin Add holder to position contributor, add user to set showcase_contributor 201, 201. New is offered, matching #12998.
Org admin Olga (organization_admin_no_bypass) Add holder to position manager, add user to set showcase_executive 201, 201
Org admin Olga Add user to set admin_full_access 403, outside the organization boundary by name
Org admin Olga Remove the manager holder 200. The lists show no New button.

Under single, an org admin now assigns inside the boundary as well. That is objectstack-ai/objectstack#24136's grant, which is not specific to isolated, and the console follows the server's grant with no posture branch. The platform admin's path is the same as before.

2. Dead sys_position display entry removed (internal, no behaviour change)

3. The pre-publish capability lint read no registry capabilities (reproduced, fixed)

@objectstack/lint's validateCapabilityReferences resolves a reference against three sources: the built-in capabilities, stack.capabilities (the defineCapability declarations) and every permission set's systemPermissions. lintDraftCapabilityReferences built a pseudo-stack with no capabilities. So a capability declared with defineCapability and granted by no set was reported as resolving nowhere on every draft that required it.

Measured live on the single rig with Publish from Home. Two object drafts were used. One requires showcase.restricted_ops: GET /api/v1/meta/capability serves it, and no permission set grants it. The other requires the misspelling showcase.restricted_opz.

  • Before: two toasts, one false (restricted_ops) and one real (the typo).
  • After: one toast, the typo only.

Fix (packages/app-shell/src/preview/capabilityLint.ts): the pseudo-stack now carries capabilities read from client.list('capability', {}), unwrapped and stripped the same way as the permission rows. If that read fails, the list is empty, so the lint runs on the other sources and stays advisory.

Tests

  • New capabilityLint.registryCapabilities-7611.test.ts runs the real validateCapabilityReferences, not a stand-in. It has four cases: the registry serves the capability; the row comes in an { item } envelope; a CONTROL where the registry is empty and both drafts warn; and a failed capability read, which still gives two warnings and does not throw.
  • Ablation: with capabilities, removed from the stack, 2 of the 4 new tests fail (Tests 2 failed | 2 passed (4)). Restoring gives blob 3a9ac204 = HEAD.
  • pnpm exec vitest run packages/app-shell/src/preview packages/app-shell/src/utils/approverIdentity packages/app-shell/src/hooks/useApproverDirectory: 34 files, 252 tests passed.

Gates

turbo run type-check --filter=@object-ui/app-shell (it builds the workspace dependencies first) passes: 30 of 30 tasks, exit 0.

eslint on the four touched source and test files: 0 errors. There are 7 no-explicit-any warnings, all on lines this diff does not change.

These checks all pass: check-changeset-presence, check-changeset-claims, check-pending-changeset-literals, check-changeset-no-major, check-changeset-fixed, check-control-bytes, check-test-path-roots, check-vi-mock-specifiers, and check:new-line-citations (0 new citations).

File surface

Everything is inside the claimed surface except two files, both declared here:

  • useApproverDirectory.ts: comment-only, the same stale position wording as item 2.
  • content/docs/guide/console.md: one sentence naming the sources the capability lint resolves against (AGENTS.md: docs-driven).

The branch is claude/issue-7611-isolated-assign-reverify. It is based on main 2c4e5f5, and main has not moved since.

  • Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer)

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01WvJkpohCWbizJavd86HTZz

…proverIdentity

`position` has been registry-bound in the installed spec since 18
(objectstack#22710), so no `data` approver binding names `sys_position` and
its `DISPLAY_FIELDS_BY_OBJECT` row is read by nothing. The
`approverValueIsName` docblock still said `position` answers through the
data arm; it now names the registry arm. `useApproverDirectory`'s header
listed `sys_position` among the directory objects it reads and used it as
the label-leg example; both re-worded to the registry read.

Part of objectui#7611 (release record 6357827416, item 2).

Claude-Session: https://claude.ai/code/session_01WvJkpohCWbizJavd86HTZz
Co-authored-by: Claude <noreply@anthropic.com>
…capabilities

`validateCapabilityReferences` resolves a reference against the built-in
capabilities, `stack.capabilities` (the `defineCapability` declarations) and
`systemPermissions` grants. The console's pseudo-stack carried the first and
the last only, so a capability a package declares with `defineCapability`
and no permission set grants was reported as resolving nowhere on Publish
from Home. Measured live against objectstack main 830a63a: an object draft
requiring `showcase.restricted_ops` raised "2 capability reference(s)
resolve nowhere" beside a misspelled control; with the registry list read,
only the misspelling is reported.

The pseudo-stack now carries `GET /api/v1/meta/capability`. A failed read
leaves the pass on its other sources, still advisory.

Part of objectui#7611 (release record 6357827416, item 3).

Claude-Session: https://claude.ai/code/session_01WvJkpohCWbizJavd86HTZz
Co-authored-by: Claude <noreply@anthropic.com>
…s against

Part of objectui#7611 (release record 6357827416, item 3).

Claude-Session: https://claude.ai/code/session_01WvJkpohCWbizJavd86HTZz
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests package: app-shell labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 77 chunks) 3227.0 KB 3744.1 KB
Main entry chunk (gzip) 81.6 KB 350 KB
Entry file index-BtJYsMIr.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (buildIdentity.js) 0.80KB 0.49KB
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 21.41KB 7.90KB
app-shell (runtime-config.js) 24.52KB 8.48KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 45.59KB 12.03KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 20.67KB 6.12KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.74KB 3.94KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.62KB 0.83KB
auth (authStyles.js) 5.27KB 1.86KB
auth (createAuthClient.js) 42.84KB 11.66KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.26KB 8.03KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.28KB 2.60KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (commentAuthorship.js) 1.39KB 0.78KB
collaboration (index.js) 1.93KB 0.85KB
collaboration (useCollaborationTranslation.js) 6.50KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 617.54KB 150.58KB
core (index.js) 10.18KB 4.04KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 253.04KB 70.68KB
fields (index.js) 294.97KB 75.45KB
i18n (LocalizationContext.js) 2.92KB 1.42KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.52KB 2.39KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.35KB 12.88KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 36.87KB 9.88KB
i18n (useSafeTranslation.js) 7.14KB 2.92KB
layout (index.js) 41.40KB 12.01KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 15.35KB 5.51KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.82KB 2.38KB
permissions (ServerReadScope.js) 4.03KB 1.82KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.99KB 0.43KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.04KB 3.92KB
plugin-calendar (index.js) 55.56KB 16.21KB
plugin-charts (index.js) 86.08KB 23.67KB
plugin-chatbot (index.js) 238.47KB 56.30KB
plugin-dashboard (index.js) 147.53KB 39.95KB
plugin-designer (index.js) 233.95KB 50.08KB
plugin-detail (index.js) 267.56KB 71.11KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 186.64KB 48.54KB
plugin-gantt (index.js) 178.46KB 45.13KB
plugin-grid (index.js) 277.24KB 77.04KB
plugin-kanban (index.js) 64.49KB 19.83KB
plugin-list (index.js) 149.81KB 39.28KB
plugin-map (index.js) 27.17KB 9.00KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 46.66KB 13.13KB
plugin-timeline (index.js) 39.31KB 11.88KB
plugin-tree (index.js) 15.27KB 5.40KB
plugin-view (index.js) 94.54KB 24.33KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 12.07KB 3.68KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 129.13KB 42.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.71KB 2.11KB
react (schema-input.js) 4.31KB 2.07KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.50KB 1.99KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.07KB 1.30KB
sdui-parser (index.js) 7.30KB 3.12KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 25.28KB 7.81KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 23.87KB 7.83KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (authoring-nodes.js) 0.20KB 0.19KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (cloud.js) 0.20KB 0.18KB
types (complex.js) 4.44KB 2.07KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (dashboard-widget-layout.js) 2.06KB 0.96KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 1.13KB 0.65KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 5.78KB 2.70KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (node-slots.js) 7.18KB 2.34KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (product-blocks.js) 0.20KB 0.19KB
types (record-approval-decision.js) 0.20KB 0.20KB
types (record-components.js) 0.20KB 0.19KB
types (record-panels.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 4.99KB 1.96KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.93KB 7.26KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.48KB 3.50KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT — objectui#7611 (p1, M), head b398f2ae78a841468176e9f6c0a7475364e93054, reviewed 2026-10-23T12:21Z.

Seat: domain:ui#1 · Clause-②: no

项 读数
形态 6 个文件,+132/−14,全在 packages/app-shell、content/docs/guide/console.md 和 .changeset/ 内。check-governed-queue-guard.mjs --test 判 NOT GOVERNED。changeset:@object-ui/app-shell patch,带 Clause-②: no 和 Metadata-protocol: none。PR 正文已申报两处文件面偏差:useApproverDirectory.ts 只改注释,console.md 加一句,都接受。
前提实测 ① isolated 下的开放条款已端到端复验,无需改 console。复验用的框架是 objectstack main 830a63a6,晚于 448374d3f8。租户管理员经 Setup 选择器分配岗位和权限集都得到 201,越界的 field_ops_delegate、admin_full_access 得到 403,页面原样显示服务端的那句话,移除得到 200;single 下不变。请求与应答表见 PR 正文。
② 清理 approverIdentity 去掉 sys_position 的显示列。DISPLAY_FIELDS_BY_OBJECT 是模块内常量,不在包导出面上。已安装的 spec 把 position 绑到注册表(objectstack#22710),走第一臂,所以去掉这一项不改变行为。docblock 已按现状改写。
③ 修复 发布前的 capability 引用提示改为也读注册表提供的 capability(client.list('capability')),读失败时退回原来的数据源,不阻断发布。dev 实测复现了误报:修复前 2 条提示,修复后 1 条;去掉修复后,新测试 4 项里有 2 项变红。拼错的 capability 仍然会报。
门禁 dev 本地 type-check 30/30,vitest 34 个文件 252 项全过。CI 全绿后由席位转 ready、进合并队列。
落地条款 Fixes #7611:合并后卡自动关闭。席位在卡上贴 LANDED 并撤掉 pm:dispatched。

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 23, 2026 12:30
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 23, 2026 12:30
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit f2f4b7d Oct 23, 2026
37 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-7611-isolated-assign-reverify branch October 23, 2026 12:45
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 package: app-shell tests

Projects

None yet

2 participants