Skip to content

feat(review): thread screenshot-table vision evidence into the main AI review - #7692

Merged
JSONbored merged 1 commit into
mainfrom
feat/screenshot-vision-evidence-into-main-review
Jul 21, 2026
Merged

feat(review): thread screenshot-table vision evidence into the main AI review#7692
JSONbored merged 1 commit into
mainfrom
feat/screenshot-vision-evidence-into-main-review

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • The main AI code review (the assessment/blockers/nits narrative) never saw any images — contributor screenshot-tables only ever got a narrow gaming-detection vision pass, and its output stayed in a separate advisory list the main review never read.
  • Extends that SAME vision call (self-hosted env.AI_VISION or 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.
  • The summary is threaded into the main review's prompt as plain text only — appended the same byte-identical-when-absent way repoInstructions/pathGuidance already 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 passing
  • Coverage scoped to the diff across all 4 modified source files: 100% of changed lines and branches covered (verified via lcov DA/BRDA against the diff hunks)
  • Dedicated test confirms the main review call never receives image content blocks or base64 payloads from this path
  • npx tsc --noEmit clean
  • npm audit --audit-level=moderate clean

…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.
@JSONbored JSONbored self-assigned this Jul 21, 2026
@JSONbored
JSONbored merged commit 756bbc0 into main Jul 21, 2026
5 checks passed
@JSONbored
JSONbored deleted the feat/screenshot-vision-evidence-into-main-review branch July 21, 2026 08:54
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (6ac7109) to head (879e84c).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ
shard-1 30.37% <25.00%> (-0.71%) ⬇️
shard-2 35.55% <75.00%> (+0.44%) ⬆️
shard-3 30.81% <25.00%> (-0.32%) ⬇️
shard-4 40.75% <37.50%> (-0.01%) ⬇️
shard-5 36.07% <79.16%> (-1.93%) ⬇️
shard-6 32.55% <66.66%> (+1.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/queue/ai-review-orchestration.ts 100.00% <100.00%> (ø)
src/queue/processors.ts 95.75% <100.00%> (+<0.01%) ⬆️
src/review/visual/screenshot-table-vision.ts 100.00% <100.00%> (ø)
src/services/ai-review.ts 96.85% <100.00%> (+0.01%) ⬆️

... and 2 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant