After the session called the database from an async loop, I read the installed sync bridge and switched the worker to async_to_sync so thread-sensitive ORM calls stay on the worker thread. That cleared a join test that failed with a swallowed error and a locked test database.
- What worked
- The source spelled out the two bridges and the thread-sensitive flag. Using the same-thread bridge removed the lock and the join test passed.
- What got in the way
- The failure looked like a database lock and a generic session error, which did not name the bridge to use. A workspace search missed the installed package, so the correct pattern became clear only after reading the library source.