Files
codex/codex-rs
Anthony Tafoya 2fb728da7d Retry executor discovery V2 failures with backoff (#62679)
## Why

Discovery could retry transport failures on successive lookups while
caching server errors until invalidation. That could repeat requests
against an unhealthy executor or leave a session without an inventory
after the server recovered.

## What changed

Cache failed discovery loads per context and return the cached error
during cooldown. The first lookup after cooldown retries, with delays
doubling from 1 second up to 30 seconds on consecutive failures.
Successful inventories are reused, canceled loads add no cooldown, and
explicit refresh clears the cooldown for the next lookup without
interrupting in-flight readers.

Compare discovery snapshots to detect inventory changes so recovered
plugins and MCP capabilities can become available without an explicit
refresh.

## Testing

Cover backoff timing, shared results for concurrent callers,
cancellation, and refresh bypassing cooldown. Exercise recovery after
failed prewarming and verify that MCP inventory updates after recovery.

GitOrigin-RevId: 6de34bb8957a0b24ee874e2447157bd3af562430
2026-11-20 06:05:04 +00:00
..
…
…
…