Skip to content

perf(update): skip clone detection and dead code when only prose changed - #4217

Merged
swati510 merged 4 commits into
mainfrom
perf/skip-analyses-without-code-change
Oct 19, 2026
Merged

swati510 merged 4 commits into
mainfrom
perf/skip-analyses-without-code-change

Conversation

@RaghavChamadiya

Copy link
Copy Markdown
Member

What

An update whose changes are all prose (Markdown, AsciiDoc) no longer reloads the repo-wide clone index or re-runs repo-wide dead code. Health still runs, so its history refresh and snapshot are written as before.

Why

A docs-only commit paid for two repo-wide passes that cannot move without a code change: clone detection (about 29 s here) and dead code (about 27 s).

How

  • Clone detection splices only changed files that health scores; an empty splice set returns no pairs. Nothing reads clone pairs for prose files or for the performance closure.
  • Dead code keeps its stored findings when every changed path is prose, no analyzer, parser, renderer, history or config change forces a re-score, and no page render in the same run reads the report. .mdx (its imports mark components reachable) and .rst (read for symbol names) count as code-bearing.

Verification

Same index snapshot of this repository, one README commit, update --index-only, base vs this branch:

base this branch
analysis.health 37.4 s 7.1 s
analysis.health.duplication 28.8 s skipped
analysis.dead_code 26.7 s skipped

Every analysis table (dead-code findings, health findings and file metrics, refactoring suggestions, performance opportunities, health snapshots, git metadata) is identical between the two runs. New tests for the gate and the splice set; pipeline, health, workspace and update tests pass; ruff check clean.

A docs-only commit reloaded the repo-wide clone index (17-32 s) and re-ran
repo-wide dead code (12-27 s) though neither can move without a code
change. Clone detection now splices only changed files health scores, and
an update whose changes are all prose keeps the stored dead-code findings
unless an analyzer, parser, renderer, history or config change forces a
re-score, or a page render or knowledge-graph rebuild in the same run
reads the report.
@repowise-bot

repowise-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🔍 2 things to check

  1. This PR introduces 2 new findings across 1 file: 1× complex method, 1× complex conditional (see all)
  2. packages/cli/src/repowise/cli/commands/update_cmd/command.py is getting worse: the last commit to land a finding here (120e796) introduced complex method (medium) in _no_changed_files (+1 more)

⚠️ Health of changed files: 5.6 → 5.4 (-0.2; structure -0.2)
Average full file score (structure and history) of 6 changed code files, weighted by size before this PR; not the repository score.

Check Result
Coverage 100% of 19 changed lines covered
Tests 4 of 4 changed code files reached by a test · which tests
Security No new findings on changed lines
Doc drift No drift in docs this PR edits
Coverage

Patch coverage 100.0% (19 of 19 changed executable lines covered)

3a29039 · cobertura · 3 of 6 changed files measured, 2 out of scope

Report from this run for 3a29039.

🧾 Evidence: 1 to look at, 6 not known
Item Status Evidence
Components touched ok · inferred 2 components: packages, tests
Declared owners ok · declared @RaghavChamadiya, @swati510
Suggested reviewers unknown · not known Not known: not gathered on a pull request
Tests reaching the change unknown · not known 0 of 4 changed files reached by a test; 4 not known
Contracts touched ok · measured No workspace contract touched; no breaking signature change
Consumers in other repos unknown · not known Not known: not gathered on a pull request
Decisions crossed unknown · not known Not known: decision records are read only for an AI review
Health delta look · measured Findings: 2 introduced, 0 worsened, 0 resolved
AI provenance unknown · not known Provenance: unknown, known for 0 of 4 commits; AI share withheld: coverage 0% is below 30%
Diff size rank ok · measured Larger than 44.5% of recent commits
Outcomes since merge unknown · not known Not known: a pull request is not a merged change

AI review is paused: this repository reached its monthly spending limit. Bot settings


📊 See the full report for this PR
Blast radius, every caller of the contracts it changes, and health before and after. No sign-in.
Plain markdown for agents

Settings and updates

Updated 2026-10-19 13:10 UTC
Silence one PR with [skip repowise] in the title · Bot settings
⭐ Star Repowise · 📥 Install on another repo

@swati510
swati510 merged commit 4aaf334 into main Oct 19, 2026
9 of 10 checks passed
@swati510
swati510 deleted the perf/skip-analyses-without-code-change branch October 19, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants