fix(review): honor all-authors AI preflight#1576
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1576 +/- ##
=======================================
Coverage 95.43% 95.43%
=======================================
Files 202 202
Lines 21751 21754 +3
Branches 7860 7862 +2
=======================================
+ Hits 20757 20760 +3
Misses 416 416
Partials 578 578
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review Review summary
Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. Targeted bug fix that closes the gap where repos with `aiReviewAllAuthors: true` were not triggering the AI preflight for non-confirmed contributors. The new `reviewableAuthor` variable (`confirmedContributor || packAllowsAnyAuthorBlockingReview || aiReviewAllAuthors`) correctly extends the prior two-way guard to a three-way OR, matching the described intent. The multi-line reformatting is a net readability improvement, and the regression test directly exercises the previously-missing code path. No logic regressions are visible. Nits (4)
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 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.
|
Motivation
aiReviewAllAuthorspath when deciding whether to start an AI review, which let non-confirmed authors bypass a repo-configured all-authors AI review.runAiReviewForAdvisoryentry conditions match so configured per-repo opt-ins are honored.Description
shouldStartAiReviewForAdvisoryinsrc/queue/processors.tsto computereviewableAuthorasargs.confirmedContributor || packAllowsAnyAuthorBlockingReview || args.settings.aiReviewAllAuthorsand use that in the eligibilityifguard.test/unit/ai-review-advisory.test.tsthat asserts a non-confirmed contributor triggers the preflight whenaiReviewAllAuthorsis enabled.Testing
npx vitest run test/unit/ai-review-advisory.test.ts, which passed (22 tests passed).git diff --checkproduced no issues locally.npm run test:ci, but the run was blocked byactionlintsetup issues in this environment and its WASM fallback not recognizing the custom self-host runner label.npm run typecheckandnpm audit --audit-level=moderate, both of which were impeded by local dependency/network conditions (@sentry/nodetypes missing and npm audit endpoint 403 respectively).Codex Task