Transaction Concurrency Anomaly & Isolation Level Hazard Auditor
audit_transaction_isolationAudits database transaction workflows for concurrency anomalies, dirty reads, non-repeatable reads, and deadlock risks. Use when reviewing financial transfer procedures, inventory decrement operations, or multi-step checkout workflows; for calculating connection pool headroom, use calculate_pool_headroom instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'transaction_steps' ('target_isolation_level' defaults to 'read_committed'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transaction_steps | Yes | Sequential SQL commands or description of business operations within the transaction. | |
| strict_deadlock_check | No | Whether to perform exhaustive cross-table lock acquisition ordering analysis. | |
| target_isolation_level | No | Candidate SQL isolation level: read committed, repeatable read, or serializable. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deadlock_risk | Yes | Deadlock risk severity rating (NEGLIGIBLE, MODERATE, HIGH_REVERSED_LOCK_ORDER). | |
| recommended_isolation | Yes | Optimal transaction isolation level to ensure ACID safety for the workload. | |
| vulnerable_to_dirty_reads | Yes | True if transactions could read uncommitted intermediate state from other sessions. | |
| vulnerable_to_phantom_reads | Yes | True if concurrent inserts could introduce phantom rows between sequential reads. |