diff --git a/.changeset/28855-object-extension-registry-comment.md b/.changeset/28855-object-extension-registry-comment.md new file mode 100644 index 00000000000..d1b7d577159 --- /dev/null +++ b/.changeset/28855-object-extension-registry-comment.md @@ -0,0 +1,10 @@ +--- +'@objectstack/spec': patch +--- + +docs(spec): the `object_extension` registry row's comment now says what happens to a code package's `objectExtensions` + +Clause-②: no +Metadata-protocol: none + +The `//` comment above the `object_extension` row of `DEFAULT_METADATA_TYPE_REGISTRY` (`src/kernel/metadata-plugin.zod.ts`, which ships in the package) said the artifact loader stores a code package's `objectExtensions` under this type. It does not: the ObjectQL engine's `registerApp` registers each extension as an `'extend'` contributor of its target object, and the artifact loader files no item from that collection because an extension carries `extend` and no `name`. The comment now says so, and that this type's items are the stored rows the `/api/v1/meta` doors write. Comment only: no key, row field or schema changes. diff --git a/packages/spec/src/kernel/metadata-plugin.zod.ts b/packages/spec/src/kernel/metadata-plugin.zod.ts index fe888e6be29..bf890d60745 100644 --- a/packages/spec/src/kernel/metadata-plugin.zod.ts +++ b/packages/spec/src/kernel/metadata-plugin.zod.ts @@ -817,8 +817,12 @@ export const DEFAULT_METADATA_TYPE_REGISTRY: MetadataTypeRegistryEntryParsed[] = // `filePatterns`: the `*.extension.ts` convention a code package's // `defineObjectExtension` files follow (`examples/app-showcase/src/data/ // extensions/`). A code package declares its extensions in - // `objectExtensions`, which the artifact loader already stores under this - // type name. `supportsOverlay` / + // `objectExtensions`, and they are never stored as items of this type: the + // ObjectQL engine's `registerApp` registers each one as an `'extend'` + // contributor of its target object. The artifact loader maps that collection + // to this type name but files no item from it, because an extension carries + // `extend` and no `name`. This type's items are the stored rows the + // `/api/v1/meta` doors write. `supportsOverlay` / // `allowEnvironmentOverlay: false`: an extension is never overlaid; a // package changes its own item, and a second package writes a second item. // The body is judged by the metadata-protocol doors with