Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #123902, which puts the same run id on more email events. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
message_id, and no engagement event carries it.Warning
🟡 Merge risk: medium · one-way door: events captured before a revert keep the property (merge-risk rubric)
Changes
$workflow_run_id: sent and failed at send time, plus opened, clicked, bounced and the rest from tracking.$workflows_email_unsubscribedand$workflows_email_tracking_consent_updateddon't carry it. The preferences page emits them, and its token holds only the team and the recipient.$workflow_run_idis the name$workflows_conversionalready uses, so a query joins a run's sends, engagement and conversions on one key.message_id, so code senders can join on it too.$workflow_action_idtells them apart.How did you test this code?
Test rationale: two assertions, one per place that builds these events.
email.service.test.ts: the existing$workflows_email_sentcapture test now also checks$workflow_run_id.email-tracking.service.test.ts: a new test clicks a signed link and checks the captured$workflows_email_link_clickedevent. No existing test checked the properties of a tracked engagement event.$workflow_run_idequal to the run id from the CDP log.invocationIdfrom the signed header and builds the event in the sametrackMetriccall.Release status
Docs update
The engagement events docs can list
$workflow_run_idonce this ships. That follows with the link tagging change, which builds on it.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5
$workflow_run_idwas chosen over$message_idbecause a workflow run can send more than one email./writing-tests,/writing-pr-descriptions,merge-risk.gh pr list --search "workflow_run_id email"found no open PR.🤖 Generated with Claude Code