Bots caught the emit-after-remove race: delegate callbacks deferred the emit onto the serial queue then removed the emitter synchronously, so close/error events never reached JS. Emits now run synchronously on the queue before removal. Also cleans up activeSockets when connect throws, and imports "expo" lazily so test import chains touching runtime.ts do not evaluate expo's dev-only setup (CI __DEV__ failure). Co-Authored-By: Claude Fable 5 <[email protected]>