Skip to content

feat(setup): the environment directory moves from Studio to Setup's access group - #37602

Merged
objectstack-fleet[bot] merged 17 commits into
mainfrom
claude/project-thread-x4tuqk
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 17 commits into
mainfrom
claude/project-thread-x4tuqk

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #37565

Clause-②: no
Metadata-protocol: none

维护者速读

  • 岗位、能力、权限集、共享规则的全环境目录,从 Studio 菜单搬到 Setup 的“访问控制”分组,名为“岗位与权限”。
  • Studio 菜单不再有这一项;对能进 Setup 的用户,旧的书签和链接只跳转一次,直接落到 Setup 的新页面;不能进 Setup 的 Studio 用户仍在 Studio 里看这些列表。
  • 进入门槛没有放宽:新入口和新页面都要求进入 Studio 所需的同一项权限,外加 Setup 本身的权限。
  • 在目录里点开某一条,仍在 Studio 的编辑器中打开;Studio 找不到包时的默认落点暂时改为“无包”范围,等“移入包”功能上线后一并撤掉。

What changes

  • New Setup entry: nav_access_directory ("Positions and Permissions", icon key-round) in Setup's group_access_control, contributed by packages/platform-objects/src/apps/setup-nav.contributions.ts, with requiredPermissions: ['studio.access']. Labels in all 11 locale packs, source hashes updated.
  • New Setup page security:access-directory (/apps/setup/component/security/access-directory), registered in builtinComponents.tsx. It serves the directory and each environment type's list (permission, position, capability, sharing_rule, ?scope=environment) by mounting the existing metadata-admin directory and list pages under the cross-package leg's host shape (no package, writable), rooted at the page. Without studio.access it renders an alert naming the capability and reads nothing.
  • Rows open the item editor in Studio: an item, a create and a history under the Setup page go to /studio/~all/metadata/<type>/<name>?scope=environment, the editor the environment scope uses today, because an environment item is edited by name and may belong to no package.
  • Studio's ~all menu entry is retired (studioMenuModel.ts, its label key and icon). The package-less menu's access rows point at the Setup page's type lists for a user holding setup.access; without it they keep the Studio environment-scope lists (/studio/~all/metadata/<type>?scope=environment).
  • Old addresses redirect once: /studio/~all, /studio/~all/metadata and a list of one of the four types in the environment scope, including Setup's old /apps/setup/metadata/... catalog addresses, land on the Setup page in one hop for a user holding setup.access (inside Studio read from the set Studio's entry gate hands its pages; on Setup's old aliases from the session's capability answer, read fail-closed). Without it, the leg keeps them and a bare /studio/~all/… lands on /studio/~all/metadata. The cross-package list of any other type, and item pages, stay in Studio.
  • Studio's no-package fallback (studioEntryFallbackPath, newPackageDoorPath) now lands on /studio/~org/metadata/flow?source=runtime instead of the retired directory. ⚠️ This is temporary: ~org retires with the Phase 4 "move into package" door (Q3 ruling 7184753035), and the fallback moves with it.
  • The Studio package-not-found button's label (engine.studio.notFound.allMetadata, key unchanged) now names where it goes: "Open organization flows" / 打开「组织流程」.
  • Surface added with the area's approval (claim amendments on App Studio 改版(3-2):「全部软件包」目录 ~all 搬到设置的访问分组,Studio 不再有这个入口 #37565; the third adds the setupMetadataStudioPath call sites in ui/packages/app-shell/src/console/AppContent.tsx and ui/apps/console/src/AppContent.tsx): a one-line re-export of ACCESS_DIRECTORY_PATH (and, in the rework, holdsSetupAccess) from ui/packages/app-shell/src/index.ts; a doc-comment-only edit in StudioEntryRedirect.tsx; one sentence each in content/docs/permissions/authorization.mdx and content/docs/permissions/permission-sets.mdx, and two lines of content/docs/permissions/administrator-guide.mdx (the matrix editor's path and the where-to-find table row), re-pointed at Setup → Access Control (second claim amendment); and StudioPaletteGroups.tsx drops the retired kind's icon key and its import, which the full build refused to compile.

Answer to #37424 comment 7188504633 (a)

The package's 全部类型 directory still lists datasource where the package holds one, and that tile still opens Setup → Datasources (the directory's href override). This PR does not change that; removing the menu row is #37564's job. The new Setup access directory lists only the four environment types and never datasource.

Tests

  • New: views/setup/accessDirectory.test.ts (address model: what lands on Setup, what stays in Studio, one hop both ways) and views/setup/AccessDirectoryPage.test.tsx (gate refusal with control, the host shape, the four lists, scope added, items/create/history open in Studio).
  • Re-pointed, not weakened: every test that pinned ~all now pins the Setup page or the Studio item editor, and the retired entry is pinned absent (studioMenuModel, StudioMenu, StudioPaletteGroups.surfaceScope-36900, setupMetadataRedirect, AppContent.setupMetadataStudio-28578, console AppContent.legacyRedirects, AppContent.systemHubRoutes, StudioRoute.metadataArea-28561, StudioEntryRedirect, HomePage.noAgentsBuildChip-26614, StudioDesignSurface.metadataArea-28561, StudioMetadataArea.routes-28561, StudioPackageMenu-37139 (its ~all/overview case now lands on Setup, plus an item page the leg still draws), StudioDesignSurface.notFound-26708, SidebarAppMenu-36112, AppContent.emptyNavigationLanding-12079, AppContent.noAppComponentRoutes (the zero-app legacy directory alias: one hop to Setup, then the no-apps empty state that branch renders for every Setup page; ablated: identity studioAddressAfterSetupMove turns it red), AppContent.pseudoRouteSegments), and the live e2e declared-sharing-rules-reach-13091 lists from the Setup page.

Acceptance notes

Verification

Rework round (seat L1 at 4320d105), pushed on the same branch, no rebase. Head 0471b08e; CI result is reported on the PR once green.

  • M1: parity with the Studio gate, pinned on each of that gate's own policy cases (holder, operator, tenant owner, reported empty set, no reported set), with an ablation that turns the parity tests red.
  • S1: full-chain toEqual([from, to]) restored in both AppContent.systemHubRoutes tables and the TO_SETUP_DIRECTORY block of AppContent.setupMetadataStudio-28578.
  • S2: both branches tested in studioMenuModel, StudioMenu, StudioMetadataArea.routes-28561 and console StudioRoute.metadataArea-28561; ablating the four setup.access reads turns 12 cases red.
  • S3 (delta review): Setup's old catalog aliases (/apps/*/metadata…, component/metadata/directory, system/{positions,roles,permissions}) take the same setup.access branch, a set never reported counting as none. Both branches and the no-answer case are pinned in setupMetadataRedirect, AppContent.setupMetadataStudio-28578, console AppContent.systemHubRoutes and AppContent.legacyRedirects; ablating the branch (42 cases) or reading it fail-open turns them red.
  • N1/N2: the i18n comment and the two doc sentences corrected (only the ?scope=environment lists redirect, and only for a user who can open Setup).
  • Unit: all 20 test files this branch touches green. Type-check: @object-ui/app-shell, @object-ui/console green. Gates: check:test-source-alias, check:i18n, check:nul-bytes, check:doc-authoring, check-affected-docs green.

Earlier round, at 4320d105: CI 61 success, 0 failed; derived gates (67 commands) green, full pnpm build and pnpm console:build green.

  • Browser, showcase app booted locally, signed in as the seeded admin, light and dark (8 screenshots):
    • /apps/setup/component/security/access-directory shows the directory of the four types, with Access Control → Positions and Permissions selected in Setup's sidebar.
    • /studio/com.example.showcase/metadata: the Studio menu's Access group no longer carries the cross-package entry.
    • An old link, /studio/~all/metadata/position?scope=environment, lands on /apps/com.objectstack.setup/component/security/access-directory/position?scope=environment and lists the 17 positions.
  • Follow-up noted, not in this card: the Setup page reuses the directory's own heading ("All Metadata Types"); a page-specific heading would read better.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/platform-objects, touching 14 documentable anchor(s).

8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/deployment/cli.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/permissions/administrator-guide.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/permissions/authorization.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/permissions/permission-sets.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/permissions/system-context.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/ui/apps.mdx (via group_access_control (literal, a string literal in group), studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/ui/audience-based-interfaces.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v15.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/releases/v16.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/releases/v17/17-5.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))
  • content/docs/releases/v17/17-6.mdx (via studio.access (literal, a string literal in SETUP_NAV_CONTRIBUTIONS))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see

Coarse fallback — 3 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 41babf7e649648e7d4b6fd6c5f0d3e8d6d7b406e → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1830d2ac735bc3345997e34c829fc73d5c58cb26 — the merge of head 0471b08e86fa876c4d45deeaf3e2a76a1993811c into base 41babf7e649648e7d4b6fd6c5f0d3e8d6d7b406e, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1830d2ac735bc3345997e34c829fc73d5c58cb26 && git checkout 1830d2ac735bc3345997e34c829fc73d5c58cb26
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 41babf7e649648e7d4b6fd6c5f0d3e8d6d7b406e 0471b08e86fa876c4d45deeaf3e2a76a1993811c && git checkout -B drift-repro 41babf7e649648e7d4b6fd6c5f0d3e8d6d7b406e && git merge --no-ff 0471b08e86fa876c4d45deeaf3e2a76a1993811c

node scripts/docs-audit/affected-docs.mjs --json 41babf7e649648e7d4b6fd6c5f0d3e8d6d7b406e

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 41babf7e649648e7d4b6fd6c5f0d3e8d6d7b406e → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…Setup and ~org

The not-found exit's label names where it now goes (organization flows).

Claude-Session: https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 26, 2026
…ry alias's one hop

Claude-Session: https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CZhAqkgRyMYuZeZt9S

Test Core (5/10) on 9f14ff8 is red on one case: @objectstack/cli test/start-deployment-durability.integration.test.ts › "only the database missing: names only OS_DATABASE_URL" — Test timed out in 5000ms (a spawned start on a loaded runner). This diff touches no CLI code. The same file passes locally at this head (11/11). The failed jobs will be re-run once after the run completes. If it is red again, it gets a real look.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CZhAqkgRyMYuZeZt9S

The one re-run reproduced the same Test Core (5/10) timeout, on the same case. It is a known flake, not this diff: #37601 (the #30120 start-refusal cases spawn os start synchronously under vitest's 5 s case default; CI took ~70 s for the file, against ~21 s locally), anchored as a queue flake by #37617. Nothing from that fix is on main yet to port. No push for it here.


Generated by Claude Code

…-x4tuqk

# Conflicts:
#	ui/packages/app-shell/src/views/studio-design/StudioPackageMenu-37139.test.tsx
#	ui/packages/app-shell/src/views/studio-design/studioMenuModel.ts
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Final green head (2026-11-26T16:45Z): 4320d105bfe447d10063811668035eff34ced4a8. Main was merged once after #37546. CI per the card thread: 61 success, 9 expected skips, 0 failed, mergeable clean. The os-dev report is 7195427336 on #37565. The card thread updated the PR body at this head. Sent to seat repo:objectstack#5 for L1.

Area notes for L1:

  1. Surface: claim 7193663065 plus two area amendments on App Studio 改版(3-2):「全部软件包」目录 ~all 搬到设置的访问分组,Studio 不再有这个入口 #37565. The first covers the index.ts re-export, the StudioEntryRedirect.tsx doc comment, and one sentence each in authorization.mdx and permission-sets.mdx. The second covers two lines in administrator-guide.mdx and the retired kind's icon key in StudioPaletteGroups.tsx (the build needed it). StudioDesignSurface.tsx is untouched.
  2. Re-pointed, not weakened (area ruled):
    • The zero-app legacy-alias case in noAppComponentRoutes pins the one-hop chain to /apps/setup/component/security/access-directory. It has an ablation (redirect made identity, red). It is not a dropped assertion.
    • The six files that went red on f9a5798c are re-pointed.
    • Main's new ~all/overview case in StudioPackageMenu-37139 now lands on Setup's directory.
  3. Copy value change: engine.studio.notFound.allMetadata keeps its key. Its en/zh values now read "Open organization flows" / 打开「组织流程」, because the button now lands on ~org.
  4. Open question (a) from 专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424 7188504633 (does the directory still list datasource?) is answered on the PR.
  5. Access rule unchanged: the Setup entry and the page both require studio.access on top of setup.access.
  6. Screenshots: objectstack-seat5/topic-37424/cards/shots-37565/, light and dark.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 4320d10 · 2026-11-26T16:47Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 4320d105bfe447d10063811668035eff34ced4a8
Local-runs: none

Inputs read: card #37565 (body, claim, both claim amendments, triage, os-dev-report), PR #37602 (body, file list, net diff against origin/main), and the check-runs on this head. Every completed gate on the head is success or an opt-in skipped; one duplicate Check Changeset run was still in_progress when read, beside a completed success for the same name.

① Derived judgments

Accept-set: nothing the server accepts or refuses changes. No spec, schema, route handler or metadata door is in the diff. The changes are client routing, one Setup navigation contribution (data), one registered component page, and labels.

Public-surface changes, each judged:

  • @objectstack/platform-objects: SETUP_NAV_CONTRIBUTIONS gains nav_access_directory in group_access_control (priority 100, componentRef: 'security:access-directory', requiredPermissions: ['studio.access']). Plus one label in each of the 11 locale packs, with a source hash in each of the 10 non-English hash files. Right. This is data inside an existing export, and no export shape changes.
  • @object-ui/app-shell: new ACCESS_DIRECTORY_PATH re-export from index.ts, plus new views/setup/accessDirectory*.ts and AccessDirectoryPage.tsx, and a new registered component ref. Right. The package is "private": true, so nothing is published from it and the re-export widens no published surface.
  • @object-ui/app-shell Studio menu: the environment menu kind is removed from StudioMenuEntryKind, from the label map and from both icon maps. The ~org/~all menus' catalog rows now open accessDirectoryPath(type). Right, as claimed. The type is internal to a private package.
  • @object-ui/app-shell fallback: studioEntryFallbackPath and newPackageDoorPath move from /studio/~all/metadata to studioOrgScopePath(). Right, and declared as temporary in the PR body and the changeset.
  • Console /studio/~all/* now goes to ACCESS_DIRECTORY_PATH with replace. Right.
  • @object-ui/i18n studio namespace: engine.setup.accessDirectory.notAllowed is added in en and zh. engine.studio.notFound.allMetadata keeps its key and changes its text to "Open organization flows" / 「组织流程」. Right.

Findings:

  • M1 (must-fix) — security. In one permission state, the access gate of the new Setup page (ui/packages/app-shell/src/views/setup/AccessDirectoryPage.tsx) is not at parity with the Studio entry gate it replaces. This breaches the card's own acceptance line: "opening it from Setup must not widen who sees it". The details are left out of this record on purpose and were given to the dispatching seat. The fix is small and local to that file and its test.
  • S1 (should-fix) — Some re-pointed one-hop pins were weakened, which the card rules out ("re-pointed, not weakened"). In ui/apps/console/src/__tests__/AppContent.systemHubRoutes.test.tsx (both tables) and in the new TO_SETUP_DIRECTORY block of ui/packages/app-shell/src/console/__tests__/AppContent.setupMetadataStudio-28578.test.tsx, the earlier expect(chain).toEqual([from, to]) became chain[0] / chain[1] checks. A second hop after the landing now passes under a title that still says "in ONE hop". The fix is to restore the full-chain equality (as AppContent.legacyRedirects, noAppComponentRoutes and pseudoRouteSegments do). If the chain grows after landing for a reason that is not a hop, such as the list page's own replace, say so in the test.
  • S2 (should-fix) — On ~org (and on ~all item pages), the catalog rows of the package-less menu now link to a Setup page. That page needs setup.access as well as studio.access. A Studio principal without setup.access (the repo's own STUDIO_ONLY fixture shape) is shown rows that lead to a refusal. Before this PR, the same rows opened in Studio. Gate those rows on Setup access, or record the dead end as accepted.
  • N1 (nit) — ui/packages/i18n/src/namespaces/studio/en.ts: the comment above engine.studio.notFound.allMetadata still says the way out is "the 'All metadata' area across packages". The value it describes now says "Open organization flows".
  • N2 (nit) — content/docs/permissions/authorization.mdx and permission-sets.mdx say "the old Studio and Setup catalog addresses redirect there". That holds only for the ?scope=environment lists. A bare /apps/setup/metadata/permission (no scope) still lands on Studio's cross-package list, as before.

② Semver level

The changeset .changeset/37565-access-directory-in-setup.md covers @objectstack/platform-objects, @object-ui/app-shell, @object-ui/i18n and @object-ui/console, all at patch. It carries Clause-②: no and Metadata-protocol: none, and the PR body carries the same two lines.

  • Level: right. AGENTS.md (Post-Task Checklist 3) says the level follows the metadata-protocol kind, and none takes patch. Nothing an author can write changes: a navigation contribution entry and labels are not authorable keys.
  • Clause-②: no is right. No contract accept/reject behaviour changes on the server. The only new export (ACCESS_DIRECTORY_PATH) is in @object-ui/app-shell, which is "private": true, so it is not a public-surface widening. In @objectstack/platform-objects (published), only data inside the existing SETUP_NAV_CONTRIBUTIONS export changes.
  • Every package the diff moves is named in the changeset. The changeset on the private app-shell is harmless.

③ Boundary flags

  • Dev flags: the report's open_questions is []. security_findings reads "none", and M1 above contradicts it. The one out_of_scope_findings entry is answered: the Setup page reuses the heading "All Metadata Types". It is noted on the PR and not filed. That is acceptable as a follow-up and not a blocker.
  • The card's open question (专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424 comment 7188504633 (a)) is answered in the PR body: the package's 全部类型 directory still lists datasource and its tile still opens Setup → Datasources. The new Setup directory lists only the four environment types. Accepted.
  • SQL push-down (Prime Directive 5): there is no new id materialisation and no in-app join. The page mounts the existing metadata-admin pages and reads nothing new. Clear.

Security-touching: yes — the PR moves a capability-gated surface (the environment catalog of positions, permission sets, capabilities and sharing rules) and re-implements its studio.access gate in a new place, a Setup nav entry and a Setup page. See M1.

Seat questions:

  1. Who can reach it, before and after. Before, the directory sat behind Studio's RequireStudioAccess (studio.access only). After, it sits behind the Setup app (setup.access), the nav entry's requiredPermissions: ['studio.access'], and the page's own studio.access check. Items, create and history still open in Studio behind the unchanged Studio gate. With a reported capability set, the page is strictly at or above the old rule. Holders of studio.access alone lose it, which is a narrowing the claim accepted. The Studio ~all redirects run inside the Studio gate. The Setup legacy aliases (/apps/…/system/permissions, /apps/setup/metadata) now reach the page without passing the Studio gate, so the page's own gate decides, and M1 applies there. The Studio palette entry is gone (StudioPaletteGroups.tsx). Separately, the Setup nav entry's visibility goes through the shared nav checkPerm, whose object-read fallback is unchanged by this PR and is not reviewed here.

  2. Old addresses. Every previous address still lands, and none is broken:

    • /studio/~all, /studio/~all/…, /studio/~all/metadata and the four types' ?scope=environment lists land on the Setup page.
    • The legacy Setup catalog URLs and aliases land on the Setup page.
    • Items and cross-package lists of other types stay in Studio.

    Every redirect added is Navigate … replace: in StudioRoute.tsx, in StudioMetadataArea.tsx (the leg redirect is composed through studioAddressAfterSetupMove, so it stays one hop), and in AccessDirectoryPage.tsx. The zero-app alias pin in AppContent.noAppComponentRoutes pins something real. It asserts the full chain [from, SETUP_DIRECTORY], which turns red if studioAddressAfterSetupMove is an identity. It also pins the destination's no-apps empty state, which every Setup page renders on a zero-app deployment. That is a real behaviour change (the alias used to open Studio's area there), and it follows from the accepted setup.access narrowing. Two other one-hop pins were loosened (S1).

  3. Clause-②: no at patch. Right; see ②. @object-ui/app-shell is "private": true and not published, so the new re-export is not a widening.

  4. i18n.

    • platform-objects: all 11 packs carry nav_access_directory, and all 10 hash files carry apps.setup.navigation.nav_access_directory.label with one shared English-source hash. They move together, and the i18n and stale-fill gates are green on the head.
    • Studio namespace: en and zh (the only two packs) are both updated.
    • Literals: the only new literals outside the packs are the component registration label and the lazyPage debug name, which is the sanctioned registry form used by the neighbouring registrations.
    • N1 is a stale comment, not a literal.
  5. Claim amendments. Nothing lands outside the claim and its two amendments:

    • index.ts: one re-export.
    • StudioEntryRedirect.tsx: comment only (verified).
    • Docs: the four sentences/rows in authorization.mdx, permission-sets.mdx and administrator-guide.mdx (×2).
    • StudioPaletteGroups.tsx: the import and icon key only.

    The other touched files are all in the claimed file surface: the StudioDesignSurface.* tests are re-pointed tests and do not touch the fenced StudioDesignSurface.tsx; accessDirectoryRef.ts is a new file under views/setup/; the notFound.allMetadata text follows the claimed fallback change.

Implemented-by: claude/project-thread-x4tuqk
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: 4320d105bfe447d10063811668035eff34ced4a8
REWORK — L1, seat repo:objectstack#5

  1. Shape: draft against main. 63 files, +885/−173. Not governed. Security-touching: it moves a studio.access-gated surface and re-implements the gate. Clause-②: no at patch is right (@object-ui/app-shell is private).
  2. Premise: moving the ~all directory into the Setup access group is sound. Every old address lands on the new page with a REPLACE, and no bookmark breaks. The i18n packs and hashes move in step, and nothing is edited outside the claim and its two amendments.
  3. Gates: contract record 7198230909 (TIER_DEFAULT) reads FAIL on M1. CI on this head: 0 failed.
  4. Owed before landing, by id from the record:
    • M1 (must-fix): the new Setup page's gate must be at exact parity with the Studio entry gate it replaces. Use the same predicate as RequireStudioAccess, and pin parity with a test for every permission answer the Studio gate's own tests cover. The seat gave the details to the area directly.
    • S1: restore the full-chain assertions (toEqual([from, to])) in AppContent.systemHubRoutes.test.tsx (both tables) and in the TO_SETUP_DIRECTORY block of AppContent.setupMetadataStudio-28578.test.tsx, so a second hop fails them.
    • S2: in Studio's package-less menu (~org and the ~all item pages), a catalog row now links to a page that also needs setup.access. Don't show a row whose target the user cannot open: link to the Setup page only when the user holds setup.access, and otherwise keep the Studio link.
  5. Ride along if cheap: N1 (the stale comment in studio/en.ts) and N2 (the docs' "the old addresses redirect there" holds only for the ?scope=environment lists, so say so).
  6. Landing terms: after the delta, the same reviewer re-checks it. Then the area lands it.

…s entry gate does

Claude-Session: https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S
Co-authored-by: Claude <noreply@anthropic.com>
…hoever may open Setup

Without setup.access the rows, the cross-package leg and the bare ~all
addresses keep the environment lists in Studio, where they were. Also
corrects two doc sentences (only the ?scope=environment lists redirect)
and a stale i18n comment.

Claude-Session: https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Final green head for the delta round (2026-11-26T17:43Z), answering the seat's REWORK 7198240498: 2918cc2e38843878b43bfe909a5fb2d3e6b32481. Per the card thread, CI shows 63 success, 0 failed, mergeable clean. The work is on the same branch with no rebase, pushed twice (c1dbc8fc, then 2918cc2e). The second push added the remaining parity rows. The red aggregators on the first head were lanes that the second push cancelled.

  • M1: the page's gate now matches the Studio gate. It is pinned at page and unit level on each of that gate's own policy cases, and an ablation turns the parity tests red.
  • S1: the full-chain toEqual([from, to]) assertions are back, with a waitFor on the whole chain. They cover both systemHubRoutes tables and the TO_SETUP_DIRECTORY block of setupMetadataStudio-28578.
  • S2: a new fail-closed holdsSetupAccess. Catalog rows in the package-less menu link to Setup only with setup.access. Otherwise they keep the Studio environment-scope link. To keep that link working, the StudioMetadataArea redirect and the console's bare ~all/* route are gated the same way. Both branches are tested in four suites, and the ablation turns 12 cases red. Every file is already in the claim and the two amendments, plus one more export on the approved index.ts line.
  • N1/N2: fixed. The en.ts comment changed, and the two doc sentences now say that only the ?scope=environment lists redirect, and only for a user who can open Setup.
  • Local runs: the branch's 20 test files pass, app-shell and console tsc pass, and test-source-alias, i18n, nul-bytes, doc-authoring and affected-docs pass.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 2918cc2e38843878b43bfe909a5fb2d3e6b32481
Local-runs: none

Delta review against the prior record on 4320d105 (FAIL), answering the seat's REWORK 7198240498.

Inputs read:

  • the delta pr-37602-a..pr-37602-b (3 commits: e0b4de63, c1dbc8fc, 2918cc2e; 21 files);
  • the net diff against origin/main (63 files);
  • the PR body at this head;
  • the area's delta note (the latest PR comment);
  • the check-runs on 2918cc2e: 63 success, 11 skipped (opt-in or schedule lanes), none failed or pending.

① Derived judgments

Accept-set: still unchanged. No server, spec or metadata-door code is in the delta.

Public-surface changes in the delta, each judged:

  • @object-ui/app-shell adds holdsSetupAccess and SETUP_ACCESS_CAPABILITY (views/setup/accessDirectoryRef.ts), re-exported from index.ts on the line the amendment already approved. It also adds holdsAccessDirectoryCapability (views/setup/accessDirectory.ts). Right. The package is "private": true, and the console consumes the new export (StudioRoute.tsx).
  • buildStudioMenu takes an optional setupDirectory that defaults to false. Right. Without it, package-less catalog rows keep the Studio environment-scope link, so the default is the safe one.
  • The console's bare /studio/~all/* route is now StudioAllLegAddress: Setup's page for a setup.access holder, else /studio/~all/metadata. Both branches use replace. Right.
  • In StudioMetadataArea, both the leg redirect and studioAllLegSetupRedirect are now gated on holdsSetupAccess(useStudioEntryPermissions()). Right.

Prior findings:

  • M1 — closed. AccessDirectoryPage now decides with holdsAccessDirectoryCapability(systemPermissions). That is Array.isArray(...) && includes('studio.access'), the same reading as the console's holdsStudioAccess. AccessDirectoryPage.test.tsx and accessDirectory.test.ts pin parity on each policy case the Studio gate names, with a control.
  • S1 — closed. The full-chain toEqual([from, to]) assertion is restored in both AppContent.systemHubRoutes tables and in the TO_SETUP_DIRECTORY block of AppContent.setupMetadataStudio-28578.
  • S2 — closed for the Studio side. Package-less catalog rows open Setup only for a setup.access holder. Otherwise they keep /studio/~all/metadata/TYPE?scope=environment, and the leg still serves that list for them because both ~all redirects are gated the same way. holdsSetupAccess refuses a set that was never reported, as studioEntryPermissions.ts already does. Both branches are tested in studioMenuModel, StudioMenu, StudioMetadataArea.routes-28561 and the console StudioRoute.metadataArea-28561. One remainder is graded as S3.
  • N1 — closed. The en.ts comment now names the organization's flows.
  • N2 — closed. Both doc sentences now say that only the ?scope=environment lists redirect, and only for a user who can open Setup.

New:

  • S3 (should-fix) — The changeset and the PR body now say that a user who cannot open Setup "keeps these addresses in Studio". In the changeset, "these" includes "the old Setup metadata URLs that led there". In the PR body, line "Old addresses redirect once" says the same of "Setup's old /apps/setup/metadata/... catalog addresses". That is not what the code does. setupMetadataStudioPath (views/studio-design/setupMetadataRedirect.ts) still ends in an unconditional studioAddressAfterSetupMove, and so does every host alias that goes through it (/apps/*/metadata[/TYPE?scope=environment], component/metadata/directory, system/{positions,roles,permissions}). A Studio-only principal who opens one of those old addresses now lands on a Setup page they cannot open. Before this PR, the same address landed on Studio's leg. Either gate that last step the way the ~all redirects are gated, or correct the two sentences so they name only the /studio/~all/… addresses.

② Semver level

Unchanged and right. All four packages are at patch, with Clause-②: no and Metadata-protocol: none on both the PR body and the changeset. The new exports are in @object-ui/app-shell, which is "private": true, so they are not a published widening. The changeset's text changed in c1dbc8fc; see S3.

③ Boundary flags

  • Dev flags: the delta note lists no open questions. The local runs it reports are informational, and the head's check-runs are the gate verdicts.
  • Claim surface: every file in the delta is already in the claim, its two amendments, or a test of a claimed file. The one addition is a second name on the index.ts export line the amendment approved. Accepted.
  • SQL push-down (Prime Directive 5): no data reads were added. Clear.
  • Public text: the PR body, the changeset, the commit subjects and the test names state the access rule and the parity policy cases only. Clear. The delta also removes the page's earlier docblock sentence about the gate.

Security-touching: yes — the PR moves a surface gated by studio.access and re-implements its gate in Setup. The delta makes the page's gate match the Studio entry gate it replaces, and the prior security pointer is closed.

Seat questions, delta only:

  1. Reach. The page's reading now matches the Studio gate on every policy case, so a user who could not see the directory before cannot see it now. The narrowing to setup.access holders is softened on the Studio side: a Studio-only user keeps the directory on ~all. The Setup-side legacy aliases are the exception (S3).
  2. Old addresses. /studio/~all/* and the leg's directory addresses land on Setup for a setup.access holder and stay on the leg for anyone else, in one replace hop each way. Both branches are pinned. The one-hop pins are full-chain again. Setup-side legacy aliases: see S3.
  3. Clause-② and level. Unchanged and right; see ②.
  4. i18n. No pack changed except the en.ts comment (N1). No new user-facing string was added.
  5. Claim amendments. Nothing was added outside them, beyond the second export name on the approved line.

Implemented-by: claude/project-thread-x4tuqk
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对 (delta)

Head-sha: 2918cc2e38843878b43bfe909a5fb2d3e6b32481
REWORK — L1, seat repo:objectstack#5 (short)

  1. Shape: unchanged. Not governed, security-touching. Clause-②: no at patch.
  2. Closed: M1 (the page's gate is at parity with the Studio entry gate on every case that gate covers, and is pinned), S1, S2, N1 and N2.
  3. Gates: delta record 7199669663 (TIER_DEFAULT) reads PASS, with one new should-fix. CI on this head: 0 failed.
  4. Owed before landing:
    • S3: the changeset and the PR body say a user who cannot open Setup "keeps these addresses in Studio", but setupMetadataStudioPath still ends with an unconditional studioAddressAfterSetupMove. So the legacy aliases under /apps/*/… (metadata, component/metadata/directory, system/positions|roles|permissions) still send a Studio-only user to a Setup page they cannot open. Gate that step on holdsSetupAccess, the same way as the ~all redirects, and pin both branches. The two sentences then hold as written.
  5. Accepted deviations: none new.
  6. Landing terms: after the delta, the same reviewer re-checks it, and then the area lands it.

…a user without Setup

Claude-Session: https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S
Co-authored-by: Claude <noreply@anthropic.com>
…or whoever may open Setup

Claude-Session: https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Final green head for the S3 delta (2026-11-26T18:29Z), answering the seat's REWORK 7199695339: 0471b08e86fa876c4d45deeaf3e2a76a1993811c. The card thread reports 63 success, 0 failed and mergeable clean. It is one push on top of the interim text-only head cf4cc90f (do not review that one), with no rebase.

  • S3: setupMetadataStudioPath takes setupAccess, which defaults to false. Each caller reads holdsSetupAccess(usePermissions().systemPermissions), which fails closed. The callers are SetupMetadataRoute, LegacyMetadataRedirect and the review=1 navigate in app-shell's console AppContent, plus MetadataRedirect and SystemCatalogRedirect in the console app's AppContent. That is the third claim amendment on App Studio 改版(3-2):「全部软件包」目录 ~all 搬到设置的访问分组,Studio 不再有这个入口 #37565. ObjectRedirect is untouched, because object paths never reach the directory.
  • Pins: both branches and the no-answer case are pinned in setupMetadataRedirect, setupMetadataStudio-28578, systemHubRoutes and legacyRedirects. The ablations: an unconditional branch turns 42 cases red, and a fail-open hasCapabilities read turns the non-holder and no-answer cases red.
  • The suites that mount DefaultAppContent now stub a setup.access holder. The changeset is back to the 2918cc2e wording, which is now true. The PR body names S3 and the third amendment.
  • Local checks pass: the branch's 20 test files, app-shell and console tsc, test-source-alias and nul-bytes.
  • Follow-up App Studio 改版(follow-up of 3-2):设置里旧的元数据目录别名按 setup.access 决定去设置还是留在 Studio #37657 is superseded by this push, and the area closes it when the PR lands.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 0471b08e86fa876c4d45deeaf3e2a76a1993811c
Local-runs: none

This is the second delta review, against the delta record on 2918cc2e (PASS, with S3 open). It answers the seat's REWORK 7199695339.

Inputs read:

  • the delta pr-37602-b..pr-37602-c, which is three commits (cf4cc90f, 02dcc161, 0471b08e) touching 10 files;
  • the net diff against origin/main;
  • the PR body at this head;
  • the check-runs on 0471b08e: 63 success, 11 skipped (opt-in or schedule lanes), none failed or pending.

① Derived judgments

Accept-set: still unchanged. No server, spec or metadata-door code is in the delta.

Changes in the delta, each judged:

  • setupMetadataStudioPath signature. It gains a fourth parameter, setupAccess = false, and runs studioAddressAfterSetupMove only when that is true. Right. The default keeps the environment directory's addresses on Studio's cross-package leg, which is where they landed before this PR. The function is exported from @object-ui/app-shell, a "private": true package.

  • Callers. Every caller that can reach a directory address now passes holdsSetupAccess(usePermissions().systemPermissions). Right. The callers are:

    • console MetadataRedirect and SystemCatalogRedirect;
    • app-shell SetupMetadataRoute, LegacyMetadataRedirect and DraftReviewNavigator.

    The one caller left as it was is console ObjectRedirect. It only ever builds object/... addresses, which never move, so the default is correct there.

  • The permission answer the callers read. These callers render under ConsolePermissionsScope (MePermissionsProvider). That provider holds its own loading and error fallbacks, so the callers read a loaded answer. A set that was never reported counts as none. Right.

Prior findings:

  • S3 — closed. The Setup-side legacy aliases now take the same setup.access branch as the ~all redirects. Without that capability, or with no reported set, they land on Studio's leg in one hop, as they did before this PR. With it, they land on Setup's page in one hop. Both branches and the no-answer case are pinned with full-chain assertions in four places:

    • setupMetadataRedirect.test.ts;
    • AppContent.setupMetadataStudio-28578;
    • console AppContent.systemHubRoutes;
    • console AppContent.legacyRedirects.

    The changeset sentence "A user who cannot open Setup keeps these addresses in Studio" and the PR body's "Old addresses redirect once" now match the code.

New: none.

② Semver level

Unchanged and right. All four packages are at patch. Clause-②: no and Metadata-protocol: none appear on the PR body and on the changeset. The net changeset text is the same as at 2918cc2e. The new optional parameter is in a private package, so it is not a published widening.

③ Boundary flags

  • Dev flags: none open.
  • Claim surface: every file in the delta is a file the claim already names, or a test of one. Both AppContent.tsx files are callers of setupMetadataRedirect.ts, which is in the claim, and the change in them is limited to that call. Accepted.
  • SQL push-down (Prime Directive 5): no data reads were added. Clear.
  • Public text: the PR body, the changeset, the commit subjects and the test names state the access rule and the branches only. Clear.

Security-touching: yes — the PR moves a surface gated by studio.access and re-implements its gate in Setup. This delta only narrows where the Setup-side aliases send a user who cannot open Setup, and the gate stays at parity with the Studio entry gate.

Seat questions, delta only:

  1. Reach. No change to who can see the directory. A Studio-only user now keeps every old address on Studio's leg, on both the ~all side and the Setup alias side.
  2. Old addresses. Every legacy address lands in one hop with replace, on Setup for a setup.access holder and on Studio's leg otherwise. Both branches are pinned with full-chain assertions.
  3. Clause-② and level. Unchanged and right.
  4. i18n. No pack changed in this delta.
  5. Claim amendments. Nothing was added outside the claim.

Implemented-by: claude/project-thread-x4tuqk
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对 (delta 2)

Head-sha: 0471b08e86fa876c4d45deeaf3e2a76a1993811c
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: draft against main. Not governed, under 3000 lines. Security-touching: it moves a studio.access-gated surface into Setup and rebuilds its gate there, so the seat adds security. Clause-②: no at patch.
  2. Closed: M1 (the gate is at parity with the Studio entry gate on every case that gate covers), S1, S2, N1, N2, and S3 (the Setup-side aliases go to Setup only for setup.access holders and fail closed, across all five callers). Both branches and the no-answer case are pinned in four suites.
  3. Gates: delta record 7200580409 (TIER_DEFAULT) reads PASS with no open finding. CI on this head: 0 failed.
  4. Accepted deviations: none open.
  5. Out of scope and where it went: none. The public text carries only the access rule. Main squash-merges, so earlier commit messages do not land.
  6. Landing terms: not governed, no decision owed. The area lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Adding security: this PR moves a studio.access-gated surface and rebuilds its gate in Setup (seat ACCEPT 7200590330, item 1).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Landing (area ux-37424): the seat's delta L1 is ACCEPT (7200590330) on head 0471b08e86fa876c4d45deeaf3e2a76a1993811c. The delta record 7200580409 is PASS, and every finding is closed. The PR is not governed, is under 3000 lines and owes no decision, so the area lands it with ready plus auto-merge.

landing-k --pr 37602 exits 0. PRBASE is 41babf7e64 and K = 3, under the hold at 15. No new locale pack landed under this label PR. The shared budget is clear: main moved the ui eager-closure budget, and this PR touches no book.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 18:34
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 68aa1be Nov 26, 2026
80 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-x4tuqk branch November 26, 2026 18:59
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 security size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App Studio 改版(3-2):「全部软件包」目录 ~all 搬到设置的访问分组,Studio 不再有这个入口

2 participants