You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #1512 adds MetadataTokenSource (keyless ADC) alongside the existing GoogleChatTokenCache (SA-key exchange) in crates/openab-gateway/src/adapters/googlechat.rs. The two get_token implementations now maintain near-identical double-checked-locking cache machinery (read-check, write-check, refresh-or-serve-stale-on-error, refresh_threshold clamping), differing only in what refresh() calls.
Review round 5 finding F29 (consolidated review on #1512): the copies had already diverged in robustness once (the request-timeout fix landed in one path's history but not the other's), and the PR's own follow-ups forecast keyless auth for other Google-API adapters - which would create a third copy.
Requested work
Extract the shared cache/refresh skeleton into one helper (e.g. a TokenSource trait or a generic cached-token struct parameterized by the refresh future), and re-base both GoogleChatTokenCache and MetadataTokenSource on it.
While touching the config surface, decide whether use_adc: bool should become an auth_mode enum before the shape ossifies (one reviewer lane recommended the enum; another judged the bool adequately minimal - decide once, here).
Carry over the existing regression tests (serve-stale, TTL clamp, blank-token rejection, timeout) so both paths keep identical robustness guarantees.
Non-goals
No behavior change to auth precedence (SA key > ADC > static token).
No new auth modes.
Related non-blocking follow-ups recorded in the #1512 review history that could ride along: case-insensitive bool parsing for GOOGLE_CHAT_USE_ADC (x3 call sites), the untested env path, and an IAM-propagation retry note.
Thanks for the report! A maintainer will triage this shortly and apply the appropriate label. Once a type label is added, the issue will be re-validated automatically.
This issue has been open for more than 14 days with no linked pull request, so it is being closed as not planned.
If this is still needed, please open a new issue with updated context and reference this closed issue instead of reopening it. A linked PR is the strongest signal that the work matters.
Activity
github-actions commentedon Aug 31, 2026
Thanks for the report! A maintainer will triage this shortly and apply the appropriate label. Once a type label is added, the issue will be re-validated automatically.
github-actions commentedon Sep 15, 2026
This issue has been open for more than 14 days with no linked pull request, so it is being closed as not planned.
If this is still needed, please open a new issue with updated context and reference this closed issue instead of reopening it. A linked PR is the strongest signal that the work matters.