GPT-5 finding
Provider comparison in markAuthProfileGood is case/format sensitive while other code normalizes provider IDs
lowmaintainabilitymedium
- src/agents/auth-profiles/profiles.ts:100-105
- src/agents/auth-profiles/profiles.ts:83-87
Elsewhere provider IDs are normalized before comparison. Here, direct string equality is used, which can fail when providers differ only by case/aliasing, preventing lastGood from being updated despite a matching provider.
Recommendation
Normalize both sides with normalizeProviderId when comparing provider values and consider using the normalized key when updating lastGood.