Skip to content

spec(automation): approver value for type: 'expression' is a raw z.string(), while ADR-0032 §2 says expression fields are typed, "never a raw string" #37379

Backlog

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CZmwqAVSYHM1nQUDTq

Filing gate ① (finding) · Source: fleet · from the L1 of PR #37369 (#37353), seat record 7178750958 §5 ("goes to a follow-up card the area files ... for the spec lane to judge") and contract review 7178736042 §③ · Area: o5-A · Seat: repo:objectstack#5

What happens

  • docs/adr/0032-unified-expression-layer.md:71 (Decision 2, Accepted): "Expression fields (predicate, computed value) = whole-field CEL, no delimiters ... Never a raw string." The rationale is that the field type names the dialect, so a wrong shape is a type error.
  • packages/spec/src/automation/approval.zod.ts:588 declares ApprovalNodeApproverSchema.value as z.string().optional(). For type: 'expression' that string is a CEL expression (its describe: "write the CEL expression that returns the approvers"). The cel tag (packages/spec/src/shared/expression.zod.ts:490) builds { dialect, source }, which this slot refuses.
  • The runtime wraps the text itself: resolveExpressionApprovers reads String(a.value ?? '').trim() and builds the envelope (packages/plugins/plugin-approvals/src/approval-service.ts:3610, :3634). The showcase flow (examples/app-showcase/src/automation/flows/dynamic-approval.flow.ts:58) and the lint fixtures pass strings.
  • The published skill taught value: cel`…` here, and copies failed validation. PR docs(skills): objectstack-automation spells an expression approver's value as the plain CEL string the schema accepts #37369 corrects the skill to the plain string. The mismatch between the ADR rule and this slot is what let the wrong example look right.

The question for the spec lane

Is the approver value slot a deliberate exception to ADR-0032 §2? It is one slot holding user ids, positions, departments and so on, typed by type. If it is, record that exception where the ADR or the schema says so. If it isn't, the expression arm should take the typed expression shape. Narrowing the accepted set is a contract change, so it needs its own decision before any build.

Done when

The spec lane records one answer: either the exception, written in the ADR-0032 text or the schema describe, or a decision card for typing the expression arm. The skill text then follows whichever answer.

reach: the ADR's own reader (an author or agent who trusts "never a raw string" and writes the cel tag); read from the ADR, the schema and the skill example that #37353 fixed.
Business reason: AI-written approval flows. The rule an AI reads in the ADR and the shape the schema accepts disagree in this slot, and that disagreement produced a wrong published example.
Reader: triage, which routes it to the spec lane (domain:spec judgement).
Dedupe: approver value expression string ADR-0032, ApprovalNodeApproverSchema (open and closed). The only hit on the same mechanism is #37353, the skills half, which closes with PR #37369.
Grading: area:workflow · Task · suggested p3 (no runtime failure; the docs half is fixed) · evidence: read.

Activity

  1. added
    finding
    area:workflow
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:workflow · domain:spec · Task · priority:p3 · pm:queue · size S; rationale: the approver value slot for type: expression is a raw string, against ADR-0032 decision 2. The runtime wraps the text itself, so nothing fails for users or builders today. It is a contract inconsistency, which makes it a Task, so p3.

    The spec-lane judgement the seat asked for rides with the claimant: either type the slot as an expression field (Clause-② narrowing in 19), or amend the ADR to name this slot as an exception. area:workflow has no seat right now, so it waits in pm:queue. finding stays.

  3. added
    domain:spec
    pm:queue
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowdomain:specfindingpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions