feat(review): thread screenshot-table vision evidence into the main AI review - #7692
Merged
Merged
Conversation
…I review The main AI code review (the narrative assessment/blockers/nits) never saw any images, contributor-submitted or otherwise. Contributor-submitted before/after screenshot-tables already got a real vision-AI pass, but it was scoped strictly to gaming detection (duplicate/irrelevant images), never correctness or UX judgment, and its output only ever fed a separate advisory list the main review never read. Extends the SAME single vision call (self-hosted env.AI_VISION or BYOK, no extra GPU cost) to also return a plain-language evidence summary alongside its existing gaming-detection findings, and reorders the pass to run before the main AI review so that summary exists in time. The summary is threaded into the main review's prompt as plain TEXT ONLY, appended the same way repoInstructions/pathGuidance already are (absent/blank leaves the prompt byte-identical) -- never routed through the images/content-block parameter, so the frontier-model review call's token cost grows by a small amount of text and never by image tokens. The existing gaming-detection behavior, its gating (reputation/provider/ image-pair presence), and the deterministic missing-screenshot-table close gate are all unchanged.
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 #7692 +/- ##
==========================================
- Coverage 88.55% 88.54% -0.02%
==========================================
Files 725 725
Lines 76188 76207 +19
Branches 22680 22684 +4
==========================================
+ Hits 67466 67474 +8
- Misses 7680 7687 +7
- Partials 1042 1046 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Summary
env.AI_VISIONor BYOK — no extra GPU/API cost) to also return a plain-language evidence summary alongside its existing gaming-detection findings, and reorders the pass to run before the main AI review so the summary exists in time.repoInstructions/pathGuidancealready are, never routed through the images/content-block parameter. The frontier-model review call's token cost grows by a small amount of text, never by image tokens.Cost-architecture guarantee: vision stays entirely on the cheap self-hosted GPU/BYOK path; only distilled text reaches the expensive frontier-model call. Verified directly — a dedicated test serializes the actual review-provider call args and asserts no
image-typed content block or base64 payload is ever present.Existing gaming-detection behavior, its gating (reputation/provider/image-pair presence), and the deterministic missing-screenshot-table close gate are all unchanged.
Test plan
npx vitest run test/unit/ai-review.test.ts test/unit/screenshot-table-vision.test.ts test/unit/screenshot-table-vision-wiring.test.ts test/unit/screenshot-evidence-summary-wiring.test.ts— 271/271 passingDA/BRDAagainst the diff hunks)npx tsc --noEmitcleannpm audit --audit-level=moderateclean