Add strong memoization
What does this MR do and why?
Addresses two optional follow-ups from !228648 (merged):
- FoundationalChatAgentsResolver: replaces the local sm_gitlab_credits_dap_access? helper with a call to the existing GitlabSubscriptions::Duo.active_self_managed_gitlab_credits? model method, which wraps the same query in Gitlab::SafeRequestStore — so the result is memoized across the whole request, not just the resolver instance.
- Admin::AiConfigurationPresenter: adds strong_memoize_attr :foundational_agents_statuses to match the existing memoization pattern in the class (application_settings, ai_settings).
No behavior change.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #595692