Follow-up to a review thread on #71 (#71 (comment)).
McpSessionContext holds one SnapshotCacheEntry. The era is part of the key, so a request is
never served the wrong catalog — that much is safe. What the single slot costs is the other era's
cached entry.
When one connection is served through both supported revisions, publishing the modern snapshot
evicts the legacy one and vice versa. Two consequences:
- alternating requests rebuild the catalog on every switch even when the routing version has not
moved;
- a legacy projection that then fails transiently finds only an opposite-era entry,
IsFallbackEligible reads candidate.Sessionless != sessionless and refuses, so discovery fails
closed where Given_McpDebounce promises the previous catalog would still be served.
The second is the one that matters: the availability fallback is lost for a reason unrelated to the
failure, on a connection that had a serve-able catalog for that era a moment earlier.
Shape
Key the cache by era rather than evicting — two slots, or a small map — so each era keeps its own
entry and its own fallback. The retraction watermark comparison is unchanged: it already reads the
version the entry was built at.
How reachable this is in practice depends on hosts that genuinely alternate eras on one connection,
which is why it was deferred rather than fixed in #71.
Follow-up to a review thread on #71 (#71 (comment)).
McpSessionContextholds oneSnapshotCacheEntry. The era is part of the key, so a request isnever served the wrong catalog — that much is safe. What the single slot costs is the other era's
cached entry.
When one connection is served through both supported revisions, publishing the modern snapshot
evicts the legacy one and vice versa. Two consequences:
moved;
IsFallbackEligiblereadscandidate.Sessionless != sessionlessand refuses, so discovery failsclosed where
Given_McpDebouncepromises the previous catalog would still be served.The second is the one that matters: the availability fallback is lost for a reason unrelated to the
failure, on a connection that had a serve-able catalog for that era a moment earlier.
Shape
Key the cache by era rather than evicting — two slots, or a small map — so each era keeps its own
entry and its own fallback. The retraction watermark comparison is unchanged: it already reads the
version the entry was built at.
How reachable this is in practice depends on hosts that genuinely alternate eras on one connection,
which is why it was deferred rather than fixed in #71.