Skip to content

feat: add received_for to received email type#122

Merged
jayanratna merged 1 commit into
mainfrom
feat/received-for
Jun 26, 2026
Merged

feat: add received_for to received email type#122
jayanratna merged 1 commit into
mainfrom
feat/received-for

Conversation

@lucasfcosta

@lucasfcosta lucasfcosta commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Adds the received_for field to the received email response type, matching the API.


Summary by cubic

Add received_for to the received email response to match the API and expose forwarding recipients. Updated fixtures and service tests to include and assert received_for.

Written for commit 14c361a. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 3 files

Confidence score: 4/5

  • In tests/Fixtures/Emails/Receiving.php, inboundEmails() is missing received_for while inboundEmail() includes it, so list-vs-single fixtures no longer model the same resource and tests can silently miss response-shape regressions—add received_for to inboundEmails() before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tests/Fixtures/Emails/Receiving.php">

<violation number="1" location="tests/Fixtures/Emails/Receiving.php:17">
P2: inboundEmails() fixture is missing the 'received_for' field that was just added to inboundEmail(). These fixtures represent the same email resource; omitting it creates an inconsistency that can mask bugs in list-response handling.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

'bcc' => [],
'cc' => [],
'reply_to' => [],
'received_for' => ['forwarded@example.com'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: inboundEmails() fixture is missing the 'received_for' field that was just added to inboundEmail(). These fixtures represent the same email resource; omitting it creates an inconsistency that can mask bugs in list-response handling.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tests/Fixtures/Emails/Receiving.php, line 17:

<comment>inboundEmails() fixture is missing the 'received_for' field that was just added to inboundEmail(). These fixtures represent the same email resource; omitting it creates an inconsistency that can mask bugs in list-response handling.</comment>

<file context>
@@ -14,6 +14,7 @@ function inboundEmail(): array
         'bcc' => [],
         'cc' => [],
         'reply_to' => [],
+        'received_for' => ['forwarded@example.com'],
         'message_id' => '<example+123>',
         'attachments' => [
</file context>

@jayanratna jayanratna merged commit 24e4f05 into main Jun 26, 2026
10 checks passed
@jayanratna jayanratna deleted the feat/received-for branch June 26, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants