fix(review): gate self-host visual-vision behind author opt-in - #4393
Merged
Conversation
Contributor
|
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 #4393 +/- ##
=======================================
Coverage 93.95% 93.95%
=======================================
Files 400 400
Lines 36820 36821 +1
Branches 13452 13454 +2
=======================================
+ Hits 34595 34596 +1
Misses 1569 1569
Partials 656 656
🚀 New features to boost your workflow:
|
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
AI_VISIONpath to run without the existing author/spend gate, enabling unconfirmed external contributors to trigger local vision model work and consume operator resources.aiReviewAllAuthors).Description
selfHostVisionAllowed = args.confirmedContributor || args.settings.aiReviewAllAuthorsand computingselfHostVisionAvailable = selfHostVisionAllowed && Boolean(env.AI_VISION)insrc/queue/processors.tsso the gate cannot be satisfied solely byenv.AI_VISION.selfHostVisionAvailableinto the existingevaluateVisualVisionGatecall so the visual-vision gate only permits execution when the author/repo opt-in is satisfied.test/unit/visual-vision-wiring.test.tsthat assert an unconfirmed contributor cannot trigger screenshot fetches orenv.AI_VISION.rununlessaiReviewAllAuthorsis enabled, and thataiReviewAllAuthorsstill allows the explicit opt-in path.Testing
npx vitest run test/unit/visual-vision-wiring.test.ts test/unit/visual-findings.test.ts --reporter=verbose, and all tests in those files passed (48 tests across the two files).npm run typecheck).npm audit --audit-level=moderatecould not complete due to a registry403 Forbiddenresponse (not related to the change).npm run test:cidid not complete becausecf-typegen:checkreported a staleworker-configuration.d.tsrequiring regeneration; this drift is unrelated to the visual-vision logic and blocks completing the entire gate in this environment.Codex Task