Repository navigation
Description
Problem
devops review pr <N> --pre-analysis-only takes more than four minutes and makes no model call. A person ran it on 2026-10-22 against a merged pull request that changed 22 files. The run reviewed 17 of them.
Evidence
- The output of the run, in this order:
Content spans 17 pages to ensure full coverage., thenPre-analysis metadata refreshed with AI metadata for 2339 file(s), thenProfile: 4m 6s, 0 LLM calls; pre_analysis 4m (0 calls), payloads 5.41s (0 calls), thenElapsed: 4m 23s. - The pre-analysis stage took 4 minutes for a change of 17 files. The line about 2339 files suggests that the stage refreshes the metadata of the whole repository on each run and not only of the changed files.
- The message
Initializing review pipeline session ... via LLM serverappears for a run that makes 0 model calls, andContent spans 17 pagesnames pages where the count is a file count. Both are misleading. - The project rule says that a slow
devops cior review loop is a critical fix, because it delays every change.
Remedy
Measure first: run the stage with a profiler or with the stage timings that the profile line already holds, and find out which part takes the four minutes. Refresh the metadata of the changed files only, or reuse the cached metadata when the file hash is unchanged. Do not build a cache layer by hand if a library or an existing cache in the project already covers it. Fix the two misleading messages. Add a test that fails if the stage touches more than the changed files.
Proposed design
Problem statement
The pre-analysis stage in devops review takes four minutes for a small pull request. It refreshes metadata for all repository files instead of only changed files.
Acceptance criteria
- Criterion 1: The pre-analysis stage refreshes metadata only for changed files.
Verification: Rundevops review pr --pre-analysis-onlyon a PR that changes 17 files. Check that the output shows metadata refreshed for only those 17 files, not 2339. - Criterion 2: The pre-analysis stage completes in under 30 seconds.
Verification: Rundevops review pr --pre-analysis-onlyon a PR that changes 17 files. Measure the time and confirm it is less than 30 seconds. - Criterion 3: Misleading messages are fixed.
Verification: Rundevops review pr --pre-analysis-only. Check that messages no longer say 'Content spans 17 pages' or 'Initializing review pipeline session ... via LLM server' for runs with zero model calls.
Key questions
- What is the expected behavior for metadata refresh?: The stage should refresh metadata only for changed files, not the entire repository. (proposed)
Open questions
- Does the pre-analysis stage refresh metadata for all repository files? (missing verified source)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 22, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate describes a performance issue that slows down the review process.A slow review loop delays every change and is marked as critical.Users experience long wait times during code reviews which impacts productivity.The fix requires profiling, identifying the root cause, and changing metadata refresh logic.perf(review): pre-analysis of a 17-file pull request takes four minut…
fix(review): --pre-analysis-only stops after pre-analysis and runs no…