Skip to content

[#1237] Strip v1 airdrop logic (points, award, cron, checkin)#1274

Merged
realproject7 merged 1 commit into
mainfrom
task/1237-v1-code-cleanup
May 26, 2026
Merged

[#1237] Strip v1 airdrop logic (points, award, cron, checkin)#1274
realproject7 merged 1 commit into
mainfrom
task/1237-v1-code-cleanup

Conversation

@realproject7

Copy link
Copy Markdown
Owner

Summary

  • computeBuyPoints now returns raw plotSpent (no streak multiplication) — param kept for API compat
  • computeReferralPoints deleted — v5 handles referrals via multiplier at finalize
  • awardWritePoints + awardRatePoints → no-op (return early, no DB writes)
  • Cron handler: removed streak fetches, referral map lookups, and referral insert block — writes only action='buy' rows
  • /api/airdrop/checkin → returns 410 Gone
  • Net -333 lines removed

Why

v5 finalize SQL assumes pl_points.action='buy'.points = raw PLOT spent. Streak-boosted values would cause incorrect distribution.

Version

1.30.0 → 1.30.1

🤖 Generated with Claude Code

…checkin

v5 finalize SQL assumes pl_points buy rows = raw PLOT spent. Strip
streak boost from computeBuyPoints, delete computeReferralPoints,
no-op awardWritePoints/awardRatePoints, remove referral + streak
fetches from cron handler, and return 410 Gone from checkin endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored May 26, 2026 4:58am

Request Review

@realproject7 realproject7 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@re2 review — APPROVE ✅

Checked against issue #1237 acceptance criteria:

Criterion Status
computeBuyPoints(100, 5) === 100 (no streak multiplication) ✅ returns raw plotSpent
computeReferralPoints deleted
awardWritePoints + awardRatePoints return early, no DB writes ✅ no-op with return;
Cron writes only action='buy' rows (no referral inserts) ✅ referral block + streak/referral fetches removed
/api/airdrop/checkin returns 410 Gone
No regressions in buy flow ✅ cron still processes buys correctly
Version bump 1.30.0 → 1.30.1 (patch)

Code review notes:

  • Cron handler correctly simplified: removed 4 Supabase queries (streak lookups for buyers/referrers, referral map, referrer streak map) — only dedup query remains
  • computeBuyPoints keeps _currentStreak param for API compat per spec — callers don't need signature changes
  • Award functions keep signatures with _-prefixed params — safe for existing callers
  • getStreakBoost re-export from points.ts preserved (may be used elsewhere)
  • Net -333 lines, no logic additions beyond the no-ops

No issues found.

@project7-interns project7-interns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The PR matches #1237: buy points are raw PLOT spent, referral point computation is removed, write/rate awards are no-ops, the cron no longer fetches streak/referral data or writes referral rows, and the check-in endpoint returns 410 Gone. The existing caller signatures are preserved for compatibility.

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.

@realproject7
realproject7 merged commit 7575b02 into main May 26, 2026
4 checks passed
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.

2 participants