Skip to content

Commit 02daeed

Browse files
committed
fix(spec): permissionForm stops teaching the Profile concept ADR-0090 D2 removed
The form's `Identity` section description — the half that ships, and ships translated — read "Permission Sets stack on top of a Profile to grant additional access. Profiles are the base set assigned 1:1 to each user." That is the model ADR-0090 D2 retired: it deleted `isProfile` from `PermissionSetSchema` (removed, not deprecated), leaving permission sets as the only capability container. The description now states the v2 model instead, in all four locales it shipped in. The same file's docstring claimed the form serves a `profile` metadata kind alongside `permission`, and carried a sentence with no subject — "The only flags are minimal (ADR-0090 D2 removed the Profile concept) so admins can see and toggle it explicitly" — that named no flag and whose `it` referred to nothing. Both are replaced with statements the tree enforces. None of the three translated leaves had a recorded source hash, so they were legacy-trusted: changing the English alone would have left three languages teaching the retired concept under a green build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
1 parent 9a89a00 commit 02daeed

6 files changed

Lines changed: 33 additions & 10 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@objectstack/spec": patch
3+
"@objectstack/platform-objects": patch
4+
---
5+
6+
`permissionForm` stops teaching the Profile concept ADR-0090 D2 removed — in the shipped section description, and in all four locales.
7+
8+
The form's `Identity` section description read *"Permission Sets stack on top of a Profile to grant additional access. Profiles are the base set assigned 1:1 to each user."* That is the model ADR-0090 D2 retired: it deleted `isProfile` from `PermissionSetSchema` (removed, not deprecated), leaving permission sets as the only capability container. The same file's docstring claimed the form serves a `profile` metadata kind alongside `permission`, and carried a half-edited sentence — *"The only flags are minimal (ADR-0090 D2 removed the Profile concept) so admins can see and toggle it explicitly"* — that named no flag and whose `it` referred to nothing.
9+
10+
The description is the half that ships, and it shipped translated: `en`, `zh-CN`, `ja-JP` and `es-ES` all carried it. None of the three translated leaves has a recorded source hash (`metadataForms.permission.*` has zero entries in any of the three `*.source-hashes.generated.ts` tables, against 158/191/191 `metadataForms.*` entries overall), so they are legacy-trusted: changing the English alone would have left three languages teaching the retired concept under a green build, with nothing reporting it stale. All four move together here.
11+
12+
- **The description now states the v2 model**: permission sets are the only capability container, a user gets the union of every set they hold so sets only ever add access, and positions distribute sets to people — the same three facts `PermissionSetSchema`'s own header states (`packages/spec/src/security/permission.zod.ts`).
13+
- **The docstring says what the tree enforces**: the form serves `permission` and only `permission`. `METADATA_FORM_REGISTRY` has no `profile` key, `MetadataTypeSchema` admits no `profile` kind, and `PermissionSetSchema` answers an authored `isProfile` or `profiles` with a retirement tombstone rather than a silent strip.
14+
- **The subjectless sentence is replaced by a true one**: the form surfaces no flag, because `isDefault` (ADR-0090 D5) is the schema's only boolean and it records a boot-time binding hint, not a grant.
15+
- **One further translated leaf moves**: the zh-CN label for the `permission` form group read `"权限集 / 配置文件"`, appending the retired concept to a source label that is plain `Permission Set` (`metadata-plugin.zod.ts`). `ja-JP` and `es-ES` already rendered the source faithfully.
16+
17+
No schema, key, registry entry or export moves — the accept set is byte-identical.

packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
14601460
sections: {
14611461
identity: {
14621462
label: "Identity",
1463-
description: "Permission Sets stack on top of a Profile to grant additional access. Profiles are the base set assigned 1:1 to each user."
1463+
description: "Permission sets are the only capability container: a user gets the union of every set they hold, so sets only ever add access. Positions distribute sets to people."
14641464
},
14651465
system_permissions: {
14661466
label: "System Permissions",

packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
14601460
sections: {
14611461
identity: {
14621462
label: "Identidad",
1463-
description: "Los conjuntos de permisos se apilan sobre un perfil para conceder acceso adicional. Los perfiles son el conjunto base asignado 1:1 a cada usuario."
1463+
description: "Los conjuntos de permisos son el único contenedor de capacidades: un usuario obtiene la unión de todos los conjuntos que tiene, así que un conjunto solo puede añadir acceso. Las posiciones distribuyen los conjuntos a las personas."
14641464
},
14651465
system_permissions: {
14661466
label: "Permisos del sistema",

packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ export const jaJPMetadataForms: NonNullable<TranslationData['metadataForms']> =
14601460
sections: {
14611461
identity: {
14621462
label: "ID",
1463-
description: "権限セットはプロファイルに追加アクセス権を重ねる。プロファイルは各ユーザーに 1:1 で割り当てる基本セット。"
1463+
description: "権限セットは唯一の能力コンテナです。ユーザーは保持するすべてのセットの和集合を得るため、セットはアクセス権を追加することしかできません。ポジションがセットを人に配分します。"
14641464
},
14651465
system_permissions: {
14661466
label: "システム権限",

packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,11 +1456,11 @@ export const zhCNMetadataForms: NonNullable<TranslationData['metadataForms']> =
14561456
description: "Documentation navigation spine — ordered groups with derived membership (ADR-0046 §6)"
14571457
},
14581458
permission: {
1459-
label: "权限集 / 配置文件",
1459+
label: "权限集",
14601460
sections: {
14611461
identity: {
14621462
label: "身份",
1463-
description: "权限集叠加在配置文件之上,用于授予额外访问权限。配置文件是按 1:1 分配给每个用户的基础权限集。"
1463+
description: "权限集是唯一的能力容器:用户获得其持有的所有权限集的并集,因此权限集只会增加访问权限。岗位负责把权限集分配给人。"
14641464
},
14651465
system_permissions: {
14661466
label: "系统权限",

packages/spec/src/security/permission.form.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ import { defineForm } from '../ui/view.zod';
55
/**
66
* PermissionSet — canonical FormView layout.
77
*
8-
* Used for both `permission` (additive permission grant bundles) and
9-
* `profile` (the base permission set assigned to every user). The only
10-
* flags are minimal (ADR-0090 D2 removed the Profile concept)
11-
* so admins can see and toggle it explicitly.
8+
* Serves the `permission` metadata kind, and only that one. There is no
9+
* Profile concept: ADR-0090 D2 removed it (`isProfile` deleted, not
10+
* deprecated), leaving permission sets as the only capability container —
11+
* union-merged and purely additive. So `METADATA_FORM_REGISTRY` has no
12+
* `profile` key, `MetadataTypeSchema` admits no `profile` kind, and
13+
* `PermissionSetSchema` answers an authored `isProfile` or `profiles` with a
14+
* retirement tombstone rather than a silent strip.
15+
*
16+
* The form surfaces no flag: `isDefault` (ADR-0090 D5) is the schema's only
17+
* boolean and it records a boot-time binding hint, not a grant.
1218
*
1319
* The object/field permission maps are intentionally kept as JSON for
1420
* now — they're typically managed via the dedicated permission matrix
@@ -21,7 +27,7 @@ export const permissionForm = defineForm({
2127
{
2228
label: 'Identity',
2329
description:
24-
'Permission Sets stack on top of a Profile to grant additional access. Profiles are the base set assigned 1:1 to each user.',
30+
'Permission sets are the only capability container: a user gets the union of every set they hold, so sets only ever add access. Positions distribute sets to people.',
2531
columns: 2,
2632
fields: [
2733
{ field: 'name', required: true, colSpan: 1, helpText: 'Machine name (snake_case)' },

0 commit comments

Comments
 (0)