Context
Found during PE audit of PR #892. PullRequestReviewHandler.buildPrompt() (line 189) and verifyActivePractices() (called from prepareInputFiles() at line 140) both execute practiceRepository.findByWorkspaceIdAndActiveTrue() — the same query runs twice per agent job.
Scope
Cache the practices list from verifyActivePractices() and pass it to buildPrompt(), or store it in job metadata. Minor efficiency fix — eliminates one DB query per agent run.
Files
| File |
Change |
agent/handler/PullRequestReviewHandler.java |
MODIFY — cache practices between methods |
Verification