Repository navigation
Conversation
* docs(po): set promotion_po to any and record Antigravity takeover * docs(po): clarify takeover label swap, claim release, and acceptance scope
… and alert on cron failures (Refs #308) (#309) Addresses all 4 app-only P3 follow-ups from #290 (zero DB migrations): - Add deduped, bounded-concurrency paymentAccounts() helper (max 5 in flight, per-campaign error isolation) and skip payment_account RPCs on /me/contributions for plans without a payable current-month donation; run usable-account and pledge-balance lookups in parallel with one consistent clock. - Move misplaced ContributionList doc comment above ContributionList in apps/web/src/app/me/contributions/page.tsx. - Isolate cron steps in issue-plan-donations and plan-notices within the shared deadline; drain multi-batch expire_plan_donations (500/batch), isolate batch errors without losing earlier counts, and detect/alert stalled bad batches without breaching the maxDuration budget. - Emit structured zero-PII JSON error logs (plan_cron.failed_outcomes, plan_job.plan_failed, plan_job.expire_batch_stalled/failed) whenever monthly plan cron jobs record 'failed' outcomes or errors.
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.
|
|
Caution Review failedThe pull request is closed.
Warning Some tools did not complete. Review the errors below.
|
|
PO acceptance: merge at cb46d9b JOY approved Step 2 Production promotion (dev -> main).
|
Production Promotion — Give Wave 2 (2026-11-22)
Owner-approved Production promotion (
promotion_po: any, JOY popup approval on 2026-11-22 19:19+07:00).Prerequisite Step 1 — Production DB (
DOS/DOS.Memain) VERIFIED GREENDOS/DOS.Me#1876(selective-promotion, merge commit2cc2bb293015f39826fcb7f8aa90ad9e14757697)gulptwduchsjcsbndmua):Supabase Previewcheck run137208152876— COMPLETED / SUCCESS (2026-11-22T12:28:33Z)20261129180000:20261130110000_give_outbox_followups.sql(DOS/DOS.Me#1870, Refs#273)20261130120000_give_campaign_sendback_and_suspended_recovery.sql(DOS/DOS.Me#1872, Refs#77)20261130130000_give_plan_account_swap_notice.sql(DOS/DOS.Me#1871, Refs#291)20261130140000_give_back_campaign_account_swap.sql(DOS/DOS.Me#1873, Refs#92)Included
DOS/GivedevCommits (7 commits ahead ofmaind2df5d88)c0202efdocs(po): setpromotion_po: anyand record Antigravity takeover (#304,#303)6c69036fix(email): lengthen claim timeout with abort logging and harden prod DB JWT ref check (#305, Refs#273)9deab36feat(admin): atomic expected-status guard and pre-launch recovery queue (#306, Refs#77)98d9558feat(email): addplan_account_swappedtemplate, copy and admin labels (#307, Refs#291)dd40557chore(monthly): batchpayment_accountlookup, isolate expiry batches, and alert on cron failures (#309, Refs#308)581915efeat(give): support account swaps forbackcampaigns andpayment_duenotices (#310, Refs#92)cb46d9bdocs(changelog): syncCHANGELOG.mdfor Wave 2 (#311)Rollback Plan
d2df5d8847dfdb4dd053c29fd41dc114be301127if any post-deploy smoke check regresses; all 4 DB migrations are additive and backwards-compatible.--merge(merge commit; no back-merge todevneeded sincedevshares identical tree as parent 2).📌 TL;DR
This PR introduces atomic status-transition race guards and a pre-launch recovery queue for moderators, extends receiving-account swap capabilities to
backcampaigns with pledge notifications, and hardens monthly donation cron jobs with structured error logging and step isolation.🎯 Type of Change
🔍 Changes Walkthrough
CHANGELOG.mdapps/web/src/app/admin/actions.tsp_expected_statustotransition_campaignRPCs to prevent race conditions. ExtendsrequestChangesto supportsuspendedstatus and maps new error codes.apps/web/src/app/admin/page.tsx#recoverysection to the admin dashboard to display campaigns needing pre-launch recovery (approved past end date or suspended before start).apps/web/src/app/admin/account-swaps/page.tsxbackcampaigns. Checks for pending payments to enable approval and displays relevant context.apps/web/src/app/admin/account-swaps/actions.tsapps/web/src/app/api/cron/issue-plan-donations/route.tssweepPlansandexpirePlanDonationssteps. Adds structured error logging and handles stalled batches.apps/web/src/app/api/cron/plan-notices/route.tsplan_end_noticesandplan_followupssteps. Adds structured error logging.apps/web/src/app/admin/actions.test.tsapps/web/src/app/admin/page.test.tsapps/web/src/app/admin/account-swaps/page.test.tsbackcampaigns with and without pending payments.apps/web/src/app/api/cron/issue-plan-donations/route.test.tsapps/web/src/app/api/cron/plan-notices/route.test.ts📊 Architectural Flow
sequenceDiagram participant Moderator participant AdminUI participant Server participant DB Note over Moderator, DB: Atomic Status Transition Guard Moderator->>AdminUI: Approve Campaign AdminUI->>Server: approveCampaign(campaignId) Server->>DB: transition_campaign(p_expected_status: 'in_review') alt Status Changed (Race Condition) DB-->>Server: Error 40001 (GIVE_CAMPAIGN_STATUS_CHANGED) Server-->>AdminUI: Error Message (Reload Required) else Success DB-->>Server: Success Server->>DB: transition_campaign(p_expected_status: 'approved') DB-->>Server: Success Server-->>AdminUI: Success Message end Note over Moderator, DB: Pre-launch Recovery Queue AdminUI->>Server: Load Admin Page Server->>DB: campaigns_needing_recovery() DB-->>Server: List of Recovery Campaigns Server-->>AdminUI: Render Recovery Section Moderator->>AdminUI: Request Changes (Suspended) AdminUI->>Server: requestChanges(campaignId, from_status: 'suspended') Server->>DB: transition_campaign(p_expected_status: 'suspended') DB-->>Server: Success Server-->>AdminUI: Success Message