Skip to content

fix: stabilize analysis orchestration and RAG generation lifecycle - #250

Merged
rostilos merged 1 commit into
1.8.1-rcfrom
feature/public-share-links
Aug 12, 2026
Merged

fix: stabilize analysis orchestration and RAG generation lifecycle#250
rostilos merged 1 commit into
1.8.1-rcfrom
feature/public-share-links

Conversation

@rostilos

Copy link
Copy Markdown
Owner
  • prevent PR reviews from synchronously starting or waiting for repository RAG builds
  • clarify and rate-limit cross-type PR/branch dependency wait events
  • keep unrelated PRs and branches independently executable
  • harden analysis locks, leases, ownership fencing, and durable job recovery
  • fix detached RAG generation proxy failures during incremental updates
  • build exact generations from complete revision-pinned repository snapshots
  • reuse compatible vectors from the previous immutable generation
  • make RAG cleanup, alias reconciliation, and queue shutdown reliable
  • bound repeated outage diagnostics and remove duplicate terminal events
  • preserve compatibility with existing Qdrant collections and configuration
  • add regression coverage across Pipeline Agent, RAG, and Inference services

- prevent PR reviews from synchronously starting or waiting for repository RAG builds
- clarify and rate-limit cross-type PR/branch dependency wait events
- keep unrelated PRs and branches independently executable
- harden analysis locks, leases, ownership fencing, and durable job recovery
- fix detached RAG generation proxy failures during incremental updates
- build exact generations from complete revision-pinned repository snapshots
- reuse compatible vectors from the previous immutable generation
- make RAG cleanup, alias reconciliation, and queue shutdown reliable
- bound repeated outage diagnostics and remove duplicate terminal events
- preserve compatibility with existing Qdrant collections and configuration
- add regression coverage across Pipeline Agent, RAG, and Inference services
@codecrow-local

codecrow-local Bot commented Aug 12, 2026

Copy link
Copy Markdown

⚠️ Code Analysis Results

Quality Gate Default Quality Gate: 🔴 FAILED

  • MEDIUM Issues by Severity > 0 (actual: 1) - FAILED

Summary

Pull Request Review: fix: stabilize analysis orchestration and RAG generation lifecycle

Status PASS WITH WARNINGS
Risk Level MEDIUM
Review Coverage 17 files analyzed in depth
Confidence MEDIUM

Executive Summary

This PR stabilizes analysis orchestration and the RAG generation lifecycle across the Java analysis/RAG services and Python indexing pipeline. The cross-file review found no critical or high-severity blockers, and the intended lifecycle, reuse, client compatibility, and admission-flow changes are broadly coherent. Test validation has a medium-severity concern, so the PR should receive targeted test fixes before merging.

Recommendation

Decision: PASS WITH WARNINGS

Proceed with review approval subject to correcting the affected test assertions and confirming the test suite passes. No critical or high-severity implementation blockers were identified.

Issues Overview

Severity Count
🟡 Medium 1 Issues that should be addressed

Analysis completed on 2026-08-12 21:14:06 | View Full Report | Pull Request


📋 Detailed Issues (1)

🟡 Medium Severity Issues

Id on Platform: 4063

Category: 🧪 Testing

File: .../branch/BranchAnalysisGateServiceTest.java:66

Wait event assertions expect one invocation

The changed assertions use verify(consumer) without an explicit invocation count, which means exactly one invocation in Mockito. In branchJobWithoutPrContextWaitsOnlyForEarlierPrJobs, the repository is configured to return true three times before false, and the gate emits a wait event on each blocking iteration, so the consumer receives three events. The same mistake appears in prWaitsOnlyForOlderBranchJobsOnItsTargetBranch, where two true responses produce two events. These tests therefore fail against the current gate behavior and no longer validate the expected event count. The current gate implementation emits emitWait/emitBranchWait inside each wait-loop iteration (RAG-5af2ab205aa9f737).

💡 Suggested Fix

Restore the expected invocation counts (times(3) and times(2)), or use an explicit atLeastOnce() assertion if the exact polling count is intentionally nondeterministic. Keep the event-schema matcher on the counted verification.

View Issue Details


Files Affected

  • .../branch/BranchAnalysisGateServiceTest.java: 1 issue

@rostilos
rostilos merged commit 9296e6d into 1.8.1-rc Aug 12, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 86346d14-311f-40de-9d0a-2a2b01fc8020

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecrow-local codecrow-local Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeCrow Review

Actionable comments posted: 1

Each finding below is attached to the relevant changed line. The complete analysis remains available in the CodeCrow summary comment.

assertThat(result).isEqualTo(BranchAnalysisGateService.GateResult.READY);
verify(jobRepository, times(4)).existsActivePrAnalysisJobBefore(1L, "main", 103L);
verify(consumer, times(3)).accept(org.mockito.ArgumentMatchers.argThat(
verify(consumer).accept(org.mockito.ArgumentMatchers.argThat(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM | Testing

Wait event assertions expect one invocation

The changed assertions use verify(consumer) without an explicit invocation count, which means exactly one invocation in Mockito. In branchJobWithoutPrContextWaitsOnlyForEarlierPrJobs, the repository is configured to return true three times before false, and the gate emits a wait event on each blocking iteration, so the consumer receives three events. The same mistake appears in prWaitsOnlyForOlderBranchJobsOnItsTargetBranch, where two true responses produce two events. These tests therefore fail against the current gate behavior and no longer validate the expected event count. The current gate implementation emits emitWait/emitBranchWait inside each wait-loop iteration (RAG-5af2ab205aa9f737).

💡 Suggested fix

Restore the expected invocation counts (times(3) and times(2)), or use an explicit atLeastOnce() assertion if the exact polling count is intentionally nondeterministic. Keep the event-schema matcher on the counted verification.

View issue in CodeCrow

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.

1 participant