Skip to content

Commit 54aa39a

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-23746-approval-request-raw-json
2 parents e467806 + 43567a8 commit 54aa39a

9 files changed

Lines changed: 113 additions & 85 deletions
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
Clause-②: no
7+
8+
The `description` of four metadata types in `DEFAULT_METADATA_TYPE_REGISTRY`, which Setup shows under the
9+
type's title, is now one plain sentence for an administrator instead of ADR vocabulary:
10+
11+
- `api`: "A stable HTTP URL that other systems call to run a flow or work with records in the app"
12+
- `doc`: "A help page written in Markdown that a package ships or you write yourself"
13+
- `book`: "A table of contents that groups help pages into ordered sections"
14+
- `capability`: "A permission a package defines; you grant it through permission sets"
15+
16+
The ADR references (ADR-0121, ADR-0046, ADR-0046 §6, ADR-0066 D1) moved to the comments beside the
17+
registry rows. The generated metadata-forms translations carry the new sentences in en, zh-CN, ja-JP
18+
and es-ES. No key, type or accept/refuse result changes.

‎packages/platform-objects/src/apps/translations/bare-type-display-echo-decisions.test.ts‎

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
// makes one of them false reds this file — round 6 raised the bar from
133133
// "checked" to "pinned" and this round keeps it there.
134134
//
135+
// ⚠️ Since rewritten (#23808): the `api`, `doc`, `book` and `capability`
136+
// descriptions are now plain admin copy, with their ADR vocabulary moved to the
137+
// comments beside the registry rows. "pipeline" and "ordered groups" no longer
138+
// appear in that prose; their schema readings stay pinned below because they
139+
// are still true, and the four rows record the new renderings.
140+
//
135141
// ## ⭐ THE SAME ENGLISH STEM IN THREE POSITIONS, DECIDED TWO WAYS
136142
//
137143
// `capability.label` is the third position in this catalog for the word round 6
@@ -306,10 +312,10 @@ const DECISIONS: readonly Decision[] = [
306312
scope: 'type',
307313
key: 'api',
308314
prop: 'description',
309-
en: 'Declarative HTTP endpoint — a stable URL and policy layer over an existing pipeline (ADR-0121)',
315+
en: 'A stable HTTP URL that other systems call to run a flow or work with records in the app',
310316
verdict: ALL_TRANSLATE,
311317
reason:
312-
'⭐ "pipeline" READS LIKE AN ApiEndpointSchema.type AND IS NOT ONE — asserted below: the schema accepts type "proxy" and refuses type "pipeline" (flow/script/object_operation/proxy), so the word is prose and is rendered 管道 / パイプライン / pipeline. "policy" takes the sense this catalog already separates and round 6 recorded: 策略 for a configured strategy (hook.fields.retryPolicy.label 重试策略), NOT 政策 which is reserved for a published document (sys_oauth_application.fields.policy.label 隐私政策); ja ポリシー, es política. "layer" takes sys_view_definition.description (软件包层 / パッケージレイヤー / La capa de paquete) — ⚠️ zh renders it 层 and ja レイヤー there, but this leaf\'s ja reads 層 in the compound ポリシー層 because the twin\'s レイヤー is itself attached to a katakana head; the reading is recorded rather than silently harmonised. ⭐ `HTTP`, `URL` and `ADR-0121` are KEPT VERBATIM in all three — machine tokens by the rule that kept 256 and N in round 6, asserted by the token guard below. ⚠️ em-dash convention copied: zh folds to —— with no spaces (hook.sections.legacy_handler.description 函数名引用——已废弃), ja and es keep a spaced —.',
318+
'REWRITTEN AS PLAIN ADMIN COPY: the registry description is what Setup shows, so it says what the item is and who uses it, and the ADR-0121 vocabulary (declarative endpoint, policy layer, pipeline) moved to the comment beside the registry row. It names only what EXECUTES: ApiEndpointSchema.type says only `flow` and `object_operation` run, while `script` and `proxy` are rejected at publish, so "run a flow or work with records" is the whole servable set in an admin\'s words. "records" takes the catalog\'s record noun (记录 / レコード / registros). ⇒ 其他系统调用的稳定 HTTP URL,用于运行流程或操作应用中的记录 / 他のシステムが呼び出す固定の HTTP URL。フローを実行したり、アプリのレコードを操作したりします / URL HTTP estable a la que llaman otros sistemas para ejecutar un flujo o trabajar con los registros de la aplicación. ⭐ `HTTP` and `URL` stay machine tokens in all three, asserted by the token guard below. ⚠️ No second person in zh/ja/es: the catalog carries no 你的/您的.',
313319
},
314320
{
315321
scope: 'type',
@@ -324,10 +330,10 @@ const DECISIONS: readonly Decision[] = [
324330
scope: 'type',
325331
key: 'doc',
326332
prop: 'description',
327-
en: 'Package documentation — flat Markdown items (ADR-0046)',
333+
en: 'A help page written in Markdown that a package ships or you write yourself',
328334
verdict: ALL_TRANSLATE,
329335
reason:
330-
'⭐⭐ ONE OF THE TWO ROWS WHERE THE #19430 NEAR-MISS IS REAL. `package` IS a legal MetadataProvenanceSchema value and DocSchema really does accept `_provenance: "package"` while refusing a rendered one — both asserted below, so the trap is proved to exist before it is cleared. It is CLEARED three ways, each asserted: the key is `_provenance`, which the loader sets and no form asks for (a doc parses without it, and the whole en metadata-forms catalog names no `_`-prefixed key); `doc` is BARE, so this string labels no input at all; and where this catalog DOES render a leaf whose stored value is literally `package` it renders the display and keeps the value (sys_metadata.fields.managed_by.options.package is 包 / パッケージ / Paquete). ⇒ rendered. "flat" takes position.sections.position.description (扁平的 / フラットな / plano); "items" takes app.sections.navigation.description (侧边栏菜单项 / サイドバー項目 / Elementos de barra lateral). ⇒ 软件包文档——扁平的 Markdown 文档项(ADR-0046) / パッケージのドキュメント — フラットな Markdown 項目(ADR-0046) / Documentación del paquete — elementos Markdown planos (ADR-0046). ⚠️ zh answers "package" two ways in this catalog — 包 inside compounds (包 ID, 包版本) and 软件包 in running prose (软件包层) — and this is prose, so it takes 软件包. ⭐ `Markdown` is KEPT as a format proper noun in all three, the same treatment the catalog gives HTML in sys_email_template.fields.body_text.help; asserted by the token guard.',
336+
'REWRITTEN AS PLAIN ADMIN COPY: "flat Markdown items (ADR-0046)" became what an admin meets, a help page, and the ADR reference moved to the comment beside the registry row. Both origins are named because the registry row is `allowRuntimeCreate: true`: a doc can be shipped by a package or drafted in place through saveMetaItem. `package` is still rendered as the noun, by the near-miss clearing asserted below (zh prose takes 软件包). zh/ja/es carry the second origin impersonally (自行编写 / 自分で作成 / redactada directamente). ⇒ 以 Markdown 编写的帮助页面,可由软件包随附,也可自行编写 / Markdown で書かれたヘルプページ。パッケージに同梱されるほか、自分で作成することもできます / Página de ayuda en Markdown, incluida en un paquete o redactada directamente. ⭐ `Markdown` is KEPT as a format proper noun in all three; asserted by the token guard.',
331337
},
332338
{
333339
scope: 'type',
@@ -342,10 +348,10 @@ const DECISIONS: readonly Decision[] = [
342348
scope: 'type',
343349
key: 'book',
344350
prop: 'description',
345-
en: 'Documentation navigation spine — ordered groups with derived membership (ADR-0046 §6)',
351+
en: 'A table of contents that groups help pages into ordered sections',
346352
verdict: ALL_TRANSLATE,
347353
reason:
348-
'`groups` IS A KEY, NOT AN ENUM VALUE — asserted below by the rule round 6 used to clear timeoutMs: BookSchema.groups takes an ARRAY (it refuses the string "ordered"), so no rendered word can land in it. "navigation" takes app.sections.navigation.label (导航 / ナビゲーション / Navegación); "ordered" takes report.fields.order.label (排序 / 並び順 / Orden); "derived" takes dataset.fields.measures.derived.label (派生自 / 派生元 / Derivada de). "spine" and "membership" have no authored twin and the row says so: spine is rendered 主干 / 骨格 / Columna vertebral and membership 成员 / メンバーシップ / pertenencia. ⇒ 文档导航主干——有序分组,成员由派生确定(ADR-0046 §6) / ドキュメントナビゲーションの骨格 — 順序付きグループと派生されたメンバーシップ(ADR-0046 §6) / Columna vertebral de navegación de la documentación — grupos ordenados con pertenencia derivada (ADR-0046 §6). ⭐ `ADR-0046` AND `§6` are both kept verbatim — the section mark is part of the citation and is asserted as its own token, because dropping it is the kind of loss no census can see.',
354+
'REWRITTEN AS PLAIN ADMIN COPY: "navigation spine — ordered groups with derived membership (ADR-0046 §6)" became a table of contents, and the ADR-0046 §6 vocabulary moved to the comment beside the registry row. No package clause: the row is `allowRuntimeCreate: true` and a brand-new book can be authored in place. "help pages" is the doc row\'s own phrase, so the two types read as a pair in every locale. "sections" is prose, not BookSchema.groups (a key that takes an array, asserted below). ⇒ 将帮助页面按顺序分节组织的目录 / ヘルプページを順序付きのセクションにまとめた目次 / Índice que organiza las páginas de ayuda en secciones ordenadas. No machine token is kept: the ADR citation and its §6 are exactly what this rewrite removed, asserted by the plain-copy guard below.',
349355
},
350356
{
351357
scope: 'type',
@@ -360,10 +366,10 @@ const DECISIONS: readonly Decision[] = [
360366
scope: 'type',
361367
key: 'capability',
362368
prop: 'description',
363-
en: 'Package-declared authorization capability — the DEFINITION side of ADR-0066 D1 (grants live on permission sets; requirements on resources)',
369+
en: 'A permission a package defines; you grant it through permission sets',
364370
verdict: ALL_TRANSLATE,
365371
reason:
366-
'THE SECOND REAL `package` NEAR-MISS, cleared exactly as the doc row above and asserted separately on CapabilityDeclarationSchema rather than inherited — the two schemas splice the same protection mixin but that is a fact to assert, not to assume. ⭐ The clause "grants live on permission sets" has a STRUCTURAL authored twin one panel away: position.sections.position.description renders "Capability lives on permission sets" as 能力在权限集上 / 能力は権限セットに / La capacidad reside en los permission sets, and this row copies the frame while substituting 授予 / 付与 / las concesiones for "grants". "authorization" takes sys_oauth_application._actions.enable_oauth_application.description (授权 / 認可 / la autorización) — ⚠️ ja answers this word two ways and the row picks deliberately: 認可 (authz, that leaf) over 認証 (authn, sys_device_code.description), because ADR-0066 is about what a principal MAY do. "resources" takes sys_organization._actions.leave_organization.confirmText (资源 / リソース / recursos). ⇒ 软件包声明的授权能力——ADR-0066 D1 的定义侧(授予在权限集上;要求在资源上) / パッケージが宣言する認可ケイパビリティ — ADR-0066 D1 の定義側(付与は権限セットに、要件はリソースに) / Capacidad de autorización declarada por el paquete — el lado de la DEFINICIÓN de ADR-0066 D1 (las concesiones residen en los conjuntos de permisos; los requisitos, en los recursos). ⚠️ es answers "permission sets" two ways — conjuntos de permisos (permission.sections.identity.description) and the English permission sets (position.sections.position.description) — and this row takes the Spanish one, because the leaf it is describing IS the permission domain\'s own definition side. ⭐ `ADR-0066` and `D1` are kept verbatim and asserted; the en\'s uppercase DEFINITION is carried as case in es and as plain text in zh/ja, which have no case to carry it with.',
372+
'REWRITTEN AS PLAIN ADMIN COPY, in the voice the Setup review gave verbatim for this type. "the DEFINITION side of ADR-0066 D1" moved to the comment beside the registry row. "permission sets" takes the type label permission.label (权限集 / 権限セット / Conjunto de permisos, plural conjuntos de permisos); "grant" takes 授予 / 付与 / conceder, the verbs this catalog already uses for permission grants. zh/ja/es use an impersonal second clause, since the catalog carries no second person. ⇒ 软件包定义的一项权限;通过权限集授予 / パッケージが定義する権限。権限セットを通じて付与します / Permiso que define un paquete; se concede mediante conjuntos de permisos. No machine token is kept: ADR-0066 and D1 are exactly what this rewrite removed, asserted by the plain-copy guard below.',
367373
},
368374
];
369375

@@ -659,10 +665,8 @@ describe('#19403 round 7 — the #19430 discipline, asserted AT THE SCHEMA', ()
659665
it('the machine tokens the ledger decided to KEEP are still verbatim in every locale', () => {
660666
const KEPT: ReadonlyArray<readonly [string, 'label' | 'description', readonly string[]]> = [
661667
['api', 'label', ['API']],
662-
['api', 'description', ['HTTP', 'URL', 'ADR-0121']],
663-
['doc', 'description', ['Markdown', 'ADR-0046']],
664-
['book', 'description', ['ADR-0046', '§6']],
665-
['capability', 'description', ['ADR-0066', 'D1']],
668+
['api', 'description', ['HTTP', 'URL']],
669+
['doc', 'description', ['Markdown']],
666670
];
667671
for (const [type, prop, tokens] of KEPT) {
668672
for (const [locale, forms] of TRANSLATED_LOCALES) {
@@ -677,18 +681,39 @@ describe('#19403 round 7 — the #19430 discipline, asserted AT THE SCHEMA', ()
677681

678682
it('⭐ the token predicate can say NO — and a bare `includes` could not', () => {
679683
// Dark. Without this the assertion above could be a guard that is true of
680-
// every string. `§6` must not be found as `§7`, and `D1` must not be found
681-
// inside `ADR-0121`'s digits.
682-
const zhBook = (zhCNMetadataForms as Record<string, any>).book.description as string;
683-
expect(carriesToken(zhBook, '§6')).toBe(true);
684-
expect(carriesToken(zhBook, '§7')).toBe(false);
684+
// every string. `Markdown` must not be found as `Mark`, and `URL` must not
685+
// be found as `UR`.
686+
const jaDoc = (jaJPMetadataForms as Record<string, any>).doc.description as string;
687+
expect(carriesToken(jaDoc, 'Markdown')).toBe(true);
688+
expect(jaDoc.includes('Mark'), 'substring containment says YES').toBe(true);
689+
expect(carriesToken(jaDoc, 'Mark'), 'the word-boundary predicate says NO').toBe(false);
685690
const zhApi = (zhCNMetadataForms as Record<string, any>).api.description as string;
686691
expect(zhApi.includes('D1'), 'substring says nothing here').toBe(false);
687-
expect(carriesToken(zhApi, 'ADR-0121')).toBe(true);
688-
expect(carriesToken(zhApi, 'ADR-012')).toBe(false);
692+
expect(carriesToken(zhApi, 'HTTP')).toBe(true);
693+
expect(carriesToken(zhApi, 'HTT')).toBe(false);
689694
expect(carriesToken(zhApi, 'URL')).toBe(true);
690695
expect(carriesToken(zhApi, 'UR')).toBe(false);
691696
});
697+
698+
it('the four descriptions Setup shows are plain copy — no ADR vocabulary in any locale', () => {
699+
// The admin-facing half of the registry rows: ADR numbers, decision ids,
700+
// finding ids, `emit()` and `kernel` live in the comments beside the rows,
701+
// never in the string Setup renders. Checked in `en` AND every translated
702+
// locale, because a translation made from the old source would carry them.
703+
const ADR_VOCABULARY = /ADR-|\bD\d|finding F|emit\(\)|kernel|§/;
704+
const PLAIN = ['api', 'doc', 'book', 'capability'];
705+
for (const type of PLAIN) {
706+
expect(registryEntry(type)?.description, `registry ${type}.description`).not.toMatch(ADR_VOCABULARY);
707+
for (const [locale, forms] of [['en', enMetadataForms], ...TRANSLATED_LOCALES] as const) {
708+
const text = (forms as Record<string, any>)[type]?.description as string;
709+
expect(typeof text, `${locale} ${type}.description`).toBe('string');
710+
expect(text, `${locale} ${type}.description`).not.toMatch(ADR_VOCABULARY);
711+
}
712+
}
713+
// Dark: the same pattern fires on the prose this rewrite replaced.
714+
expect('Documentation navigation spine (ADR-0046 §6)').toMatch(ADR_VOCABULARY);
715+
expect('the DEFINITION side of ADR-0066 D1').toMatch(ADR_VOCABULARY);
716+
});
692717
});
693718

694719
describe('#19403 round 7 — the provenance table agrees these leaves are now authored', () => {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,7 +2202,7 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
22022202
},
22032203
api: {
22042204
label: "API Endpoint",
2205-
description: "Declarative HTTP endpoint — a stable URL and policy layer over an existing pipeline (ADR-0121)"
2205+
description: "A stable HTTP URL that other systems call to run a flow or work with records in the app"
22062206
},
22072207
translation: {
22082208
label: "Translation"
@@ -2282,11 +2282,11 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
22822282
},
22832283
doc: {
22842284
label: "Documentation",
2285-
description: "Package documentation — flat Markdown items (ADR-0046)"
2285+
description: "A help page written in Markdown that a package ships or you write yourself"
22862286
},
22872287
book: {
22882288
label: "Documentation Book",
2289-
description: "Documentation navigation spine — ordered groups with derived membership (ADR-0046 §6)"
2289+
description: "A table of contents that groups help pages into ordered sections"
22902290
},
22912291
permission: {
22922292
label: "Permission Set",
@@ -2390,7 +2390,7 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
23902390
},
23912391
capability: {
23922392
label: "Capability",
2393-
description: "Package-declared authorization capability — the DEFINITION side of ADR-0066 D1 (grants live on permission sets; requirements on resources)"
2393+
description: "A permission a package defines; you grant it through permission sets"
23942394
},
23952395
agent: {
23962396
label: "AI Agent",

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,7 +2202,7 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
22022202
},
22032203
api: {
22042204
label: "Endpoint API",
2205-
description: "Endpoint HTTP declarativo — una URL estable y una capa de política sobre un pipeline existente (ADR-0121)"
2205+
description: "URL HTTP estable a la que llaman otros sistemas para ejecutar un flujo o trabajar con los registros de la aplicación"
22062206
},
22072207
translation: {
22082208
label: "Traducción"
@@ -2282,11 +2282,11 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
22822282
},
22832283
doc: {
22842284
label: "Documentación",
2285-
description: "Documentación del paquete — elementos Markdown planos (ADR-0046)"
2285+
description: "Página de ayuda en Markdown, incluida en un paquete o redactada directamente"
22862286
},
22872287
book: {
22882288
label: "Libro de documentación",
2289-
description: "Columna vertebral de navegación de la documentación — grupos ordenados con pertenencia derivada (ADR-0046 §6)"
2289+
description: "Índice que organiza las páginas de ayuda en secciones ordenadas"
22902290
},
22912291
permission: {
22922292
label: "Conjunto de permisos",
@@ -2390,7 +2390,7 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
23902390
},
23912391
capability: {
23922392
label: "Capacidad",
2393-
description: "Capacidad de autorización declarada por el paquete — el lado de la DEFINICIÓN de ADR-0066 D1 (las concesiones residen en los conjuntos de permisos; los requisitos, en los recursos)"
2393+
description: "Permiso que define un paquete; se concede mediante conjuntos de permisos"
23942394
},
23952395
agent: {
23962396
label: "Agente de IA",

0 commit comments

Comments
 (0)