perf(resolver): short-circuit quality score checks - #556
Conversation
Co-authored-by: d-oit <6849456+d-oit@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 7, 2026 11:01a.m. | Review ↗ | |
| Python | Aug 7, 2026 11:01a.m. | Review ↗ | |
| Rust | Aug 7, 2026 11:01a.m. | Review ↗ | |
| Shell | Aug 7, 2026 11:01a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This PR refactors the _check_jargon and _compute_noise helper functions in two copies of quality.py (under scripts/ and .agents/skills/do-web-doc-resolver/scripts/), replacing the sum(...) generator-based counting with explicit loops that break early once the threshold is exceeded. It also expands the NAV_HEAVY_HTML test fixture in tests/test_content_clean.py by adding a longer paragraph of main content. The changes touch content-quality signal detection logic and its associated test data.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 186 functions depend on the 50 functions this change touches.
Health — grade B; 8 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):
resolve_url_stream()— 30 callers, 14 callees (high)score_content()— 46 callers, 9 callees (high)resolve()— 30 callers, 5 callees (high)fetch_url_content()— 11 callers, 9 callees (high)resolve_url_stream_async()— 2 callers, 8 callees (medium)_async_main()— 1 callers, 7 callees (medium)main()— 1 callers, 7 callees (medium)score_content()— 0 callers, 9 callees (medium)
Verification — 186 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 125 function(s) in the blast radius were not formally verified this run
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This patch optimizes
_check_jargonand_compute_noiseinscripts/quality.pyand its shadow copy
.agents/skills/do-web-doc-resolver/scripts/quality.py.The functions are rewritten to loop and return early once the threshold
is exceeded, preventing redundant full-string scans and substring counting.
Additionally, NAV_HEAVY_HTML body content length was increased in tests
to prevent clean_content falling back to raw HTML tag stripping.
PR created automatically by Jules for task 5600317163421132739 started by @d-oit