fix(cli): os explain object documented ownership with the wrong values (#3244)#3303
Merged
Conversation
`os explain object` documented the object `ownership` field as the package contribution kind (`"own" | "extend"`, ObjectOwnershipEnum set via registerObject). The real ObjectSchema.ownership field is the record-ownership model — `z.enum(['user', 'org', 'none'])` — a distinct concept the spec explicitly warns not to conflate. The explain catalog now prints the correct allowed values and description. Adds a regression test that pins the documented values to the record-ownership enum so the two concepts can't drift back together. Closes #3244 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
os explain objectdocumented the objectownershipfield as:But
ObjectSchema.ownership(packages/spec/src/data/object.zod.ts:645) is the record-ownership model —z.enum(['user', 'org', 'none']).own/extendis the package contribution kind (ObjectOwnershipEnum, set viaregisterObject) — a distinct concept the spec explicitly calls out as separate from record-ownership. So the command printed the wrong allowed values and a misleading description.Change
os explain objectnow prints:packages/cli/src/commands/explain.ts— fixed theownershipcatalog entry; exportedSCHEMASso it can be asserted in tests.packages/cli/test/commands.test.ts— regression guard pinning the documented values to the record-ownership enum, so the two concepts can't drift back together. Verified it goes red on the old"own" | "extend"value and green on the fix.@objectstack/clipatch).Verification
os explain objectrun against the built CLI — output confirmed correct.pnpm turbo run test --filter=@objectstack/cli→ 423 tests pass (incl. the new guard).tsctypecheck + eslint on the changed files → clean.Found during the #1880 docs implementation-accuracy audit (PR #3243); was out of scope for that docs-only PR.
Closes #3244
🤖 Generated with Claude Code