From be53c600ca429c6b992ebc697eb497a0719623f2 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:01:56 +0500 Subject: [PATCH 1/2] fix(cli): drop stale `ownership` key from init scaffold object template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `os init` scaffold emitted `ownership: 'own'` on the starter object in both the `app` and `plugin` templates. `ownership` is no longer a valid ObjectSchema field — it's removed from ObjectSchemaBase, and `ObjectSchema.create()` now rejects unknown top-level keys (ADR-0032 / #1535). A user copying the scaffolded object into `ObjectSchema.create({...})` would hit a validation error; the plain-literal form merely hid the problem while teaching a dead field. Remove the key from both templates. Rest of the scaffold output is unchanged; init.test.ts (28 tests) passes and end-to-end render of both templates confirms no `ownership` remains. Surfaced during the docs audit in #1866 (getting-started/quick-start.mdx). Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/cli/src/commands/init.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.ts index ca36a67c1b..ea3a729eb7 100644 --- a/packages/cli/src/commands/init.ts +++ b/packages/cli/src/commands/init.ts @@ -150,7 +150,6 @@ export default defineStack({ const ${toCamelCase(namespace)}Item: Data.Object = { name: '${namespace}_item', label: '${toTitleCase(namespace)} Item', - ownership: 'own', fields: { name: { type: 'text', @@ -223,7 +222,6 @@ export default defineStack({ const ${toCamelCase(namespace)}Item: Data.Object = { name: '${namespace}_item', label: '${toTitleCase(namespace)} Item', - ownership: 'own', fields: { name: { type: 'text', From 08cd1af1ce5723e3972011dad0230beca7351d08 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:03:05 +0500 Subject: [PATCH 2/2] chore: add changeset for init scaffold ownership fix Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/init-scaffold-drop-ownership.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/init-scaffold-drop-ownership.md diff --git a/.changeset/init-scaffold-drop-ownership.md b/.changeset/init-scaffold-drop-ownership.md new file mode 100644 index 0000000000..ae994a6480 --- /dev/null +++ b/.changeset/init-scaffold-drop-ownership.md @@ -0,0 +1,7 @@ +--- +"@objectstack/cli": patch +--- + +fix(cli): drop stale `ownership` key from the `os init` scaffold object template + +The `app` and `plugin` scaffold templates emitted `ownership: 'own'` on the starter object. `ownership` is no longer a valid `ObjectSchema` field (it's not in `ObjectSchemaBase`, and `ObjectSchema.create()` rejects unknown top-level keys per ADR-0032 / #1535), so a user migrating the scaffolded object into `ObjectSchema.create({...})` would hit a validation error. Removed the key from both templates; the rest of the scaffold output is unchanged.