Repository navigation
docs(spec): the permission set name describe and the permission sets page say one holder per namespace - #33384
Conversation
…space A permission set is identified by its package and name, so a name has one holder per namespace. The `name` describe, its generated reference row and the permission sets guide say so; positions and capabilities keep one name per deployment, and a set is still never overridden under its own name, not even from `.custom` (ADR-0146 D6). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nvMv3rqz7e8UKwxD9
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 172 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin dd9a08d9d1bf4a5aa5f37078d39a0f45e84d805b && git checkout dd9a08d9d1bf4a5aa5f37078d39a0f45e84d805b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin df9fe9463020a58b29a61f98605b91e7fbb307c1 aeb3c973e6549ffa66d66b05601f30b3af3d8cd2 && git checkout -B drift-repro df9fe9463020a58b29a61f98605b91e7fbb307c1 && git merge --no-ff aeb3c973e6549ffa66d66b05601f30b3af3d8cd2
node scripts/docs-audit/affected-docs.mjs --json df9fe9463020a58b29a61f98605b91e7fbb307c1
|
|
domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag Contract reviewServed-tier: No file in this diff implements or enforces the describe: the code it describes ( Inputs read: card #32758 body and its five comments (6837778026, 6847899833, claim 6881630925, report 6882046858, seat answers 6882071328), PR #33384 body, file list (4 files, +26 / -6) and net diff against ① Derived judgments
② Semver level
Clause-②: no — agreed. Neither a widening nor a narrowing: the text now states what #32742 ( ③ Boundary flags
④ Design judgment
Sentence by sentence against
Attempts to break it:
Findings:
No must-fix, no should-fix. The describe, its generated row and the guide state what the predicate and the two refusals on Implemented-by: VERDICT: PASS |
|
domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag ACCEPT · PR #33384 (#32758) · head
|
…p saying a permission set holds one name per deployment (objectstack-ai#33445) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XNWAtCgQojxw26B4VzapMZz)_ Fixes objectstack-ai#33388 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:安全目录覆盖迁移条目(`security-catalog-environment-overlay-refused`)的 `reason` 开头不再说「岗位、权限集、能力每个部署一个名字」,改为该条目真正的主题「环境目录和包从不共持一个名字」;ADR-0146 D6 分类依据的注释改为「安全目录不接受覆盖」;权限集指南的单持有者清单补上「环境」,「授予按名字指向权限集」改为「按包和名字」。 - 为什么改:objectstack-ai#32742 之后权限集名字按命名空间持有,原句对权限集已不成立;objectstack-ai#33384 改了 describe 和指南主段,这里收掉剩下的三处文字。 - 风险与回滚:只改说明文字和注释,不动 schema、规则、迁移条目的 id/surface/replacement 或运行时;spec patch changeset。回滚即 revert。 - 先看:`packages/spec/src/migrations/entries/semantic/18.security-catalog-environment-overlay-refused.ts` 的 `reason` 开头两行;其次 `content/docs/permissions/permission-sets.mdx` 的两处改动。 - 两分钟验证:`git grep -n "hold one name per deployment" -- packages/spec/src`,预期零命中。 - 需要你做的:无,席位落地。 ## What changes - `packages/spec/src/migrations/entries/semantic/18.security-catalog-environment-overlay-refused.ts`, `reason` only. FROM "Positions, permission sets and capabilities hold one name per deployment, and a package registering a name the environment catalog already holds was already refused on a hot install." TO "The environment catalog and a package never hold one name: a package registering a name the environment catalog already holds was already refused on a hot install." The rest of `reason` and every other field (`id`, `surface`, `replacement`, `acceptanceCriteria`) are byte-identical. - `packages/spec/src/kernel/customization-package.ts`, the `adr_0146_d6_security_catalog` line of the `OverrideClassificationBasis` doc comment. FROM "D6: one name per deployment (permission sets, positions, capabilities)" TO "D6: the security catalog takes no override (permission sets, positions, capabilities)". Comment only. - `content/docs/permissions/permission-sets.mdx` (review N4/N5 of objectstack-ai#33384, added to the card by the seat): - the one-holder list objectstack-ai#33384 added now names the environment: "…a platform package (`base`, `system`, `sys`), the environment and the platform-requested `guest_portal` keep one holder", the same list and order as the `PermissionSetSchema.name` describe; - the "One authoritative store" paragraph: FROM "a grant names its set by name (`sys_user_permission_set.permission_set`)" TO "a grant names its set by its package and name (`sys_user_permission_set.permission_set_package` and `permission_set`)", matching "each granted by its own package and name" below it and the grant object's (package, name) key. - `.changeset/33388-security-catalog-entry-reason.md`: `@objectstack/spec` patch, since the entry's `reason` ships in spec `dist` (`dist/migrations/index.{js,mjs}`) and in the generated upgrade guide. ## Why Since PR objectstack-ai#32742 a permission-set name has one holder per namespace, so "permission sets hold one name per deployment" is false in present tense. The migration entry's subject (an environment-wide row and a package never share a name) still holds, so the reason now opens with that. ADR-0146 D6's reason a permission set takes no override is unchanged, so the gloss names it instead of the old name rule. ## Tests - No behaviour changes, so no test is added and nothing is ablated. Neither old sentence is pinned: on `origin/main`, `git grep "one name per deployment"` hits `packages/spec/src` only at the two edited lines and at `permission.zod.ts:1209` (positions and capabilities, still true), and no test asserts either edited text (the test hits are refusal sentences of other types, comments and one test title; see Acceptance notes). - Projections: every projection of the entry is gitignored. After `turbo run build --filter=@objectstack/spec…`, the regenerated `packages/spec/src/migrations/registry.ts` and `packages/spec/dist/migrations/index.{js,mjs}` carry the new sentence and no longer carry the old one. Nothing to commit. - On `ab082955`: `pnpm --filter @objectstack/spec typecheck` exit 0; `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/migrations src/kernel/customization-package`: Test Files 6 passed (6), Tests 263 passed (263) (lock VERDICT command-exit 0). ## Acceptance notes Left as they are, outside this card's surface: - `packages/objectql/src/registry.ts:2818` and `:2880` (the cold-boot and hot-install refusal sentences of `SecurityCatalogNameConflictError`) still say "Positions, permission sets and capabilities each hold one name per deployment: an assignment names a position or a permission set by its bare name". The refusals stay right where they fire for a permission set (an environment item, co-owners of one namespace, a platform holder), but the stated reason no longer is, since a grant carries `permission_set_package`. Runtime text in `@objectstack/objectql`; reported to the seat. - ADR-0048's 2026-10-08 addendum, ADR-0146 D6 text (`:263`, `:472`), and test comments (`showcase-security.ts:32`, `showcase-d7-default-profile.dogfood.test.ts:65`, `protocol-boot-hydration-scoped.test.ts:217`) and the `served-override.test.ts:70` test title: decision records and comments, not touched. - Released `packages/spec/CHANGELOG.md` entries carry the old sentence: release-owned, not touched. ## Verification On `ab082955`: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 103 commands, run one by one with `timeout 900`, each exit code captured before any pipe. - 101 exited 0 in the loop. - `pnpm --filter @objectstack/spec run check:skill-examples` exited 3 in the loop (PREREQUISITE NOT MET: `packages/client-react/dist` held no declarations). After building the client and client-react closures it exited 0 ("344 prose examples type-check across 3 surface(s)"). - `pnpm check:dual-build-cjs-loads` exited 3 (PREREQUISITE NOT MET: it needs every package's `dist`; only the spec, lint, objectql, client and client-react closures were built), so it is NOT MEASURED here and left to CI. - `--ran` reconciliation: "103 derived famil(ies) accounted for — 102 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)". - Also run: `pnpm --filter @objectstack/spec check:generated` exited 1 only because `check:test-typecheck`'s `tsc -p` died "without diagnostics" under load; `check:test-typecheck` alone then exited 0 (52 files / 240 errors / 131 pinned signatures held). The other 13 artifacts read up to date, so nothing checked in moves. `node scripts/check-nul-bytes.mjs` exit 0. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran; `pnpm lint` is CI's run, not run locally.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed (none checked in moves; see Verification). - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [ ] The *Before Submitting* list in CONTRIBUTING.md is done. (Left to the seat's review.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5prrsuzKUWCmEzwMEb Co-authored-by: Claude <noreply@anthropic.com>
…ission set holds one name per namespace (objectstack-ai#33463) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDZYUbJbnXUTqZoZ56k4czR)_ Fixes objectstack-ai#33389 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`SecurityCatalogNameConflictError` 的两段报错文字(热安装与冷启动)不再说「岗位、权限集、能力每个部署一个名字」,改成「岗位和能力每个部署一个名字,权限集每个命名空间一个持有者」,并列出仍只有一个持有者的情形;措辞与 objectstack-ai#33384 落地的 describe 一致。 - 为什么改:objectstack-ai#32742 之后权限集按 (包, 名字) 识别,两个不同命名空间的包可以各持有同名权限集,旧句子从那时起就是错的;拒绝本身一直只在 `permissionSetHoldersMeet` 判定相遇时触发,没有错。 - 风险与回滚:只改报错文字和一段代码注释,不动规则、错误码(`NAMESPACE_CONFLICT`)或状态码(422);`@objectstack/objectql` patch changeset。回滚即 revert。 - 先看:`packages/objectql/src/registry.ts` 新增的 `SECURITY_CATALOG_NAME_RULE` 常量,以及它在 `coldBootConflictMessage` 与 `SecurityCatalogNameConflictError` 构造函数里的两处引用。 - 两分钟验证:`grep -n "A permission set holds one name per" packages/objectql/src/registry.ts`,预期恰命中常量一行;`grep -n "Positions, permission sets and capabilities each" packages/objectql/src/registry.ts` 预期零命中。 - 需要你做的:无,席位落地。 ## What changes - `packages/objectql/src/registry.ts`: - New module constant `SECURITY_CATALOG_NAME_RULE`, the one rule sentence both wordings of `SecurityCatalogNameConflictError` state: "Positions and capabilities each hold one name per deployment. A permission set holds one name per namespace: packages of two namespaces may each hold a set of one name, while two packages of one namespace, a package with no namespace, a platform package (`base`, `system`, `sys`), the environment and the platform-requested `guest_portal` share one set of it." This is the holder list of the permission set `name` describe that objectstack-ai#33384 landed (`packages/spec/src/security/permission.zod.ts`), in the same words. - `coldBootConflictMessage` (the cold-boot refusal): FROM "Positions, permission sets and capabilities each hold one name per deployment: an assignment names a position or a permission set by its bare name, so with two holders the environment's stored item would be served in place of the package's definition." TO the rule sentence, then "Under that rule the environment's item and the package's share one definition of the name, so with two holders the environment's stored item would be served in place of the package's definition." - The hot-install message in the `SecurityCatalogNameConflictError` constructor: FROM "Positions, permission sets and capabilities each hold one name per deployment: an assignment names a position or a permission set by its bare name, with no package to tell two definitions apart, so with two holders which definition grants would depend on registration order." TO the rule sentence, then "Under that rule PACKAGE and each holder named here share one definition of the name, with nothing to tell two definitions of it apart, so with two holders which definition grants would depend on registration order." - The comment in `SchemaRegistry.registerItem` that explains why the three security catalog types are refused ("an assignment names a position or a permission set with no package context") now says a position or a capability is named with no package context and a permission set's name has one holder per namespace (ADR-0150 D2/D9, `permissionSetHoldersMeet`). - `.changeset/33389-security-catalog-conflict-text.md`: `@objectstack/objectql` patch. No rule changes. The doors, `permissionSetHoldersMeet` and the envelope (`NAMESPACE_CONFLICT`, `422`) are untouched; the head and the remedy of each message are unchanged. ## Tests No test pinned the old sentence: `git grep` on `0c2aeb9643` for "Positions, permission sets and capabilities", "assignment names a", "no package to tell" and "served in place of the package" found only `registry.ts` itself, a docs page, an ADR, a migration entry and comments (listed under Acceptance notes); no assertion in objectql, runtime, plugin-security, cloud-connection, metadata-protocol or dogfood reads either sentence. No new pin is added: the refusal prose has no consumer that parses it, and the existing suites already assert the envelope (`code` and `status`) and the holders. Local readings at `2a6c935f7e`, under `os-verify-lock`: - objectql build closure, then `vitest run` on `registry-security-catalog-namespace`, `protocol-permission-set-name-registry-reading`, `registry-security-catalog-names-held-by`, `manifest-service-residual-security-seal` and `environment-overlay-five-types`: 5 files, 103 tests passed. objectql typecheck, including `check:test-typecheck`: OK. - `protocol-boot-hydration-scoped`, `package-scoped-exact-qualifier` and `registry-namespace-install-gate`: 3 files, 314 tests passed. - eslint `--no-inline-config` on `registry.ts`: exit 0. ## Acceptance notes Other places that say a permission set holds one name per deployment, read on `0c2aeb9643` and left alone, each for the reason given: - `packages/metadata-protocol/src/protocol-save-door-refusals.ts` (the save door's `Security catalog name conflict` refusal): already says "A permission set holds one name per namespace" with the same holder list. Nothing to change. - `packages/spec/src/migrations/entries/semantic/18.security-catalog-environment-overlay-refused.ts` (`reason`: "Positions, permission sets and capabilities hold one name per deployment"): an ADR-0087 migration entry describing a v18 change, in `packages/spec`, outside this lane. objectstack-ai#33384 raised it as an open question. - `packages/spec/src/kernel/customization-package.ts:252` (the `adr_0146_d6_security_catalog` basis): describes ADR-0146 D6 as written. - `packages/objectql/src/security-catalog-namespace.ts` module header: its first section states the original rule and its own "The narrowing: a permission set is one name per namespace" section already states the ADR-0150 narrowing. - Test comments, not assertions: `packages/objectql/src/protocol-boot-hydration-scoped.test.ts:217`, `packages/qa/dogfood/test/showcase-security.ts:32`, `packages/qa/dogfood/test/showcase-d7-default-profile.dogfood.test.ts:65`. - `content/docs/permissions/delegated-administration.mdx:69` ("an assignment names a position or set, and the gate resolves the name in the security catalog"): a description of the delegated-admin gate, not of the holder rule. - Decision records (ADR-0048 addendum, ADR-0131, ADR-0146 D6): not touched. ## Verification Derived gates at `2a6c935f7e`: `dispatch-gates --commands` gave 65 families. 64 exited 0. `check:dual-build-cjs-loads` exited 3, a prerequisite not met because only the objectql closure was built, so it is NOT MEASURED; CI Build Core covers it. `dispatch-gates --ran` reconciles 65 of 65. The CI check-runs on this pull are the authority for every gate family. --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw)_ <!-- signed: domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw --> Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #32758
Clause-②: no
Metadata-protocol: none
维护者速读
name字段的 describe 不再说「在环境的安全目录里唯一」,改成「权限集按 (包, 名字) 识别,每个命名空间一个持有者」;参考文档那一行重新生成;权限集指南里「权限集、岗位、能力每个部署一个名字」改成权限集按命名空间、岗位和能力仍按部署。skills/objectstack-platform/SKILL.md已经按 (包, 名字) 讲,没有改。packages/spec/src/security/permission.zod.ts里name的 describe;其次content/docs/permissions/permission-sets.mdx改动的那一段。grep -n "one holder per namespace" content/docs/references/security/permission.mdx,预期name行命中一次,且与permission.zod.ts的 describe 逐字一致。What changes
packages/spec/src/security/permission.zod.ts: thenamedescribe()and its JSDoc line. FROM "Permission set name, unique within the security catalog the environment serves (lowercase snake_case)" TO "Permission set name (lowercase snake_case). A set is identified by its package and name: a name has one holder per namespace, so packages of two namespaces may each hold a set of one name, while two packages of one namespace, a package with no namespace, a platform package (base, system, sys), the environment and the platform-requested guest_portal share one set of it". The holder list is the one feat(core, objectql, metadata, metadata-protocol, plugin-security): a permission-set name is held once per namespace, judged by one predicate (ADR-0150 child B) #32742's save-door sentence andpermissionSetHoldersMeet(@objectstack/core) state. The//comment above the field gains one line pointing at ADR-0150 D2/D9 and that predicate.SnakeCaseIdentifierSchemaand the field are unchanged.content/docs/references/security/permission.mdx: the generatednamerow, regenerated (pnpm gen:schema && pnpm gen:docsinpackages/spec). No other generated file carries the string;json-schema/is untracked build output.content/docs/permissions/permission-sets.mdx(the "set shipped in code cannot be edited" bullet): FROM "A set is never overridden under its own name, not even from.custom: permission sets, positions and capabilities hold one name per deployment (ADR-0146 D6)." TO: the set is still never overridden under its own name, now for the reason that holds (a permission set takes no override, ADR-0146 D6, and a set of the shipped set's name saved into the pair is refused403 NOT_OVERRIDABLE); a permission set is identified by its package and name (ADR-0150 D2), one holder per namespace, with the one-holder cases listed; positions and capabilities keep one name per deployment..changeset/32758-permission-set-name-describe.md:@objectstack/specpatch, since the describe ships in specdist.Why
PR #32742 (merged 2026-11-12,
5defbfeb) made a permission-set name one holder per namespace: two packages of two namespaces may each hold a set of one name, judged bypermissionSetHoldersMeet. Both texts still said one name per deployment.The
.customsentence, measured against #32742. The order asked whether "a set is never overridden under its own name, not even from.custom" is still true. The pair's namespace isNAMESPACE_custom(the base's namespace plus_custom), a different namespace from its base, so the name rule alone would admit a second set there. A probe on this head (the real protocol over the realObjectQLengine and an in-memory driver, the harness ofprotocol-custom-override-bare-slot-envelope.test.ts; basecom.example.showcase, namespaceshowcase, shippingshowcase_reader; pair created byensureCustomizationPackage, namespaceshowcase_custom) answered:showcase_readerinto the pair, nooverrides403 NOT_OVERRIDABLE("provided by a managed package and is sealed against in-place edits. Clone it under a new name…")overrides: { package: BASE, basedOn: '1.0.0' }403 NOT_OVERRIDABLE("a permission takes no override (ADR-0146 D6)…")403 NOT_OVERRIDABLE(sealed)403 ITEM_LOCKEDAfter the refused pair save, the base's set still read "Shipped label". So the point stays true and is kept; only its reason changed. The probe was a scratch file, deleted before the commit.
Tests
git greponorigin/main: only the source, the generated row and released CHANGELOGs).854b36e4:pnpm --filter @objectstack/spec typecheckexit 0;pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/security/permission: Test Files 4 passed (4), Tests 164 passed (164).Acceptance notes
Outside this card's surface, present-tense "one name per deployment" for permission sets remains in:
packages/spec/src/migrations/entries/semantic/18.security-catalog-environment-overlay-refused.ts(reason: "Positions, permission sets and capabilities hold one name per deployment"). A migration entry's text, left alone per the order; in the report'sopen_questions.packages/spec/src/kernel/customization-package.ts:251-252(theadr_0146_d6_security_catalogbasis: "D6: one name per deployment (permission sets, positions, capabilities)"). It describes ADR-0146 D6's basis as written; inopen_questions.packages/objectql/src/registry.ts:2818and:2880(the boot and hot-install refusal sentences for an environment item against a package holder). The environment still meets every holder, so the refusal stays right, but its reason says an assignment names a permission set by its bare name.packages/spec/src/contracts/security-service.ts:419(PlatformBaselineSetContribution.name, "unique in the security catalog"). A platform-baseline set lives in a platform namespace, which keeps one holder, so this stays true for what it describes.showcase-security.ts:32/showcase-d7-default-profile.dogfood.test.ts:65: decision records and test comments, not touched.skills/objectstack-platform/SKILL.md:125already teaches that permission sets "are identified by package and name", and:129that a permission set is never overridden; no skills change.Verification
On
854b36e4:node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 103 commands. 102 exit 0.pnpm --filter @objectstack/spec run check:generatedexited 1 in the loop becausecheck:test-typecheck'stsc -pdied without diagnostics while other gates ran beside it; run alone after the loop it exited 0 ("All 14 generated artifacts are up to date").pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: it needs every package'sdist; only the spec, lint, objectql and client closures were built), so it is NOT MEASURED here and left to CI.--ranreconciliation: "103 derived famil(ies) accounted for — 102 run, 1 NOT-MEASURED".node scripts/check-nul-bytes.mjsexit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5nvMv3rqz7e8UKwxD9