Skip to content

fix(review): skip bytecode paths in grounding and diff priority - #3592

Closed
jimcody1995 wants to merge 2 commits into
JSONbored:mainfrom
jimcody1995:fix/review-grounding-bytecode-skip-v2
Closed

fix(review): skip bytecode paths in grounding and diff priority#3592
jimcody1995 wants to merge 2 commits into
JSONbored:mainfrom
jimcody1995:fix/review-grounding-bytecode-skip-v2

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

  • Extend SKIP_EXT in review-grounding.ts so fetchFullFileContents skips Java bytecode (.class, .jar) and Python bytecode (.pyc, .pyo).
  • Align diffFilePriority in review-grounding.ts and review-diff.ts so those paths rank as noise(4) under a tight diff budget — same tier as lockfiles/minified/source maps.
  • Unit tests record getFileContent calls and assert bytecode paths are never requested, plus direct diffFilePriority assertions for all four extensions.

Fixes #561

Scope

Validation

  • git diff --check
  • npm run test:ci on Node 22
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • Unit tests cover SKIP_EXT fetch skip + diffFilePriority noise ranking

Safety

  • No secrets, auth, or UI changes.
  • N/A for UI Evidence.

UI Evidence

N/A — backend review grounding only.

Notes

Conflict avoidance: Touches only src/review/review-grounding.ts, src/review/review-diff.ts, and their unit tests. Zero overlap with open PRs (#3580 path-matchers Java gRPC, #3585 enrichment binary-extensions, #3586 hardcoded-URL, #3584/#3582 unused-export, #3577 suggested-change blocks, #3550 manual-review label).

Supersedes closed #3588 (same change; added linked issue + diffFilePriority parity per bot review).

Made with Cursor

jimcody1995 and others added 2 commits July 5, 2026 20:14
Avoid fetching Java .class/.jar and Python .pyc/.pyo as full file text
during review grounding — they carry no review signal and waste tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend SKIP_EXT and diffFilePriority to treat Java .class/.jar and
Python .pyc/.pyo as non-reviewable noise so grounding fetch and diff
budget ordering stay aligned.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 5, 2026 18:14
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored

Copy link
Copy Markdown
Owner

Please work on new/open issues, not closed issues.

@JSONbored JSONbored closed this Jul 5, 2026
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 5, 2026
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (b98229d) to head (366c86e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3592   +/-   ##
=======================================
  Coverage   93.19%   93.19%           
=======================================
  Files         313      313           
  Lines       31874    31874           
  Branches    11666    11666           
=======================================
  Hits        29705    29705           
  Misses       1517     1517           
  Partials      652      652           
Files with missing lines Coverage Δ
src/review/review-diff.ts 90.90% <100.00%> (ø)
src/review/review-grounding.ts 92.85% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

feat(signals): slop signal — generated/vendored/dependency/docs matchers

2 participants