You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+15-21Lines changed: 15 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,12 @@ cached-data/
26
26
3. If tokens are shared (same underlying user), the budget is split evenly across categories
27
27
4. For each category × platform (12 combos), checks if cached JSON is fresh (<23h)
28
28
5. If stale, queries GitHub Search API with platform-specific topics/languages/keywords
29
-
6. Filters repos that have **real releases with platform installers** via two methods:
30
-
-**Extension matching**: Direct installer files (`.apk`, `.exe`, `.dmg`, `.deb`, etc.)
31
-
-**Keyword matching**: Generic archives (`.zip`, `.tar.gz`) with platform keywords in the filename (e.g. `myapp-macos-arm64.zip`, `myapp-win-x64.tar.gz`)
29
+
6. Filters repos that have **real releases with platform installers** — only dedicated installer formats count (no generic archives like `.zip` or `.tar.gz`)
32
30
7. Repos with NSFW/inappropriate topics or descriptions are excluded via `BLOCKED_TOPICS`
33
31
8. Verifies ALL candidates — no artificial caps. Stops gracefully when per-platform budget is exhausted or rate limit drops below `RATE_LIMIT_FLOOR` (50)
34
32
9. Never saves 0-repo results; never overwrites good cached data with poor results
35
-
10. Waits 65s between platforms for search API rate limit (30 req/min) to reset
36
-
11. Saves results to `cached-data/{category}/{platform}.json`
37
-
12. GitHub Actions commits and pushes changes
33
+
10. Saves results to `cached-data/{category}/{platform}.json`
34
+
11. GitHub Actions commits and pushes changes
38
35
39
36
### Token Strategy
40
37
- 3 GitHub Classic PATs (scope: `public_repo`), each from a **separate GitHub account**
@@ -59,8 +56,9 @@ cached-data/
59
56
-`verify_installers()` stops when per-platform budget is exhausted (not just global floor)
60
57
61
58
**Search API throttling:**
62
-
- 65-second pause between platforms within a category to let the 30 req/min limit reset
63
-
- Only pauses if the previous platform actually ran searches (cached platforms skip it)
59
+
- Sliding window rate limiter (`_acquire_search_slot()`) tracks timestamps of all search API calls
60
+
- Automatically pauses when approaching 28 calls per 60-second window (GitHub allows 30, 2 left as buffer)
61
+
- Pacing is per-call — no blunt inter-platform pauses needed; search calls are spaced automatically
64
62
-`_update_rate_info()` ignores search API headers to prevent core rate tracking pollution
65
63
66
64
**Safety caps:**
@@ -77,17 +75,11 @@ cached-data/
77
75
78
76
Each platform has: topics, installer file extensions, scoring keywords (high/medium/low), primary/secondary languages, and frameworks. See `PLATFORMS` dict.
- Python 3.11, no type-checking or linting configured
169
163
- No tests beyond `validate_releases.py`
170
164
- Each category creates its own `GitHubClient` — release cache is per-client, shared across platforms within the same category
171
-
- Platforms are processed sequentially within each category (with 65s search rate limit pause between)
172
-
- Typical runtime: 15-25 minutes with 3 dedicated tokens
165
+
- Platforms are processed sequentially within each category (search API pacing handled by sliding window rate limiter)
166
+
- Typical runtime: 10-20 minutes with 3 dedicated tokens
173
167
- The `_check_assets()` helper inside `get_latest_stable_release()` detects installers for ALL platforms in one pass, so cross-platform repos benefit all platforms from a single release check
0 commit comments