# Track Specification: Concurrent Tier Source Isolation (concurrent_tier_source_tier_20260302)

## Overview
Currently, `ai_client.current_tier` is a module-level `str | None`. This works safely only because the MMA engine serializes `ai_client.send()` calls. To prepare the architecture for parallel agents (e.g., executing multiple Tier 3 worker tickets concurrently), this global state must be replaced. This track will refactor the tagging system to use thread-safe context.

## Architectural Constraints
- **Thread Safety**: The solution MUST guarantee that if two threads call `ai_client.send()` simultaneously, their `source_tier` logs do not cross-contaminate.
- **API Surface**: Prefer passing `source_tier` explicitly in the `send()` method signature over implicit global/local state to ensure functional purity, OR use strictly isolated `threading.local()`.

## Functional Requirements
- Refactor `ai_client.py` to remove the global `current_tier` variable.
- Update `run_worker_lifecycle` and `generate_tickets` to pass the tier context directly to the AI client or into a `threading.local` context block.
- Update `_append_comms` and `_append_tool_log` to utilize the thread-safe context.

## Acceptance Criteria
- [ ] `ai_client.current_tier` global variable is removed.
- [ ] `source_tier` tagging in `_comms_log` and `_tool_log` continues to function accurately.
- [ ] Tests simulate concurrent `send()` calls from different threads and assert correct log tagging without race conditions.