Repository navigation
fix(workflows): retry ses-throttled emails instead of dropping them - #112295
trunk-io[bot] merged 2 commits into
Conversation
The SES throttle reschedule did not re-attach the email queue parameters, so the retry resumed the Hog VM and the email was never sent. Re-attach them, the same way as the per-workflow and team cap reschedules. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
😎 Merged successfully - details. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughWhen SES returns a recognized throttle error, Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Throttled emails retain the information needed for a retry. No merge-blocking issue was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The fix preserves the existing retry mechanism and retains tenant, sender, suppression, and cancellation controls. One unresolved privacy question is whether a delayed marketing retry respects an unsubscribe made after the original send was authorized. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Risk: No findings The change since the last review removes two explanatory comments only; the production fix — re-attaching Sentinel reviewed |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Problem
createInvocationResultclears them.emailqueue parameters (hog-executor-async.service.ts#L127). It resumes the Hog VM instead (#L196), so the send is skipped.Warning
🟡 Merge risk: medium (merge-risk rubric)
Changes
result.invocation.queueParameters = params, the same as the other two reschedule paths.queuePriority.Not fixed here: the retry charges the cap twice
claimTeamSendingBudgetruns before the SES call (#L556). Inenforcemode it takes the tokens atomically (#L762).RateLimiterServicehas no refund or release method, and the throttle branch returns no tokens.How did you test this code?
Test rationale: the existing SES throttle
it.eachinemail.service.test.tsnow asserts that the reschedule carries the email queue parameters. It failed on master withReceived: undefinedfor both throttle errors, and it passes with the fix. The pacing reschedule test already makes the same assertion. The throttle path had no such check.Run locally, not committed: an e2e probe in
workflows-e2e.serial.test.ts(the email queue block). It makes the first maildev send throwSESThrottleError, then counts the run's metrics.email_sentRelease status
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (claude-opus-5-5)
/tdd,/writing-tests,/writing-code-comments,/writing-pr-descriptions,merge-risk.🤖 Generated with Claude Code