Skip to content

Consolidate three parallel tracks: signup school/sector, buyer lifecycle emails, schema safety - #22

Closed
lauurnce wants to merge 1 commit into
mainfrom
release/consolidation-2026-08-23
Closed

lauurnce wants to merge 1 commit into
mainfrom
release/consolidation-2026-08-23

Conversation

@lauurnce

Copy link
Copy Markdown
Owner

Consolidates the work of three concurrent sessions onto one reviewable branch, on top of the 17 contributed fixes merged in #21.

What's in here

  • Signup school + sector — students pick their school (acronym-aware combobox over 50 institutions) and its Public/Private sector; landmark art preview; validated before signUp so a failed account never strands a half-saved school.
  • Buyer lifecycle emails — Resend wrapper, 4 templates, an email_outbox queue drained by a daily cron. Outbox rather than inline send because recordPayment is idempotent: on a PayMongo retry it returns early, so an inline send that failed would be lost forever.
  • Schema safety — reads now select("*") and map defensively, so a lagging column costs one field instead of blanking every profile. Plus a preflight gate (npm run db:check) that fails the build when the DB is behind the code.
  • Migration CI harness — postgres:16 service applies every migration to a throwaway DB, and separately replays the production baseline then applies consolidated-pending.sql on top.
  • Unlock pricing — checkout now requires sign-in, but prices stay visible to signed-out visitors (they were briefly hidden behind the auth wall on a funnel converting at ~1.1%).

Why this PR exists

Primarily to make CI actually run. The migration harness had never executed against a real Postgres — this PR is what proves the consolidated SQL applies cleanly before it is pasted into production.

Do not merge until

  1. db-migrations CI is green here.
  2. The six pending migrations have been applied to production before this merges. Merging first is a visible regression, not just a gap for new users: signup would silently drop every new student's school, since a write cannot degrade the way a tolerant read can.

Pending migrations, in order: 20260821010000_profiles_school_type, 20260821020000_admin_profiles_agg_school_type, 20260822000000_email_outbox, 20260822000003_restrict_privileged_rpcs, 20260822000004_server_only_public_writes, 20260822000005_server_only_feedback_inserts.

Verified locally

tsc --noEmit clean · next lint clean · 821 tests passing across 86 files.

Still open on their own branches: dual-secret rotation (unblocks #14), rate-limiter payment exemption (unblocks #20), and the university sector audit.

@vercel

vercel Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
survival-kit-app Ready Ready Preview Aug 23, 2026 12:26am

@lauurnce

Copy link
Copy Markdown
Owner Author

Landed in main via 332c668 — rebased onto current main and re-validated under Next 16.3.2 as part of today's merge queue (full gates green: tsc / vitest / lint / build). Thanks @mikeascendx for the contribution — authorship preserved in the rebased commit.

@lauurnce lauurnce closed this Aug 25, 2026

This branch was successfully deployed

1 active deployment
Preview — 478ca880 Deployed Aug 23, 2026 by vercel[bot]
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