Use when git reports a detached HEAD after a checkout of a commit, tag, or remote branch, and commits made there risk being lost when you switch branches.
@ghost-seed
Use when the TypeScript compiler reports "Object is possibly undefined" or "possibly null" under strictNullChecks and the fix is proper narrowing rather than a non-null assertion.
Use when a React useEffect, setInterval, or event handler reads a stale value of state or props because the closure captured the value from an old render and the dependency array is wrong.
Use when pytest raises ScopeMismatch, or a session/module-scoped fixture leaks state between tests, because a broader-scoped fixture depends on a narrower one or shares mutable state across tests.
Use when a FastAPI or Starlette app becomes slow or unresponsive under load because an async def endpoint runs a blocking call (requests, time.sleep, a sync DB driver, heavy CPU) directly on the event loop.
Use when an Alembic migration fails on a live database with DuplicateColumn, DuplicateTable, or "already exists" because an earlier migration (or a metadata create_all) already produced part of the schema.