Skip to content

Release v4.20.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 07:06
b796c1f

This release activates version 2 of the executable semantic model. It covers what version 1 could not express: which event source a state change targets, event-source context on facts, specification event sources, and command-occurrence values. A model uses version 2 only when it needs one of these; every existing model keeps its version 1 bytes. The release also executes projection variants, adds validation severities, and makes preserved comments land exactly where they were written.

Added

  • Executable semantic model version 2. It is selected automatically when a model uses a v2 construct and is otherwise unchanged at version 1 (#226, #167):
    • Typed state-change destinations: produces … for <expr> targets an event source without duplicating the identity into the event.
    • Event-source context on facts, which projections read the event-source identity from.
    • for <value> event-source assertions on given and then events, so a specification can name exact streams. For example, a unique constraint can be shown colliding between two event sources.
    • $context.occurred and the caller's identity ($context.identity.*) in produces, matching Chronicle's event context.
  • Projection variants execute. Each variant is its own read model; entering one removes the entity from its siblings, and projection-level handlers apply to every variant that has the property. This follows how Chronicle's variant support reclassifies them. New errors (PLAY0382–PLAY0385) cover a variant without enters on, an entering event claimed twice, and a shared mapping a variant's read model lacks (#185)
  • Validation rules and require conditions accept a severity: information, warning or error (the default). Every failing rule still rejects the command, and the rejection reports each failure's severity (#227)
  • require bodies accept a localized message $strings.<key> (#231)

Fixed

  • A preserved comment stays with its own declaration, even when two declarations in the same scope print identical lines (#229)