# Condition and rule expression

**Test family:** `CON`

- **CON-001** Test true/false plus missing/null/empty/zero/false distinctions.
- **CON-002** Each comparison at below/equal/above boundaries and wrong types.
- **CON-003** AND/OR/NOT grouping, precedence, nesting, short-circuit, and multiple matching branches.
- **CON-004** Text case/locale/Unicode, number precision, date zone, enum unknown, list any/all/none semantics.
- **CON-005** Referenced field/object deleted/renamed/inaccessible has explicit validation/runtime behavior.
- **CON-006** Expression/template input is sandboxed, resource-bounded, and cannot reach secrets or arbitrary code.
- **CON-007** Preview/test mode uses representative data and matches production evaluator/version.

## Comprehensive per-item coverage

- **CON-008** Exercise no match, one match, many matches, and boundary-size batches with ordinary and adversarial records.
- **CON-009** Use text values containing emoticons, emoji, kaomoji, RTL, combining marks, quotes, delimiters, and newlines; preserve comparison and substitution semantics.
- **CON-010** Deliver the same event once, twice, late, out of order, and after replay; define deduplication and event-time behavior.
- **CON-011** Race matching events and concurrent workflow instances against the same record; prevent lost updates and duplicate effects.
- **CON-012** Retry before commit, after commit before acknowledgment, and after downstream partial success; use stable idempotency.
- **CON-013** Change the condition, template, permission, owner, or target after scheduling but before execution; define snapshot versus latest semantics.
- **CON-014** Run across daylight-saving gaps/folds, leap day, month end, differing tenant zones, clock skew, and delayed workers.
- **CON-015** Pause, resume, disable, edit, clone, publish, roll back, and delete while runs are queued or active; preserve version identity.
- **CON-016** Create direct, indirect, and cross-workflow loops; detect recursion, cap fan-out, and expose why execution stopped.
- **CON-017** Test missing fields, nulls, type changes, unknown enums, deleted references, schema migrations, and malformed payloads.
- **CON-018** Run as creator, owner, service identity, changed-role user, removed user, and least-privilege actor; define execution authority explicitly.
- **CON-019** Cross tenant, workspace, region, and environment boundaries only when explicitly authorized; prevent shared caches or queues from leaking data.
- **CON-020** Force dependency timeout, rate limit, quota, authentication expiry, malformed response, and permanent rejection; route each to a defined failure path.
- **CON-021** Verify compensation or rollback for partial multi-step work, including a compensation failure and manual recovery.
- **CON-022** Measure queue delay, execution latency, throughput, fan-out, backlog, and recovery under the supported load envelope.
- **CON-023** Provide dry-run or preview where consequences justify it; identify evaluated inputs, matched conditions, and proposed actions without mutation.
- **CON-024** Verify alerting distinguishes user-data failure, configuration failure, platform failure, and exhausted retries without notification storms.
- **CON-025** Record immutable version, trigger/event ID, evaluated conditions, actor, permissions, each attempt, side effect, and final outcome without secrets.
- **CON-026** Replay a historical event against the same and newer definition in an isolated mode; make semantic changes visible.
- **CON-027** Recover after worker crash, queue redelivery, regional failover, and prolonged outage without losing or duplicating committed work.

[Back to Automation, rules, permissions, and audit index](../../automation-rules.md)
