Saved prompt-cache diagnostics are size-checked on load so a corrupt file is rejected.
What's wrong with this entry?
The stored per-source prompt-cache diagnosis data is now validated on load with hard size limits, so a corrupted or oversized file is rejected instead of being loaded wholesale.
- Strings are capped at 200 characters, tool-name and per-tool hash maps at 2000 entries, block hash arrays at 5000, and message hashes at 20000.
- The
globalCacheStrategyfield is checked against a fixed set of accepted values, one of which istool_based. - Clearing is now selective: a subset of sources can be invalidated rather than wiping the entire map.
tool_based
Strings lifted out of the shipped bundle, so the claim above can be checked against them.