Repository navigation
Release v4.45.0
Specifications can now assert that a keyed read-model instance does not exist, for example after a projection removes it.
Added
then no readmodel <ReadModel> for <key>asserts that the instance with that key does not exist. The key is required and must match the read model's identifier type, and a present and an absent assertion for the same instance are reported as a contradiction. See Specifications. (#284)- Models that use the assertion compile to ESM v5 (language and semantics
5.0,schemaVersion5). Models without it keep their v1–v4 canonical bytes and revisions. ESM consumers must admit v5 explicitly before they read such a model. - The reference runner checks absence for projection-backed read models. For read models built by a reducer it returns
SemanticUnsupported, so a target provider must check the deletion instead of reporting a pass. - The editor grammar, completion and keyword help, and the MCP inspection tools recognise absence assertions.
- Typed workspace authoring binds each member of a composite absence key to the read model's identifier type. Safe authoring rejects new key members that don't resolve, keeps unchanged existing ones, and accepts explicit repairs of a key member, an enclosing member or the keyed query's
byidentifier. A declaration edit, such as changing a property's type, can repair an unresolved key member but is refused in both modes if it would retarget or unbind a resolved one. Draft authoring accepts new unresolved key members and reports them as reference debt. - Renaming a composite-type property also renames the absence-key members bound to it. A rename is refused while an absence key in the workspace is unresolved.
Fixed
- A structured value that names a property declared more than once on its composite type now reports a diagnostic instead of failing compilation with an exception.