mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
## Why Cache presence and freshness checks deserialize full plugin records even when callers only need to decide whether a cached catalog is available. ## What changed - Probe cache availability without deserializing plugin records, while still requiring a valid catalog envelope and a `plugins` array. - Let `PreferFreshCache` reject stale catalogs from a 256-byte prefix when the header provides enough information; fall back to a full read otherwise. - Limit discovery cache probes to the user and workspace scopes that need them, skipping the global cache probe. - Serialize cached plugin slices directly without cloning them. ## Testing Add coverage for malformed cache headers and payloads, reordered fields, stale-prefix rejection, and deferring plugin-record validation until a full catalog load. GitOrigin-RevId: 1e5ec95917f38c84bba30dbd3bb8c2f91cc7e3a8