Skip to content

Commit 4853f35

Browse files
authored
Merge pull request #160 from rostilos/1.5.4-rc
Refactor issue reconciliation logic and update prompt instructions
2 parents 3c465a5 + 19d0821 commit 4853f35

95 files changed

Lines changed: 6885 additions & 1265 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

java-ecosystem/libs/analysis-engine/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@
5757
<artifactId>codecrow-vcs-client</artifactId>
5858
</dependency>
5959

60+
<!-- AST parser for scope resolution -->
61+
<dependency>
62+
<groupId>org.rostilos.codecrow</groupId>
63+
<artifactId>codecrow-ast-parser</artifactId>
64+
</dependency>
65+
6066
<!-- Spring dependencies -->
6167
<dependency>
6268
<groupId>org.springframework.boot</groupId>

java-ecosystem/libs/analysis-engine/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
requires org.rostilos.codecrow.commitgraph;
1212
requires org.rostilos.codecrow.filecontent;
1313
requires org.rostilos.codecrow.vcs;
14+
requires org.rostilos.codecrow.astparser;
1415
requires org.rostilos.codecrow.analysisapi;
1516
requires transitive org.rostilos.codecrow.queue;
1617
requires codecrow.events;

java-ecosystem/libs/analysis-engine/src/main/java/org/rostilos/codecrow/analysisengine/processor/analysis/BranchAnalysisProcessor.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.rostilos.codecrow.analysisengine.dto.request.processor.BranchProcessRequest;
1111
import org.rostilos.codecrow.analysisengine.exception.AnalysisLockedException;
1212
import org.rostilos.codecrow.analysisengine.service.branch.*;
13+
import org.rostilos.codecrow.analysisengine.service.AstScopeEnricher;
1314
import org.rostilos.codecrow.analysisengine.util.DiffParsingUtils;
1415
import org.rostilos.codecrow.analysisengine.service.AnalysisLockService;
1516
import org.rostilos.codecrow.analysisengine.service.ProjectValidationService;
@@ -85,6 +86,7 @@ public class BranchAnalysisProcessor {
8586
private final CodeAnalysisService codeAnalysisService;
8687
private final AiAnalysisClient aiAnalysisClient;
8788
private final PullRequestService pullRequestService;
89+
private final AstScopeEnricher astScopeEnricher;
8890

8991
/**
9092
* Optional RAG operations service — can be null if RAG module is not deployed.
@@ -108,6 +110,7 @@ public BranchAnalysisProcessor(
108110
CodeAnalysisService codeAnalysisService,
109111
AiAnalysisClient aiAnalysisClient,
110112
PullRequestService pullRequestService,
113+
AstScopeEnricher astScopeEnricher,
111114
@Autowired(required = false) RagOperationsService ragOperationsService) {
112115
this.projectService = projectService;
113116
this.branchRepository = branchRepository;
@@ -125,6 +128,7 @@ public BranchAnalysisProcessor(
125128
this.codeAnalysisService = codeAnalysisService;
126129
this.aiAnalysisClient = aiAnalysisClient;
127130
this.pullRequestService = pullRequestService;
131+
this.astScopeEnricher = astScopeEnricher;
128132
this.ragOperationsService = ragOperationsService;
129133
}
130134

@@ -700,6 +704,18 @@ private void performDirectPushAnalysisIfNeeded(
700704
? directPushAnalysis.getIssues().size()
701705
: 0;
702706

707+
// === AST scope enrichment for direct push issues ===
708+
try {
709+
if (directPushAnalysis.getIssues() != null && !directPushAnalysis.getIssues().isEmpty()
710+
&& !fileContents.isEmpty()) {
711+
astScopeEnricher.enrichWithAstScopes(
712+
directPushAnalysis.getIssues(), fileContents);
713+
}
714+
} catch (Exception astEx) {
715+
log.warn("AST scope enrichment failed for direct push (non-critical): {}",
716+
astEx.getMessage());
717+
}
718+
703719
log.info("Direct push analysis completed: project={}, branch={}, commit={}, {} issues found",
704720
project.getId(), request.getTargetBranchName(),
705721
request.getCommitHash(), issuesFound);

java-ecosystem/libs/analysis-engine/src/main/java/org/rostilos/codecrow/analysisengine/processor/analysis/PullRequestAnalysisProcessor.java

Lines changed: 117 additions & 80 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)