Conversation
…stics, disable noisy ones Empirical signal-quality analysis (2026-05-26) vs. 9 confirmed-fraud and 194 confirmed-legit events (ground truth = Resend bounce/suppression rate): Up-weighted (high lift, low FP): - wallet_too_low: 8 → 12 (+60% lift) - pizzeria_fields_blank: 5 → 10 (+59% lift) - low_funnel_coverage: 10 → 15 (+55% lift, 1% FP) Removed from scoreEvent (negative or near-zero net signal): - one_word_name (-21% lift, fires on 88% of legit events) - cross_event_wallet (-6%, real crypto enthusiasts attend many events) - wallet_reuse (-13%, kiosk RSVPs legitimately share wallets) - lsh_field_sig_cluster (+2% with 65% FP rate) checkXxx functions preserved (still exported, deprecated JSDoc) so tests continue to validate them and the heuristics can be re-enabled with better thresholds in a future round. Calibration: 23 weights / total 245 → 19 weights / total 219. Score still capped at 100; tier cutoffs (10/30/60) unchanged. high_per_visitor_rsvp_saturation and repeat_session_rsvp_count are left at 20 in this round; their signal will be re-evaluated once more cookie-session data accumulates (~3 weeks). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
First-round rebalance of
backend/src/lib/fakeDetection.tsweights based on empirical signal-quality analysis run 2026-05-26 against:Ground truth = Resend bounce/suppression rate.
Four-tier summary
1. Up-weighted (3 heuristics)
wallet_too_lowpizzeria_fields_blanklow_funnel_coverage2. Disabled (4 heuristics removed from
scoreEventandWEIGHTS)one_word_namecross_event_walletwallet_reuselsh_field_sig_clusterThe exported
checkXxxfunctions are preserved (with@deprecatedJSDoc) so tests still validate them and we can re-enable with better thresholds later.3. Audited (3 inert heuristics — never fired in either set)
wallet_too_high_reusewalletRatio > 0.95ANDreuse > 0.3. Real events rarely exceed ~50% wallet adoption, so the >95% gate is unreachable. Suggest droppingwalletRatiofloor to ~0.5 or removing it and relying onreuse > 0.3alone.host_self_rsvp_mismatchfirstname_digits_emailratio > 0.95ANDdomainEntropy < 0.5— even the most synthetic event datasets rarely hit 95% regex match. Suggest dropping ratio gate to ~0.7 and verifying signal quality before re-promotion.4. Deliberately untouched (2 heuristics)
high_per_visitor_rsvp_saturationandrepeat_session_rsvp_countare both at weight 20. Today's data suggests they're over-weighted, but the_rsvp_sidcookie is still relatively new — re-evaluate in ~3 weeks once more cookie-session data accumulates.Calibration
Test plan
cd backend && npx tsc --noEmit— no new errors in fakeDetectioncd backend && npm test -- fakeDetection— all 108 tests passbackend/scripts/heuristic-signal-quality.tspost-merge to confirm new totals look reasonableFollow-ups
high_per_visitor_rsvp_saturationandrepeat_session_rsvp_countin ~3 weeks once cookie-session data accumulates.🤖 Generated with Claude Code