Skip to content

fix: close ApplyGuard production release blockers - #2

Draft
yuzuruu29 wants to merge 17 commits into
mainfrom
fix/production-release-blockers
Draft

fix: close ApplyGuard production release blockers#2
yuzuruu29 wants to merge 17 commits into
mainfrom
fix/production-release-blockers

Conversation

@yuzuruu29

Copy link
Copy Markdown
Owner

Status

Draft — do not merge yet

This PR addresses the production release blockers identified during the ApplyGuard PH Haiku 4.5, Pro Preview, PayPal, and usage-ledger review.

Objective

Make the ApplyGuard PH AI and payment rollout safe to deploy by correcting:

  • Supabase migration and Edge Function deployment
  • Paid monthly quota enforcement
  • Trial feature identifier consistency
  • AI reservation cleanup
  • Production security headers
  • Premium entitlement expiration handling

Implemented changes

CI/CD

  • Replaced obsolete PayMongo function deployments with:
    • ai-proxy
    • create-paypal-order
    • capture-paypal-order
    • paypal-webhook
    • download-message-pack
  • Added production database migration deployment using GitHub secrets.

Usage and entitlements

  • Added a 60-request monthly limit for paid Pro users.
  • Required a non-null, unexpired current_period_end for paid access.
  • Aligned trial quota identifiers with the feature names transmitted by ai-proxy:
    • message
    • deepscan
    • resume
    • interview
    • interview_voice
    • backgroundcheck

AI proxy reliability

  • Added cleanup for provider errors, empty responses, timeouts, and network failures.
  • Added handling for monthly quota and daily-budget reservation errors.

Security

  • Added CSP, HSTS, and Permissions Policy headers to the Vercel deployment configuration.
  • Confirmed that the historical sk-ant-xxx value is a non-secret placeholder.

Local verification

  • npm test completed successfully.
  • Frontend entitlement constants and tests were updated for the canonical feature identifiers.
  • Branch is isolated from main; no merge, deployment, force push, or tag mutation was performed.

Remaining blockers before merge

  • Restore the missing v_max_allowance declaration in migration 003.
  • Link the Supabase project before supabase db push.
  • Apply database migrations before deploying dependent Edge Functions.
  • Include migration and configuration paths in the workflow trigger.
  • Replace the daily budget sum check with a globally serialized budget reservation.
  • Reserve a non-zero maximum estimated request cost.
  • Check both completed and failed settlement RPC results.
  • Run migration 003 against a clean local PostgreSQL database.
  • Run concurrent quota and budget reservation tests.
  • Confirm GitHub Actions, Supabase deployment, and Vercel deployment are green.

Acceptance gates

  • supabase db reset applies every migration without errors.
  • supabase migration list shows matching local and staging histories.
  • A staging supabase db push succeeds before any Edge Function deployment.
  • Concurrent requests cannot exceed trial, monthly, or daily-budget limits.
  • Provider failures do not consume an allowance permanently.
  • Every settlement error fails closed.
  • All unit tests and production builds pass.
  • Production response headers contain CSP, HSTS, and Permissions Policy.
  • No secrets appear in source, history, bundles, logs, or source maps.

Release classification

Implementation in progress. Not ready to merge or deploy.

@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for apply-guard-ph ready!

Name Link
🔨 Latest commit 9f6c244
🔍 Latest deploy log https://app.netlify.com/projects/apply-guard-ph/deploys/6a7d6201a3eb220007e425cc
😎 Deploy Preview https://deploy-preview-2--apply-guard-ph.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
applyguard-ph Ready Ready Preview Aug 13, 2026 6:19am

Unify the app with accessible glass surfaces, motion, and a guided product walkthrough.

Co-authored-by: Cursor <cursoragent@cursor.com>
yuzuruu29 and others added 2 commits August 13, 2026 07:59
… /offers

Two new Remotion films sharing the dark liquid-glass language: video/src/ad/ is the 64.5s 'Maya's story' marketing ad (16:9 + 9:16 social cuts), and video/src/premium/ is the 58s Premium showcase walking all five AI features through one real application, with the voice mock interview as the hero beat. PremiumShowcaseVideo.jsx embeds the showcase on /offers behind the same click-to-play bandwidth contract as HowItWorksVideo (13 tests; suite at 273). Compressed assets ship from public/video (~2 MB per cut). Also fixes Permissions-Policy camera=() -> camera=(self), which was blocking the mock interview's getUserMedia in production.

Co-authored-by: Cursor <cursoragent@cursor.com>
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