8000 Split weekly registrations into verified and unverified by daoudclarke · Pull Request #667 · mwmbl/mwmbl · GitHub
[go: up one dir, main page]

Skip to content

Split weekly registrations into verified and unverified - #667

Merged
daoudclarke merged 2 commits into
mainfrom
signup-bot-protection
Nov 16, 2026
Merged

daoudclarke merged 2 commits into
mainfrom
signup-bot-protection

Conversation

@daoudclarke
Copy link
Copy Markdown
Contributor

From Claude:

What

/api/v1/crawler/stats now returns two new series next to users_registered_weekly:

  • users_verified_weekly: users registered that week who have a verified email address
  • users_unverified_weekly: everyone else registered that week

users_registered_weekly stays as the total (verified + unverified), so existing front-ends keep working. The front-end can draw the two new series as a stacked chart.

Why

The registration graph has large spikes in the weeks of 12 Jan, 16 Feb, 9–23 Mar and 27 Apr–4 May 2026. None of them line up with HN or blog coverage. Checking prod showed they are bot sign-ups:

Window Signups Verified
12 Jan week 200 6 (3%)
16–30 Mar 885 12 (1.4%)
1–15 Jun (baseline) 44 25 (57%)

The spike usernames are random strings (IiFzMtomUfSgjeQuAo, qldunshvfn, …). Splitting by verification shows the real acquisition curve under the bot noise.

Notes

  • "Verified" means the user has any verified EmailAddress, checked with an Exists subquery, so one query still covers the whole year.
  • Both cache keys are versioned (users-registered-weekly-v2-…, stats-payload-v2-…). A payload cached by the previous release lacks the new fields, and it would fail validation for up to an hour after the deploy.
  • This doesn't stop the bots. Signup still has no captcha or rate limit; that's a separate change.

Verification

  • New tests cover the verified/unverified split: no email row, an unverified email, and two addresses with one verified. Another test checks the total equals the sum of the two series in the full stats payload.
  • make check passes, and make test passes: 2194 passed, 10 skipped.

🤖 Generated with Claude Code

daoudclarke and others added 2 commits November 16, 2026 16:16
The registration spikes on the stats page (Jan, Feb, Mar and late Apr
2026) were bot sign-ups: 1-3% of them ever verified their email, against
57% in a normal week, with random-string usernames. Returning the two
counts separately lets the front-end show them as a stacked chart, so
the real acquisition curve is visible under the bot noise.

users_registered_weekly stays as the total for front-ends that predate
the split. The cache keys are versioned because a payload cached by the
previous release lacks the new fields and would fail validation.

No functional changes to the crawler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on lags

Addresses review of #667.

No functional changes to the crawler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov
codecov Bot commented Nov 16, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@daoudclarke
daoudclarke merged commit 2a88270 into main Nov 16, 2026
7 checks passed
@daoudclarke
daoudclarke deleted the signup-bot-protection branch November 16, 2026 21:47
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

0