Added gift delivery outcome handling - #29969
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 56s | View ↗ |
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 7m 12s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 34s | View ↗ |
nx run-many -t test:unit -p ghost,@tryghost/com... |
✅ Succeeded | 30s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 23s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 16s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 21s | View ↗ |
nx run @tryghost/comments-ui:test:acceptance |
✅ Succeeded | 40s | View ↗ |
Additional runs (4) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-18 17:34:15 UTC
ea544c6 to
7e60f47
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## agent/ber-3853-gift-delivery-portal #29969 +/- ##
======================================================================
Coverage ? 75.21%
======================================================================
Files ? 1621
Lines ? 144404
Branches ? 17858
======================================================================
Hits ? 108609
Misses ? 34791
Partials ? 1004
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e60f47397
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (labs.isSet('giftSubCustomization')) { | ||
| gifts.init({ |
There was a problem hiding this comment.
Initialize gift analytics independently of the Labs flag
When giftSubCustomization is enabled through Labs after the process has booted, checkout immediately permits emailed gifts, and sendDelivery() schedules the recurring gift job, but this conditional means the gifts wrapper never subscribed to StartGiftEmailAnalyticsJobEvent. The job therefore emits events with no listener, so delivery outcomes and permanent-failure buyer notifications remain disabled until Ghost restarts; initialize the wrapper unconditionally at boot and gate only job scheduling/feature entry points.
AGENTS.md reference: AGENTS.md:L191-L192
Useful? React with 👍 / 👎.
7e60f47 to
414a72c
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
414a72c to
8f939e7
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
8f939e7 to
cfc85b4
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
cfc85b4 to
4b2dff9
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
4b2dff9 to
24f4843
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
24f4843 to
b12f2fb
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
b12f2fb to
703cae6
Compare
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 32049762915 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
236f9b5 to
fc42ac8
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
fc42ac8 to
6d94d68
Compare
6d94d68 to
946313a
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
946313a to
3a25d5b
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 32137456437 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
3a25d5b to
124503f
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 32140757906 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
124503f to
f1bf562
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
f1bf562 to
ee120f6
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
ee120f6 to
51dd523
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.
ref https://linear.app/ghost/issue/BER-3851 Accepted gift deliveries already store Mailgun's provider message ID. They now schedule analytics collection, which fetches Mailgun events, matches them to delivery records, and stores delivered, temporary-failure or permanent-failure outcomes with timestamps and provider error details. Temporary failures are recorded without resending because Mailgun remains responsible for retrying them. When Mailgun reports a permanent failure, Ghost sends the buyer a tracking-disabled transactional notification containing the recipient address and original redemption link, provided the gift is still valid. This adds the outcome schema and provider-message index, analytics processor and recurring job wiring, failure template and translations, narrow tracking-disable support for GhostMailer, and coverage for event processing and buyer notification behavior.
51dd523 to
2a569fe
Compare
There was a problem hiding this comment.
🌐 Automated translation review
Verdict: ⏭️ Skipped — PR is too large for automated review
Reviewed 0 translations across 61 files.
This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.
Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.

What changed
Why
Mailgun owns delivery and retry behavior after accepting an email, but Ghost still needs to distinguish eventual delivery from temporary and permanent failures. Recording those outcomes provides that visibility without introducing a second retry mechanism that could duplicate Mailgun's work.
When delivery is permanently rejected, notifying the buyer with the existing redemption link gives them a usable fallback without changing or reissuing the gift.
ref https://linear.app/ghost/issue/BER-3851