Skip to content

Upgrade to @objectstack 7.6 — run objectstack build to catch expression-validation failures (ADR-0032) #14

@xuyushun441-sys

Description

@xuyushun441-sys

Context

@objectstack 7.6 ships ADR-0032 phase 1: build-time and runtime expression validation. The template packages are pinned to ^7.4.1.

objectstack build (compile) now validates every flow start/decision/edge condition, plus object validation-rule and field-formula predicates, against the resolved object schema, and fails the build on:

  • single-brace {field} inside a CEL expression ({…} parses as a CEL map literal and fails) — write bare CEL: record.field;
  • references to fields that don't exist (record.<unknown>), with a "did you mean…" hint.

At runtime, a malformed condition now throws loudly instead of silently evaluating to false.

Note: the flow conditions across the template packages already look clean (no brace-in-CEL found). The likely surfacing here is validation rules / field formulas that reference a field that doesn't exist or have a CEL typo — these previously failed silently at runtime and will now be caught at build time.

Action items

  • Bump @objectstack/* from ^7.4.1^7.6 (latest 7.6.x) across the workspace; pnpm install.
  • Run objectstack build for each template package (and the all aggregate). Fix every expression-validation error it reports — each is located, with the offending source + a corrective message.
    • {field} in a condition → record.field (bare CEL).
    • record.<unknown> → correct the field name (build suggests the nearest match).
  • Re-build green and smoke-test that flows / validations behave as intended.

Optional (new in 7.6)

  • {{ path | formatter }} template holes (currency/date/number/percent/upper/lower/truncate/default) with defined value→string semantics. Single-brace {…} node-field templates still work, so no template migration is required yet (that's a later breaking step).

Refs: ADR-0032 (docs/adr/0032-unified-expression-layer.md in framework).

Filed on behalf of @os-zhuang after the 7.6 release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions