fix(reliability): authenticate public GitHub profile fetches (#790) - #819
Conversation
Completes #790 — the timeout half shipped in #817. fetchPublicContributorProfile's two api.github.com calls were unauthenticated (60/hr ceiling), so the 500-login contributor-evidence loop could exhaust it and silently return source: unavailable. Thread an optional env through the 8 callers and send Authorization: Bearer when GITHUB_PUBLIC_TOKEN is set, lifting the ceiling to 5000/hr (mirrors the existing fetchPublicRepoStats). Signature stays backward-compatible (env is optional). Closes #790
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 7 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #819 +/- ##
=======================================
Coverage 96.77% 96.77%
=======================================
Files 97 97
Lines 14000 14001 +1
Branches 5098 5099 +1
=======================================
+ Hits 13548 13549 +1
Misses 86 86
Partials 366 366 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Completes #790 — the timeout half shipped in #817.
fetchPublicContributorProfile's two api.github.com calls were unauthenticated (60/hr ceiling), so the 500-login contributor-evidence loop could exhaust it and silently returnsource: unavailable.Thread an optional
envthrough the 8 callers and sendAuthorization: BearerwhenGITHUB_PUBLIC_TOKENis set, lifting the ceiling to 5000/hr (mirrors the existingfetchPublicRepoStats). Signature stays backward-compatible (envoptional). Surgical: 6 source files, single-token call-site edits, no reformatting.Test: asserts both fetches carry
Bearer <token>when the token is set, and no auth header when absent. 129 caller-area tests pass; typecheck clean.Closes #790