Skip to content

feat: durable delivery stages and follow-up snapshots (package 2) - #86

Draft
nikolajIvanov wants to merge 2 commits into
diwenne:mainfrom
nikolajIvanov:feat/upstream-delivery-reliability
Draft

nikolajIvanov wants to merge 2 commits into
diwenne:mainfrom
nikolajIvanov:feat/upstream-delivery-reliability

Conversation

@nikolajIvanov

@nikolajIvanov nikolajIvanov commented Oct 3, 2026 •

Copy link
Copy Markdown

Package 2: durable delivery reliability (dependent draft)

Depends on creator workflow #85. This branch includes that prerequisite commit, so the upstream diff is cumulative. The delivery-only review is the package commit or the package-only comparison.
Please review/merge #85 first; this draft can then be rebased to a small standalone diff. Do not merge prerequisite changes twice.

Changes

  • Additive DeliveryEvent migration, durable stage claims and a workspace-scoped, sanitized delivery history.
  • Freeze trigger selection and follow-up content/version. Recover missing Redis enqueue operations from PostgreSQL.
  • Verify actual interaction timestamps, the 24-hour window, account connection and recipient identity before follow-ups.
  • Keep successful or ambiguous claims from being automatically resent. Confirmed postback retries record their current message and campaign version consistently.
  • Native PostgreSQL upserts fix concurrency races reproduced by parallel real-database tests; persistence failures release reserved quota.

Verification

  • 390 tests / 35 files passed with real PostgreSQL, including repeated concurrency probes.
  • Full TypeScript, targeted ESLint, diff checks and an actual production build passed with the exact upstream lockfile.
  • Independent review found and retested the race and postback-version fixes. Changed files were reviewed for private data.
  • No real Meta send or production deployment was performed.

Operational boundaries

Apply migrations before starting the new web and worker versions. Review docs/delivery-retries.md before release.
Ambiguous/crashed claims deliberately require manual reconciliation; this is not an exactly-once network delivery guarantee.
Zernio currently does not forward a verified interaction timestamp in normalization, so follow-ups fail closed as SKIPPED on that path.
This package naturally resolves the existing nullable operationId type error in the modified worker flow; it does not silently alter unrelated code.
No ServiceKey/MCP/conversion functionality, auth/SMTP changes, Docker changes or dependency changes are included in the delivery-only commit. Existing upstream dependency audit findings remain outside this package.

@vercel

vercel Bot commented Oct 3, 2026

Copy link
Copy Markdown

@nikolajIvanov is attempting to deploy a commit to the diwenne's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

1 participant