Repository navigation
Commit b392ff7
docs(spec): the security-catalog migration entry and the D6 gloss stop saying a permission set holds one name per deployment (#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 #33388
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:安全目录覆盖迁移条目(`security-catalog-environment-overlay-refused`)的
`reason` 开头不再说「岗位、权限集、能力每个部署一个名字」,改为该条目真正的主题「环境目录和包从不共持一个名字」;ADR-0146 D6
分类依据的注释改为「安全目录不接受覆盖」;权限集指南的单持有者清单补上「环境」,「授予按名字指向权限集」改为「按包和名字」。
- 为什么改:#32742 之后权限集名字按命名空间持有,原句对权限集已不成立;#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
#33384, added to the card by the seat):
- the one-holder list #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 #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>1 parent 0e9ff94 commit b392ff7
4 files changed
Lines changed: 18 additions & 7 deletions
File tree
- .changeset
- content/docs/permissions
- packages/spec/src
- kernel
- migrations/entries/semantic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
| 425 | + | |
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| |||
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
444 | | - | |
| 445 | + | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
0 commit comments