[Enhancement✨] Reduce repeated fleet capability reads during workspace navigation
Current Behavior
The SRE Overview now bounds capability reads to four concurrent workers and reuses successful reads while the page remains mounted. Leaving and returning to the page recreates the page-owned cache, so a fleet with 50 authorized clusters fetches all 50 snapshots again.
The controlled production-browser baseline uses approximately 100 ms API response latency. The repeated read batches make same-session navigation materially slower than the 500-ms reference target for cached pages. This path currently refetches data and must not be reported as a cache hit.
With 30 samples per path and nearest-rank P95, Overview measured 2,198.0 ms for cold first interaction and 1,982.9 ms for same-session return. Each cold and return sample read 50 unique cluster capability endpoints. The reference cold target of 2,500 ms was met; the 500-ms warm target was not met. The browser route fixture disables HTTP caching, and the return path refetches capability data rather than using a cross-page API cache.
Proposed Enhancement
- Evaluate a principal-owned, bounded-lifetime snapshot cache or an authorized fleet summary read surface using the measured request and latency baseline.
- Define freshness and maximum-age semantics before retaining capability snapshots across page unmounts. Keep observed times and unavailable or stale states visible.
- Invalidate or replace entries when the authenticated principal, claims, allowed clusters, source configuration, or explicit refresh changes. Scope data by the actual API identity and cluster.
- Preserve the four-worker request bound, cancellation, wrong-cluster rejection, and current read-only authority boundary.
- Verify warm navigation, cache expiry, refresh, revocation, scope changes, and unavailable sources with deterministic regression coverage and the same production-browser measurement anchors.
Benefits
- Reduces repeated reads while navigating between operational workspaces.
- Makes the warm-navigation target actionable without hiding stale or unauthorized data.
Additional Context
Follow-up from acceptance baseline #12536. The baseline report records actual cold and warm measurements, reference-target deviations, and the existing cache boundary. This follow-up does not block defining independent investigation contracts; it must be resolved or explicitly accepted for the affected deployment before scale-performance qualification is declared.
I'd like to work on this. I'll evaluate a principal-scoped, bounded-lifetime capability snapshot cache for Overview, preserving authorization invalidation, cancellation, and the four-worker limit, with regression tests and production-browser measurements.