Skip to content

release(prod): promote Give Wave 2 (#273, #77, #291, #308, #92, #303, CHANGELOG) - #312

Merged
JOY (JOY) merged 7 commits into
mainfrom
dev
Nov 22, 2026
Merged

JOY (JOY) merged 7 commits into
mainfrom
dev

Conversation

@JOY

@JOY JOY (JOY) commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

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.Me main) VERIFIED GREEN

  • PR: DOS/DOS.Me#1876 (selective-promotion, merge commit 2cc2bb293015f39826fcb7f8aa90ad9e14757697)
  • Production Supabase (gulptwduchsjcsbndmua): Supabase Preview check run 137208152876 — COMPLETED / SUCCESS (2026-11-22T12:28:33Z)
  • 4 verbatim Give migrations applied strictly monotonically above 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/Give dev Commits (7 commits ahead of main d2df5d88)

  • c0202ef docs(po): set promotion_po: any and record Antigravity takeover (#304, #303)
  • 6c69036 fix(email): lengthen claim timeout with abort logging and harden prod DB JWT ref check (#305, Refs #273)
  • 9deab36 feat(admin): atomic expected-status guard and pre-launch recovery queue (#306, Refs #77)
  • 98d9558 feat(email): add plan_account_swapped template, copy and admin labels (#307, Refs #291)
  • dd40557 chore(monthly): batch payment_account lookup, isolate expiry batches, and alert on cron failures (#309, Refs #308)
  • 581915e feat(give): support account swaps for back campaigns and payment_due notices (#310, Refs #92)
  • cb46d9b docs(changelog): sync CHANGELOG.md for Wave 2 (#311)

Rollback Plan

  • Instant Vercel Production rollback to d2df5d8847dfdb4dd053c29fd41dc114be301127 if any post-deploy smoke check regresses; all 4 DB migrations are additive and backwards-compatible.
  • Merge strategy: --merge (merge commit; no back-merge to dev needed since dev shares 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 back campaigns with pledge notifications, and hardens monthly donation cron jobs with structured error logging and step isolation.

🎯 Type of Change

  • 🚀 New feature
  • 🐛 Bugfix
  • 🧹 Refactor
  • ⚡ Performance
  • 📚 Documentation
  • ⚙️ CI / Configuration

🔍 Changes Walkthrough

File Summary of Changes
CHANGELOG.md Documents new features: atomic status guards, recovery queue, back-campaign account swaps, plan donor notifications, and cron hardening.
apps/web/src/app/admin/actions.ts Adds p_expected_status to transition_campaign RPCs to prevent race conditions. Extends requestChanges to support suspended status and maps new error codes.
apps/web/src/app/admin/page.tsx Adds a new #recovery section 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.tsx Updates the account swap review UI to support back campaigns. Checks for pending payments to enable approval and displays relevant context.
apps/web/src/app/admin/account-swaps/actions.ts Updates success messages for account swaps to reflect notifications sent to backers. Adds revalidation for pledge and notice pages.
apps/web/src/app/api/cron/issue-plan-donations/route.ts Refactors cron logic to isolate sweepPlans and expirePlanDonations steps. Adds structured error logging and handles stalled batches.
apps/web/src/app/api/cron/plan-notices/route.ts Refactors cron logic to isolate plan_end_notices and plan_followups steps. Adds structured error logging.
apps/web/src/app/admin/actions.test.ts Adds tests for atomic status guards, race condition error mapping, and suspended campaign recovery.
apps/web/src/app/admin/page.test.ts Adds tests for the new recovery section, including rendering, error isolation, and form behavior.
apps/web/src/app/admin/account-swaps/page.test.ts Adds tests for the updated account swap page, specifically for back campaigns with and without pending payments.
apps/web/src/app/api/cron/issue-plan-donations/route.test.ts Adds tests for structured error logging, stalled batch detection, and step isolation.
apps/web/src/app/api/cron/plan-notices/route.test.ts Adds tests for structured error logging and step isolation.

📊 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
Loading

* docs(po): set promotion_po to any and record Antigravity takeover

* docs(po): clarify takeover label swap, claim release, and acceptance scope
…ue (#77) (#306)

* feat(admin): wire expected-status guard and pre-launch recovery queue (Refs #77)

* fix(admin): handle foreign/unverified transaction edge cases in recoveryAdvice (#77)
… 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.
@JOY JOY (JOY) added the po:agy Owned by Antigravity PO (mutual-exclusion parallel PO label) label Nov 22, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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.

@vercel

vercel Bot commented Nov 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
give Ready Ready Preview Nov 22, 2026 12:31pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/src/app/admin/account-swaps/actions.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

apps/web/src/app/admin/account-swaps/page.test.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

apps/web/src/app/admin/account-swaps/page.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 40 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

dos[bot]
dos Bot approved these changes Nov 22, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (45 eligible files · 239,900 chars · 1 model call(s) · 8 PR unit(s))

Whole diff with bounded context at base c595676 / head cb46d9b.

✅ CLEAN_PASS: Complete diff reviewed

@JOY

Copy link
Copy Markdown
Contributor Author

PO acceptance: merge at cb46d9b

JOY approved Step 2 Production promotion (dev -> main).

  • Step 1 Production DB (DOS/DOS.Me#1876, merge commit 2cc2bb293015f39826fcb7f8aa90ad9e14757697) confirmed COMPLETED/SUCCESS on Production Supabase (gulptwduchsjcsbndmua).
  • Required CI checks (Verify build/Lint, Verify build/Build all apps), DOScout, and Vercel Preview all SUCCESS (0 failing).
  • Merging via --merge (no delete-branch, dev preserved).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

po:agy Owned by Antigravity PO (mutual-exclusion parallel PO label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant