fix(ai-review): restrict BYOK to confirmed contributors - #921
Conversation
|
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 2 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 · No blocking issues spotted. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #921 +/- ##
=======================================
Coverage 96.62% 96.62%
=======================================
Files 109 109
Lines 14885 14885
Branches 5381 5381
=======================================
Hits 14382 14382
Misses 104 104
Partials 399 399 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Motivation
oss-anti-slopwhile preventing unconfirmed contributors from using maintainer-paid BYOK resources.Description
runAiReviewForAdvisoryinsrc/queue/processors.tsso the repository BYOK key is only decrypted/used whenargs.confirmedContributoris true andaiReviewByokis enabled. (Only confirmed contributors may trigger BYOK provider calls.)oss-anti-slopbehavior so unconfirmed authors can still run the free blocking consensus review (Workers AI) without access to maintainer BYOK keys.does not use the maintainer's BYOK key for non-confirmed oss-anti-slop blocking reviewsintest/unit/ai-review-advisory.test.tsto assert that unconfirmedoss-anti-slopblock reviews call Workers AI and do not invoke the BYOK provider.Testing
npm test -- --run test/unit/ai-review-advisory.test.tsand the test file passed (all tests in that file succeeded).npm run typecheck(tsc --noEmit) and it completed without errors.git diff --checkand there were no whitespace/check failures.Codex Task