[#1239] Add Farcaster follow verification (verifyFc)#1277
Merged
Conversation
Neynar wrapper for Farcaster follow verification: looks up user by username to get FID, then checks if they follow the PlotLink account. Returns typed ok/error result with user_not_found, not_following, or neynar_error. No DB writes. 9 unit tests cover all paths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
realproject7
commented
May 26, 2026
realproject7
left a comment
Owner
Author
There was a problem hiding this comment.
@re2 review — APPROVE ✅
Checked against issue #1239 acceptance criteria:
| Criterion | Status |
|---|---|
User-not-found → { ok: false, error: 'user_not_found' } |
✅ (404, 400, missing fid) |
Not-following → { ok: false, error: 'not_following' } |
✅ (no partial DB write) |
Following → { ok: true, fid } |
✅ |
Neynar 5xx → neynar_error |
✅ (both API calls) |
| No DB writes in this lib | ✅ (no Supabase imports) |
| Version bump 1.30.3 → 1.30.4 (patch) | ✅ |
Code review notes:
- Two-step Neynar flow correct: (1) username→FID lookup, (2) bulk user fetch with
viewer_fidto check follow status viaviewer_context.following. encodeURIComponent()on username prevents injection. API key passed via header.- Both API calls wrapped in separate try/catch — network failures on either call gracefully return
neynar_error. - Missing API key returns error result (not throw) — consistent with R16 graceful degradation philosophy for this function.
- Discriminated union return type with specific error strings is clean for caller branching.
- 9 tests cover all paths including both 5xx scenarios, network failure, and missing key.
No issues found.
project7-interns
approved these changes
May 26, 2026
project7-interns
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR satisfies #1239: verifyFc performs the username lookup, checks the PlotLink follow relationship through Neynar viewer context, returns the required typed success/error results, and does not write to the database. Tests cover user-not-found, not-following, following, Neynar 5xx, network failure, missing API key, and no-FID response.
Findings
- No blocking findings.
Decision
Approve. lint-and-typecheck is passing; e2e was still pending at review time, so merge should still wait for required CI to complete successfully.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/airdrop/activation-verify.tswithverifyFc(username, plotlinkFid)GET /user/by_username→ FID, (2)GET /user/bulk?viewer_fid→ follow check{ ok: true, fid }on success, or{ ok: false, error }withuser_not_found/not_following/neynar_errorVersion
1.30.3 → 1.30.4
🤖 Generated with Claude Code