Found by the catalog sweep landed for #14811, which parses every SCHEMAS entry's example in packages/cli/src/commands/explain.ts against its real schema. Rewriting catalog entries was ruled out of scope on that card (triage comment 5520209463, step 3), so this is filed unassigned for triage. Suggested domain: domain:cli.
Measured
ObjectSchema (@objectstack/spec/data) rejects the object entry's example:
[fields.status.options.0] invalid_type :: Invalid input: expected object, received string
[fields.status.options.1] invalid_type :: Invalid input: expected object, received string
The sample writes status: { type: 'select', label: 'Status', options: ['open', 'closed'] }.
Second surface, same root cause
The field entry's own optional-property table documents the same key with the same wrong type:
{ name: 'options', type: 'string[]', description: 'Available choices (select fields)' }
That row is prose, not a parsed literal, so the sweep does not turn it red — but it teaches operators the shape that the object example then demonstrates and the spec then rejects. Whoever fixes the example should fix the row in the same pass, and the field entry's example (which parses today) is a candidate place to demonstrate the real option shape.
Reproduce
pnpm --filter @objectstack/cli exec vitest run test/commands.test.ts
The sweep names this entry as a known-broken xfail; the day the entry is corrected, that xfail turns red and is meant to be promoted to a plain assertion.
Found by the catalog sweep landed for #14811, which parses every
SCHEMASentry'sexampleinpackages/cli/src/commands/explain.tsagainst its real schema. Rewriting catalog entries was ruled out of scope on that card (triage comment5520209463, step 3), so this is filed unassigned for triage. Suggested domain:domain:cli.Measured
ObjectSchema(@objectstack/spec/data) rejects theobjectentry's example:The sample writes
status: { type: 'select', label: 'Status', options: ['open', 'closed'] }.Second surface, same root cause
The
fieldentry's own optional-property table documents the same key with the same wrong type:{ name: 'options', type: 'string[]', description: 'Available choices (select fields)' }That row is prose, not a parsed literal, so the sweep does not turn it red — but it teaches operators the shape that the
objectexample then demonstrates and the spec then rejects. Whoever fixes the example should fix the row in the same pass, and thefieldentry's example (which parses today) is a candidate place to demonstrate the real option shape.Reproduce
The sweep names this entry as a known-broken xfail; the day the entry is corrected, that xfail turns red and is meant to be promoted to a plain assertion.