Repository navigation
docs(changelog): sync CHANGELOG.md for Wave 2 (#273, #77, #291, #308, #92, #303) - #311
Conversation
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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
|
Summary
Syncs
CHANGELOG.mdondevfor the Wave 2 deliverables ahead of Production promotion (matching commitc5956769/ PR #300 conventions):#306to the existing Follow-ups from the #64 reviews (send-back race, suspended-before-start recovery) #77 entry (#77 / #306).backcampaigns,payment_account_changedin-app notice,pledge_account_swappedtransactional email, shared anti-leak masking helpers, and DB (DOS.Me): give.campaign_members, single-use invite links & owner-only money boundary for #253 #264 owner-only boundary).paymentAccounts(), cron step/expiry batch isolation, stalled-batch detection, zero-PII structured error logs) and Monthly donations A: notify active plan donors when the receiving account is replaced #291 / feat(email): notify active monthly plan donors when receiving account is replaced (Refs #291) #307 (plan_account_swappedemail template, strict last-4 masking, stop/unsubscribe headers, and admin outbox labels).CLAIM_TIMEOUT_MS, aborted-claim logging, JWTrefproduction DB detection) and Update docs/product-owner-config.md: promotion_po: any and Antigravity takeover of Money/Platform while Claude PO is quota-limited #303 / docs(po): set promotion_po to any and record Antigravity takeover #304 (PO config update:promotion_po: any, Antigravity PO takeover across all 3 lines, local DB ban reference).DOS/DOS.Meorigin/dev:20261130140000_give_back_campaign_account_swap(Recover a live or suspended back campaign whose receiving account became unusable #92 / DOS/DOS.Me#1873, 66 assertions)20261130130000_give_plan_account_swap_notice(Monthly donations A: notify active plan donors when the receiving account is replaced #291 / DOS/DOS.Me#1871, 53 assertions)20261130120000_give_campaign_sendback_and_suspended_recovery(Follow-ups from the #64 reviews (send-back race, suspended-before-start recovery) #77 / DOS/DOS.Me#1872, 62 assertions)20261130110000_give_outbox_followups(Email outbox follow-ups from the #254 second reviews #273 / DOS/DOS.Me#1870, 31 assertions)README.mdkept untouched (no new routes or outdated documentation).Verification
pnpm format:check— PASSpnpm lint— PASS📌 TL;DR
This PR implements finance-approved receiving-account swaps for
backcampaigns and monthly plan donors, including masked email notifications and strict PII protection. It also hardens the email outbox infrastructure, adds atomic status guards for campaign recovery, and updates Product Owner configuration policies.🎯 Type of Change
🔍 Changes Walkthrough
CHANGELOG.mdapps/web/src/server/contributions/index.tspaymentAccounts()helper with bounded concurrency (max 5) and per-campaign error isolation; skips RPCs for ended plans.apps/web/src/server/plans/jobs.tsapps/web/src/server/email/templates.tspledge_account_swappedandplan_account_swappedemail templates with masked account details and specific CTA links.apps/web/src/lib/email-outbox.tsapps/web/src/server/email/outbox.tsCLAIM_TIMEOUT_MSto 15s and improves abort signal handling to detect committed leases after timeouts.apps/web/src/server/email/provider.tsusesProductionDatabaseto inspect JWTrefclaims in Supabase keys, ignoring opaque or malformed tokens.docs/product-owner-config.mdany(Antigravity/Claude), records JOY's takeover, and documents the local DB ban policy.lib/notices.tspayment_account_changedin-app notice and wires it intoasksForPaymentto suppress payment CTAs when stopped.lib/plans.tscurrentPlanDonation()andvnMonthStartlogic to optimize contribution page loads.lib/errors.tsserver/email/templates.tsapps/web/src/me/campaigns/[id]ReceivingAccountSectionandAccountSwapBlockto support finance-approved swaps forbackcampaigns.apps/web/src/admin/account-swapsgive.request_account_swap(DB)backcampaigns inlive,suspended,changes_requested, andsucceededstates.give.transition_campaign(DB)p_expected_statusguard for atomic status transitions and allows moderator recovery for never-live campaigns.give.campaigns_needing_recovery(DB)approved_past_end,suspended_before_start).give.outbox_on_account_swap(DB)give.claim_outbox(DB)plan_not_active,account_superseded) and mints fresh stop tokens.give.purge_outbox(DB)FOR UPDATE SKIP LOCKEDbatching, protects in-flight sends, and caps hold times for payment reminders.20261130140000_give_back_campaign_account_swappayment_duenotices.20261130130000_give_plan_account_swap_notice20261130120000_give_campaign_sendback_and_suspended_recovery20261130110000_give_outbox_followups📊 Architectural Flow
sequenceDiagram participant Admin as Admin/Finance participant Web as Web App (Next.js) participant DB as PostgreSQL (DOS.Me) participant Outbox as Email Outbox participant Email as Email Provider Admin->>Web: Approve Account Swap Web->>DB: Call give.decide_account_swap DB->>DB: Update campaign account DB->>DB: Trigger give.outbox_on_account_swap DB->>Outbox: Enqueue masked notification rows (plan_account_swapped / pledge_account_swapped) Note over Outbox: Cron Job / Claim Process Outbox->>DB: Claim outbox rows (FOR UPDATE SKIP LOCKED) DB->>Outbox: Return rows with fresh stop tokens Outbox->>Outbox: Re-check status (plan_not_active, account_superseded) Outbox->>Email: Send masked email (last 4 digits only) Email-->>Donor: Notification with CTA to update payment info