Skip to content

finding(spec): the expression dialect table lists notification subjects/bodies as template slots, but NotifyConfigSchema.title is z.string() and refuses the tmpl envelope #22054

Description

@objectstack-fleet

Found by the repo:objectos seat (#9831) while staging objectos#316, the docs code-sample gate, on 2026-10-07. Measured on the published @objectstack/spec 17.7.0 and read at origin/main. Class b: the contract text and the schema disagree.

What disagrees

  • packages/spec/src/shared/expression.zod.ts:27. The dialect table names the template dialect's slots as "notification subjects/bodies, titleFormat, prompt templates". A template-typed slot accepts either a bare string or the { dialect: 'template', source } envelope (TemplateExpressionInputSchema, :36, and the guidance at :292-295).
  • packages/spec/src/automation/io-node-config.zod.ts:192. NotifyConfigSchema.title is z.string().optional(), so only a bare string parses.
  • Effect. A notify node written with the tmpl helper is refused, by defineFlow and by NotifyConfigSchema alike: title: expected string, received object. Example: title: tmpl`[{{record.priority}}] {{record.subject}}`. The bare-string spelling of the same text parses.

Why it matters

Docs and authors who follow the dialect table write the envelope form for notifications and get a schema error. objectos's reference/cel.mdx now follows the parse, using bare strings for notify titles, after objectos#316 / PR #321.

Possible directions (the owner decides)

  • Type NotifyConfigSchema.title, and any body or subject field, as TemplateExpressionInputSchema, so both spellings parse. Or:
  • Correct the dialect table row so it no longer promises the envelope for notification subjects and bodies.

Either way, a test pinning the decision closes it.


Generated by Claude Code

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

Labels

area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:specpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions