fix(review): gate placeholder on actual AI eligibility#1441
Merged
JSONbored merged 3 commits intoJun 27, 2026
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
3f9cbdf to
222db3b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1441 +/- ##
==========================================
- Coverage 95.38% 95.37% -0.02%
==========================================
Files 201 201
Lines 21598 21601 +3
Branches 7807 7810 +3
==========================================
Hits 20601 20601
- Misses 416 417 +1
- Partials 581 583 +2
🚀 New features to boost your workflow:
|
This was referenced Jun 27, 2026
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review
Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
JSONbored
added a commit
that referenced
this pull request
Jun 27, 2026
* fix(review): preserve cached AI gate findings * fix(migrations): renumber ai_review_cache_findings to 0078 (resolve collision) * test(queue): enable AI eligibility flags so the cached-findings replay path runs (post-#1441)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
aiReviewWillRunthat omitted feature-flag, binding, contributor, and reputation checks that the real AI path enforces.Description
shouldStartAiReviewForAdvisorypredicate insrc/queue/processors.tsthat mirrors the AI review entry gates including skip flag,aiReviewMode, confirmed-contributor handling (withoss-anti-slopexception), presence ofheadSha,AI_SUMMARIES_ENABLED,AI_PUBLIC_COMMENTS_ENABLED, Workers-AI binding (env.AI), and the reputation downgrade check.isEnabledfromsrc/services/ai-reviewand use the new predicate where the placeholder decision is made, replacing the coarseaiReviewWillRunboolean so the placeholder is only posted when the AI review would actually start.test/unit/ai-review-advisory.test.tsthat cover skip flag, mode off, contributor eligibility, missing head SHA, disabled public comments / missing binding, and the reputation downgrade path.test/unit/queue.test.tsasserting that disabled public AI comments do not post the 🟪 placeholder and that the model is not invoked.Testing
npx vitest run test/unit/ai-review-advisory.test.ts test/unit/queue.test.ts -t "shouldStartAiReviewForAdvisory|reviewing placeholder", and the targeted suites passed.npm run typecheckand the TypeScript checks passed.npm run test:ci, but the environment hit unrelated tool/network issues during a full coverage run (V8 coverage remap error:TypeError: jsTokens is not a function) so the end-to-end local CI was not completed in this environment.npm audit --audit-level=moderate, but the audit endpoint returned403 Forbiddenfrom the environment, so dependency-audit could not be completed here.Codex Task