Skip to content

docs(intent): a value required only under a condition - checks: requiredWhen (#7094) - #236

Merged
delchev merged 1 commit into
masterfrom
required-when
Sep 7, 2026
Merged

docs(intent): a value required only under a condition - checks: requiredWhen (#7094)#236
delchev merged 1 commit into
masterfrom
required-when

Conversation

@delchev

@delchev delchev commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Documents the new row-level checks kind delivered in eclipse-dirigible/dirigible#7129 (issue eclipse-dirigible/dirigible#7094).

required: true is unconditional, and most rules about a missing value are not: the value is needed for ONE way of handling the record and meaningless for the others. An invoice sent by e-mail needs the customer's e-mail address; one sent by post does not - so required on the address is not the rule, and until this kind existed the real one could not be declared at all. An e-mailed invoice whose customer carried no address therefore reached status SENT with nobody to send it to, and the clerk who pressed the button was told it had succeeded.

The new section covers the three things an author has to decide:

  • the value, which may be one hop away (Customer.email) - including a relation whose target is owned by another model, and why an unset relation counts as an absent value;
  • the condition, closed and typed, and why both of its refusals are parse errors rather than tolerated (an uninterpretable condition read as "always true" is a required nobody authored; read as "always false" it switches the rule off - both silently);
  • the optional status: gate, whose presence decides whether the rule holds on every user write or only at the transition that finally needs the value - which is what makes the rule expressible at all, since a record being typed has not chosen how it will be sent.

npm run docs:build passes.

🤖 Generated with Claude Code

…redWhen (#7094)

`required: true` is unconditional, and most rules about a missing value are not: the
value is needed for one way of handling the record and meaningless for the others. An
invoice sent by e-mail needs the customer's e-mail address; one sent by post does not,
so `required` on the address is not the rule - and until this kind existed the real one
could not be declared at all, so an e-mailed invoice whose customer carried no address
reached status SENT with nobody to send it to and told the clerk it had succeeded.

Documents the new row-level `checks` kind on the DSL reference: the one-hop
`Relation.field` value (cross-model included), the closed and typed condition and why
both of its refusals are parse errors, and the optional `status:` gate - whose presence
decides whether the rule holds on every write or at the transition that finally needs
the value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant