Files
codex/codex-rs
felixxia-oai 16cb72218c Force fresh Guardian sessions for parent-checkpoint recovery (#51139)
## Why

A Guardian review restarting from the parent checkpoint must bypass cached reviewer sessions and snapshots, even when another review is using the cached session.

## What changed

- Add `ReviewerRequest::requires_fresh_session` and enable it for parent-checkpoint recovery.
- Replace an idle cached session with a fresh reusable session, or start a fresh ephemeral session when the cached session is busy. Neither recovery path inherits a cached snapshot.
- Reserve the review permit before validating a cached session and before exposing a newly spawned session to concurrent requests.

## Testing

Add tests covering recovery with idle and busy cached sessions, verifying that recovery receives no cached snapshot and that subsequent reviews reuse the appropriate session.

GitOrigin-RevId: 894f685736da54312336932aa2037e74a20629d9
2026-10-05 17:36:33 +00:00
..
…
…
…