Skip to content

fix(cli): drop stale ownership key from init scaffold object template - #1869

Merged
xuyushun441-sys merged 2 commits into
mainfrom
fix/init-scaffold-ownership
Jun 15, 2026
Merged

fix(cli): drop stale ownership key from init scaffold object template#1869
xuyushun441-sys merged 2 commits into
mainfrom
fix/init-scaffold-ownership

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

The os init scaffold emitted ownership: 'own' on the starter object in both the app and plugin templates (packages/cli/src/commands/init.ts). This PR removes it.

Why

ownership is no longer a valid ObjectSchema field — it's not in ObjectSchemaBase, and ObjectSchema.create() rejects unknown top-level keys (ADR-0032 / #1535). The 'own'/'extend' values belong to ObjectOwnershipEnum, which models a package↔object relationship (objectExtensions/manifests), not a top-level object-schema field.

The scaffold emitted the starter object as a plain object literal, so it didn't throw at scaffold time — but it taught a dead field, and a user migrating the object into ObjectSchema.create({...}) would hit a validation error.

Surfaced during the docs audit in #1866 (getting-started/quick-start.mdx), where the example was aligned to the scaffold output while the scaffold itself still carried the stale key.

Verification

  • pnpm vitest run test/init.test.ts → 28/28 pass.
  • End-to-end render of both app and plugin object templates → neither contains ownership; rest of scaffold output unchanged.

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@vercel

vercelBot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJun 15, 2026 6:07am

Request Review

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tooling labels Jun 15, 2026
@xuyushun441-sys
xuyushun441-sys merged commit b9d0526 into mainJun 15, 2026
13 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the fix/init-scaffold-ownership branch June 15, 2026 06:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/xstooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@xuyushun441-sys@os-zhuang