fix(users): populate derived emails for bots and deletions#3459
fix(users): populate derived emails for bots and deletions#3459markijbema wants to merge 3 commits into
Conversation
| await db.insert(kilocode_users).values({ | ||
| id: botId, | ||
| google_user_email: botEmail, | ||
| normalized_email: botEmail, |
There was a problem hiding this comment.
WARNING: normalized_email is set to the raw botEmail without calling normalizeEmail(), while the web-app bot creation path (bot-user-service.ts:58) consistently calls normalizeEmail(botEmail). Bot emails are already lowercase with no + aliases, so in practice the result is identical today — but the inconsistency could silently diverge if generateBotUserEmail ever produces mixed-case output. Consider passing through normalizeEmail(botEmail) here for parity.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe webhook-agent-ingest bot creation path sets Overview
Issue Details (click to expand)WARNING
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by claude-sonnet-4.6 · 1,016,940 tokens Review guidance: REVIEW.md from base branch |
Summary
normalized_emailandemail_domainwhenever web and webhook-ingest bot users are created, using the same tested.internaldomain derivation in both paths.deleted-<id>@deleted.invalidtombstones and retain corresponding derived email values without preserving the original address.deleted+<id>@deleted.invalidemails that collapse under plus-alias normalization.Verification
Visual Changes
N/A
Reviewer Notes
deleted.invaliddomain when domain aggregations include them..internalemail-domain extraction and deletion tombstone/backfill behavior.