From 3c63913427e465bc69ba01a3b511812b6f9efb7b Mon Sep 17 00:00:00 2001 From: rostislav Date: Fri, 21 Aug 2026 12:31:58 +0300 Subject: [PATCH] [fix] RAG index generation stuck --- .../python/codecrow_plugins/graphql.py | 5 +- .../python/codecrow_plugins/runtime.py | 31 +++++++++++- ...test_data_contracts_repository_analysis.py | 47 +++++++++++++++++++ .../test_repository_runtime_resilience.py | 12 ++++- .../__init__.py | 21 ++++++++- .../rag/RagBranchIndexRepository.java | 4 +- .../BranchIndexBuildAdmissionService.java | 3 +- .../service/RagIndexTrackingService.java | 11 ++++- .../service/RagOperationsServiceImpl.java | 3 +- .../BranchIndexBuildAdmissionServiceTest.java | 9 +++- .../service/RagIndexTrackingServiceTest.java | 27 +++++++++++ .../service/RagOperationsServiceImplTest.java | 6 ++- .../core/index_manager/indexer.py | 44 ++++++++++++++++- 13 files changed, 209 insertions(+), 14 deletions(-) diff --git a/analysis-plugins/contracts/python/codecrow_plugins/graphql.py b/analysis-plugins/contracts/python/codecrow_plugins/graphql.py index 129e5fd1..a8eebb3f 100644 --- a/analysis-plugins/contracts/python/codecrow_plugins/graphql.py +++ b/analysis-plugins/contracts/python/codecrow_plugins/graphql.py @@ -9,7 +9,10 @@ _TOKEN = re.compile( r"(?P\s+)" r"|(?P\#[^\r\n]*)" - r"|(?P\"\"\"(?:.|\n)*?\"\"\")" + # DOTALL already makes ``.`` consume newlines. ``(?:.|\n)`` gave the + # regex engine two ways to consume every newline and caused exponential + # backtracking on Java text blocks that were not GraphQL documents. + r"|(?P\"\"\".*?\"\"\")" r"|(?P