Skip to content

fix: fix email exclusion validation for full emails and and @-prefixed domains#26727

Merged
anikdhabal merged 7 commits intomainfrom
exclude-emails
Jan 13, 2026
Merged

fix: fix email exclusion validation for full emails and and @-prefixed domains#26727
anikdhabal merged 7 commits intomainfrom
exclude-emails

Conversation

@anikdhabal
Copy link
Contributor

@anikdhabal anikdhabal commented Jan 12, 2026

Summary by cubic

Updated booking email validation to correctly handle exact email exclusions and "@-prefixed" domains. The same logic is applied to required emails for consistency.

  • Bug Fixes
    • Support three formats in exclude/require lists: "@domain.com", "user@domain.com", "domain.com".
    • Case-insensitive matching for emails and domains.
    • Added tests for full email exclusion and "@Domain" handling.

Written for commit 26552df. Summary will update on new commits.

@anikdhabal anikdhabal requested a review from a team as a code owner January 12, 2026 03:39
@graphite-app graphite-app bot added the core area: core, team members only label Jan 12, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 2 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/features/bookings/lib/getBookingResponsesSchema.ts">

<violation number="1" location="packages/features/bookings/lib/getBookingResponsesSchema.ts:213">
P2: Domain matching is case-sensitive while full email matching is case-insensitive. This inconsistency will cause domain exclusions/requirements to fail when the case differs (e.g., '@GMAIL.COM' won't match 'user@gmail.com'). Email domains are case-insensitive per RFC 5321.</violation>

<violation number="2" location="packages/features/bookings/lib/getBookingResponsesSchema.ts:235">
P2: Same case-sensitivity inconsistency in required emails validation. Domain matching should also be case-insensitive for consistency and RFC compliance.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Contributor

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/features/bookings/lib/getBookingResponsesSchema.ts">

<violation number="1" location="packages/features/bookings/lib/getBookingResponsesSchema.ts:36">
P2: Domain matching is case-sensitive while full email matching is case-insensitive. This inconsistency may cause unexpected behavior when users enter domains in different cases. Consider normalizing both `bookerEmail` and `entry` to lowercase for domain comparisons.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Contributor

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

@anikdhabal anikdhabal enabled auto-merge (squash) January 12, 2026 03:57
hariombalhara
hariombalhara previously approved these changes Jan 12, 2026
Copy link
Member

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !!

Though I find it a bit weird to match john@example.com, if I just specify example.com.

@vercel vercel bot temporarily deployed to Preview – cal-companion January 13, 2026 08:46 Inactive
@vercel vercel bot temporarily deployed to Preview – dev January 13, 2026 08:47 Inactive
Copy link
Contributor

@pedroccastro pedroccastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!! 👍

@anikdhabal anikdhabal merged commit ce99744 into main Jan 13, 2026
77 of 78 checks passed
@anikdhabal anikdhabal deleted the exclude-emails branch January 13, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments