Skip to content

[finding] os explain action's example is rejected on three keys — object is objectName, confirmation is confirmText, and flow is not an action key #15175

Description

@os-litant

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

ActionSchema (@objectstack/spec/ui) rejects the action entry's example:

[] unrecognized_keys :: Unrecognized key(s) on this action: `object`, `flow`, `confirmation`.
   Did you mean `object` -> `objectName`, `confirmation` -> `confirmText`? Until this
   shape was closed these were dropped silently — the action still registered and still
   ran, without whatever the key was meant to configure or gate.

The sample writes:

{
  name: 'close_task',
  type: 'flow',
  label: 'Close Task',
  object: 'project_task',
  flow: 'close_task_flow',
  confirmation: 'Are you sure you want to close this task?',
}

Note for whoever takes it

Two of the three are mechanical renames the spec itself names (object -> objectName, confirmation -> confirmText). The third is not: flow is rejected with no suggestion, and the entry's optional table documents it as { name: 'flow', type: 'string', description: 'Flow to launch (for flow actions)' } — so os explain action currently teaches a type: 'flow' action whose flow cannot be named. Whoever fixes this has to find how an action of type flow actually binds its flow in ui/action.zod.ts and correct both the table row and the example.

Note the entry's own optional table also carries object and confirmation under those exact stale spellings; the parse only sees the example, so fixing the literal alone would leave the tables teaching the rejected keys.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions