# Permission

**Test family:** `PER`

- **PER-001** Deny by default for missing/unknown permission, new endpoint, new action, and new object type.
- **PER-002** Evaluate subject, action, resource, tenant, state, field, and context server-side.
- **PER-003** Direct URL/API/ID substitution/bulk/import/export/search/cache/websocket/background job use same effective policy.
- **PER-004** Grant/revoke/expiry takes effect within named bound across existing sessions and derived artifacts.
- **PER-005** Resource existence and sensitive fields do not leak through error, count, timing, audit, notification, or AI context.
- **PER-006** Support/admin impersonation requires explicit scope, banner, expiry, reauth, and immutable audit.

## Comprehensive per-item coverage

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