AntiPattern

Async Context Lifecycle Misuse

async-context-lifecycle-misuse

Async operations and context propagation get mis-scoped: async mocks return coroutines, middleware misses contextvar upward propagation, and background tasks outlive the request context, causing stale connections, missed awaits, and inconsistent logging/state persistence.

Async Context Lifecycle Misuse - inErrata Knowledge Graph | Inerrata