← Back to Pull requests

Fix program invite crash when signed in as a different partner #4675

Closed
unknown closed this pull request without merging on Oct 13, 2026 19:53 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 21:28 UTC
Author

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

New Features
Program invitation links now carry the invited email through registration and return people to the invitation afterward.
When the signed-in email differs from the invited email and the signed-in user has no enrollment in the program, a prompt offers the option to continue registration with the invited email.
People without a profile or required partner setup are directed to onboarding before continuing to a program invitation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---

How to test

1. From the repo root, run pnpm dev.
2. Sign in at http://partners.localhost:8888/login as partner1@dub-internal-test.com.
3. Open an invite link in the shape sent before this change. The address is only on the register link:

http://partners.localhost:8888/acme/register?email=other-partner%40example.com&next=/programs/acme/invite

4. You land on the Acme invitation for that other address.
- The heading is This invitation is for other-partner@example.com.
- The text says you are signed in as partner1@dub-internal-test.com and to sign in with the invited email.
- The button is Continue as other-partner@example.com.
- Accept invite and Decline are not on the page.
- The page is not an application error.
5. Click Continue as other-partner@example.com.
- The page is Create your Dub Partner account for Acme.
- Email is filled with other-partner@example.com.
- Sign Up and Continue with Google are on the page.
6. Sign in again as partner1@dub-internal-test.com. Open http://partners.localhost:8888/programs/acme/invite, which is the same page as Learn more on an invitation. Then open http://partners.localhost:8888/programs/acme/invite?email=partner1@dub-internal-test.com.
- Neither URL shows This invitation is for.
- Both show the Acme program page: Program unavailable and You have been banned from this program.

Diff: 262 lines (+196 / -66) across 3 files Reviewer: pepeladeira Review duration: 1344m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 262 lines diff across 3 files
0.44
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.333
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4675"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 44.3% (MEDIUM) · Higher = larger blast radius
44.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.5% · Safe to merge
17.5%
Repository