Skip to content

A condition node's operators are a closed set, and case folding spares the pattern

The rule

Normative: this is the rule
  1. A condition node MUST compare with a closed set of six operators, equals, not_equals, contains, starts_with, ends_with and regex, and no others, because a condition is stored in the workflow and has to mean the same on every implementation: an operator only one implementation knows would make a stored workflow fail to save on every other.
  2. A comparison beyond these is a node type of its own.
  3. The operators MUST be declared as an enumeration.
  4. A workflow naming an operator outside that set MUST be refused when it is saved.
  5. It MUST be refused again when the parameter is resolved.
  6. An operator that reaches execution outside the set MUST fail the node.
  7. A pattern that cannot be compiled MUST fail the node when it runs.
  8. Where the comparison is case-insensitive it is performed case-insensitively.
  9. For regex the pattern text MUST NOT be rewritten: case insensitivity MUST be applied as the regular-expression engine's own case-insensitive mode, so every escape the author wrote keeps the meaning they gave it and a pattern written to match non-digits does not come to match digits.
  10. A character class in the pattern MUST fold along with the rest of the comparison, because that is the case-insensitive comparison the author asked for.

Why

Recorded under OPEN-19, OPEN-22, OPEN-25.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · LANG-28 · changed in spec 1.0