Files
codex/codex-rs
jif 21b1f5f534 Bound retained turn analytics and clean up closed threads (#55847)
## Why

Dropped lifecycle facts can leave incomplete turns retaining analytics metadata indefinitely.

## What changed

- Limit retained turns to 256, evicting the oldest turn and its associated tool and review state when capacity is reached.
- Forward `ThreadClosed` notifications to analytics and discard the closed thread's turn and review state, including reviews received without turn lifecycle facts.

## Testing

Add regression tests covering metadata release after capacity eviction, continued reporting of new complete turns, cleanup isolated to the closed thread, and ignored approval responses after thread closure.

GitOrigin-RevId: eed0a1fef013381654345d535f03de42b99e8607
2026-10-21 09:54:36 +00:00
..
…
…
…