Stage 2a Cohort 3 — Migrate `.peek` callers
Migrate the 10 `.peek` callers in `Gitlab::ApplicationRateLimiter` to `Labkit::RateLimit`. `.peek` reads the current count without incrementing. Labkit currently only has `Limiter#check` which always increments. This cohort is blocked until `Limiter#peek` is implemented upstream in labkit-ruby. Known `.peek` call sites: `notification_recipient`, `identity_verifiable`, `namespace`, `glql`, `user_risk_profile`, and 5 others identified in the Spec 2 audit. Overarching issue: https://gitlab.com/gitlab-com/gl-infra/production-engineering/-/work_items/28808 Parent epic: https://gitlab.com/groups/gitlab-com/gl-infra/-/work_items/2021 ## Labkit prerequisite `Limiter#peek` — a read-without-increment API. Needs to be implemented in labkit-ruby before this cohort can proceed. ## TODO - [x] Create labkit-ruby issue for `Limiter#peek` - [ ] Enumerate all `.peek` call sites - [ ] Follow the shadow validation and enforcement flip process from the overarching issue
issue