DeepSeek V4.1 Flash · Heavy
add-caching-support-for-identityproviderstorageprovider-getforlogin-operations-keycloak
Keycloak · Java · M · 100–299 lines · 3 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 1 of 2
- Comments published
- 4
- Comments matching a bug
- 1
- Comments not matching
- 3
- Cost of this PR
- $0.308
Published comments (4)
Organization clause in shared login predicate hides linked brokers — `IdentityProviderBean.federatedProviderPredicate()` also uses `getLoginPredicate()`, so users linked to an organization IDP without `BROKER_PUBLIC=true` lose that provider from the login page. Keep the stricter predicate local to the invalidation code or add an explicit method instead of altering the shared predicate.
Login IDP cache invalidates shared entry for each new organization — Every login page then loads and copies the IDP ids of all organizations, and each new organization's first request triggers a full reload. Include `organizationId` in `cacheKeyForLogin` so entries are per-organization, or accept a per-search-key entry instead of invalidating the shared one.
Login cache test misses login-eligible IDP create/remove — Both IDPs fail `getLoginPredicate()`, so dropping the invalidation calls from `create()` and `remove()` would still pass, leaving the stale-login-list regression undetected. Add a step that creates and removes a login-eligible IDP and asserts the login caches become null for every `FetchMode`.
Discarded getForLogin results leave cached return path untested — The return half of the cached branch, resolving ids via `getById`, is never verified, so an empty or wrong returned set still passes. Collect the aliases returned by `getForLogin` and assert them against the expected set alongside the cache-entry count.