fix(badges): register naija and terere as bare claimable campaigns - #2610
Conversation
Both country-launch links ship with no inviter. Mapping them in UTM_CAMPAIGN_TO_BADGE_MAP was not enough: classifyBareCampaign only bypasses the invite gate for campaigns registered in WAITLIST_SKIP_CAMPAIGNS or BARE_VANITY_CAMPAIGNS, so a bare ?campaign=naija dead-ended on 'Invalid Invite Code' instead of awarding the badge. Same bug that left touched_grass unclaimable. They go in WAITLIST_SKIP_CAMPAIGNS, not BARE_VANITY_CAMPAIGNS: both badges are in peanut-api-ts POSTLAUNCH_SKIP_BADGE_CODES, and the vanity set is for badges with no card-waitlist skip. Filing them as vanity would show generic claim copy while the backend granted a skip anyway.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe campaign map now classifies ChangesCampaign waitlist handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Code-analysis diffPainscore total: 6346.56 → 6346.7 (+0.14) 🆕 New findings (1)
✅ Resolved (1)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Follow-up hotfix to #2608. Both country-launch badges are live in prod but their bare campaign links do not work.
The bug
?campaign=naijaand?campaign=tererewith no?code=hit "Invalid Invite Code" instead of awarding the badge.Mapping them in
UTM_CAMPAIGN_TO_BADGE_MAPresolves the tag to a badge code, butclassifyBareCampaignonly bypasses the invite gate for campaigns registered inWAITLIST_SKIP_CAMPAIGNSorBARE_VANITY_CAMPAIGNS. Neither badge was in either set, so the invite flow treated the visitor as carrying an invalid invite. This is the same bug the existing comment records fortouched_grass.It matters because both cohorts get bare links with no inviter — that is the whole distribution mechanism for the Nigeria and Paraguay launches.
Why WAITLIST_SKIP_CAMPAIGNS and not BARE_VANITY_CAMPAIGNS
Both badges are in peanut-api-ts
POSTLAUNCH_SKIP_BADGE_CODES. The vanity set is documented as "a commemorative badge with NO card-waitlist skip" and drives generic claim copy on/invite. Filing them there would render copy that says nothing about the queue while the backend silently granted a skip — so they belong in the skip set, which the comment already says to keep in sync withSKIP_BADGE_CODES.Verified
acknowledgment_definitionshas bothNAIJAandTEREREseeded with the shipped copy, so the API half is deployed and healthypeanut.me/badges/naija.svgandterere.svgboth return 200 at the expected byte sizesStill open, not in this PR
A bare campaign claim does not set
hasAppAccess—FULL_BYPASS_BADGE_CODESholds onlyWAITLIST_SKIPandOFFRAMP_USER. Prod shows 9 users currently waiting on app access, the oldest 41.6h old, which matches the "up to 48h jail" thebadge.tscomment describes for exactly this bare-link case. For an event where someone signs up and pays within minutes that is fatal, but widening the full bypass is Konrad's call, not a hotfix.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests