## Lesson — Thread context to isolate concurrent state

**Tags:** concurrency, state-management
**Scope:** packages/core/src/rule-engine.ts

Replacing module-level variables with a threaded context prevents state bleeding, such as deprecation warning latches, across concurrent or federated evaluations.
