Repository navigation
Clear stale send_at when unscheduling an email - #154
Open
pcbeingused33 wants to merge 1 commit into
Open
pcbeingused33 wants to merge 1 commit into
pcbeingused33 wants to merge 1 commit into
Conversation
[Low risk] No findings. SummaryRecomputes send_at on every serialization so cleared schedules are omitted
What's good
Review context · 0/5 commands
Reviews (1) · Last reviewed commit: "fix: clear stale send_at when unscheduli..." · claude-sonnet-5-5 |
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.
Fixes #111
bulkSendnow serializes each email through the shared serializer, which setssend_atwhensendAtis present, but it never clears the derived timestamp. When anEmailthat was already sent with a schedule is reused aftersetSendAt(null), the previoussend_atis still sent. This change recomputes the timestamp on every serialization, as suggested in the issue, sosend_atis omitted once the schedule is cleared.The existing bulk-send test now also clears the schedule on the first email and sends the same two emails again. It checks that the first email no longer carries
send_atand that the second keeps its own timestamp. The new assertion fails on main and passes with the fix.This change was prepared with assistance from OpenAI Codex.