Skip to content

fix(core): prevent duplicate abandoned cart reminders - #144

Open
alexasomba wants to merge 1 commit into
emdashCommerce:mainfrom
alexasomba:codex/abandoned-cart-reminder-claim
Open

alexasomba wants to merge 1 commit into
emdashCommerce:mainfrom
alexasomba:codex/abandoned-cart-reminder-claim

Conversation

@alexasomba

@alexasomba alexasomba commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Claim each cart lifetime in plugin storage before contacting the email transport. Overlapping scans send only once, and an uncertain transport response retains the claim. The scan reads the cart again before sending and no longer writes an older cart snapshot back.

Existing cart reminder timestamps are still read. After a rollback, the previous scanner reads the cart timestamp only. A reminder recorded solely in the new claim collection may be sent again.

Validation

Core typecheck and all 365 Core tests passed. The regression covers overlapping scans, uncertain delivery, preservation of cart edits, and a new cart using the same session.

@cavewebs

cavewebs commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this. It now conflicts with main in storage-collections.ts after the latest merges, could you rebase onto main? I'll merge it once CI is green.

@alexasomba
alexasomba force-pushed the codex/abandoned-cart-reminder-claim branch from 8d34b81 to 3bed333 Compare December 4, 2026 05:39
@alexasomba

alexasomba commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for flagging the conflict, @cavewebs. I rebased onto main and resolved the storage overlap, keeping both the refund dispatch and abandoned-cart reminder collections. GitHub reports the PR as mergeable, and all 11 checks passed on 3bed333. CI run

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