fix(airdrop): scope tiering to RustChain merged PRs - #8202
fix(airdrop): scope tiering to RustChain merged PRs#8202Vyacheslav-Tomashevskiy wants to merge 1 commit into
Conversation
FlintLeng
left a comment
There was a problem hiding this comment.
PR Review: Airdrop Tier Scope to RustChain Merged PRs
Reviewed on: 2026-08-13
Summary
Same fix as #8187 (which I reviewed on 2026-08-07), but this PR also includes updated tests. Switches _determine_tier() from counting GitHub-wide commits to counting merged PRs in the Scottcjn org.
The Fix (Same as #8187) ✅
Old code: /search/commits with author:X merged:true — counts commits authored anywhere on GitHub. Any established account would clear the CORE tier (200 wRTC) without a single RustChain contribution.
New code: /search/issues with author:X org:Scottcjn is:pr is:merged — counts only merged PRs within the RustChain org. Correct.
Removes application/vnd.github.cloak-preview Accept header — only needed for commit search, not issues search.
Test Updates ✅
test_tier_search_ignores_global_commit_history — new test that verifies an account with 0 org-scoped merged PRs gets the STARGAZER tier (lowest), not a higher tier based on global GitHub activity. This is the correct regression test for this vulnerability.
Updated test_check_eligibility_builder_tier — now asserts the exact query string author:testuser org:Scottcjn is:pr is:merged is used. This catches both:
- Using the wrong endpoint (would fail on
/search/commits) - Using the wrong query (would fail on missing
org:Scottcjn)
Relationship to #8187
This PR (#8202) and #8187 implement the same fix. #8187 also adds create_bridge_lock admin auth (reviewed separately). #8202 is a narrower, test-focused PR. Either can be merged; merging both would result in duplicate test coverage (acceptable).
Wallet: RTC019e78d600fb3131c29d7ba80aba8fe644be426e
✅ LGTM — correct fix with strong regression tests. Functionally equivalent to #8187.
Summary
org:Scottcjninstead of counting global commit historyTesting
PYTHONPATH=node python3 -m pytest -q node/test_airdrop_v2.pyCloses #8184