Release 1.20.0
What's New
New reply Statement
New language construct for query handlers to send results back
to the sender without needing to know the sender's identity.
on query GetOrder {
reply result OrderResult
}
- Syntax:
reply result SomeResult(or any message ref) - Classified as an executable statement for handler completeness
- Query completeness check now accepts
replyas satisfying
the query→result requirement - Full support: parser, AST, EBNF, BAST (subtype 15), prettify,
resolution, validation, and diagrams
Extended require Statement
The require statement now accepts either a literal string
condition or a named invariant reference:
invariant BalanceNonNegative is "balance >= 0"
handler H is {
on command Withdraw {
require invariant BalanceNonNegative
// ... or the original form:
require "amount > 0"
}
}
- New
InvariantReftype in AST - Invariants defined but not referenced by any
require invariant
statement produce a UsageWarning - BAST subtype 14 format updated (condition-kind byte added)
New auto-id Entity Option
entity Order is { ... } with { option auto-id }
Instructs the entity to automatically obtain a unique ULID at
instantiation time. The entity must still define an Id type so
it can be referenced in messages and state fields.
New Validation Checks
Entity checks:
- Entity Id type scope verification (three-level):
- Inside entity body: warns to move to containing context
- In containing context: correct, no warning
- At domain level or beyond: warns scope is too broad
- Not defined at all: warns missing
- Event-sourced entity command handlers must emit events
- Entities without query handlers flagged
Saga checks:
- Saga step do-statements must contain
tell commandto
effect state changes
Handler checks:
- Empty
on otherclauses flagged (silently discards messages)
Streamlet checks:
- Flow/Split/Router handlers must send to their outlets
- Source streamlets must have
on initoron otherto
generate data
Type checks:
- Command types with no fields (skips placeholder definitions)
- Event types not produced by any handler
- Query types without corresponding result types (and vice versa)
BAST Format
FORMAT_REVISION bumped to 6. RequireStatement wire format changed
(added condition-kind byte) and ReplyStatement is new subtype 15.
Old BAST files are incompatible with this revision.
Compatibility
- New language features:
replystatement,require invariant
form,auto-idoption — all additive - BAST: Breaking change (revision 5 → 6), old
.bastfiles
must be regenerated - All existing APIs remain unchanged