# Template

**Test family:** `TMP`

- **TMP-001** Create/version/publish/archive/restore with correct visibility, owner, locale, and immutable use snapshot.
- **TMP-002** Required/optional/default/unknown variables, nested/list values, wrong types, and missing references.
- **TMP-003** Escape each output context—HTML, text, URL, JSON, shell-like integrations—rather than applying one sanitizer.
- **TMP-004** Preview/test/render/final delivery use same template version and inputs.
- **TMP-005** Template change does not silently mutate historical generated artifacts or in-flight runs.

## Comprehensive per-item coverage

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