Skip to content

Chunked review: summary footer says 'No issues found across all chunks' even when issues were found #556

Description

@ajianaz

What

In chunked review mode (--max-diff-size), the merged report can print a contradictory footer: the header says Found 1 issue: ... ⚠ BLOCKED while the summary footer says No issues found across all chunks. — in the same output.

Live evidence: codecoradev/gaira PR #108, cora-review verdict comment for run #1388 (2026-10-04): "Found 1 issue: 0 critical 1 major" + "⚠ BLOCKED" + "No issues found across all chunks."

Why

src/commands/review.rs (chunked merge path): the merged_summary fallback keys only off summaries.is_empty() and any_error. Chunks that RETURN issues but with an empty summary field push nothing into summaries, so the no-findings fallback fires even though all_issues is non-empty.

Suggested fix

Make the fallback consult all_issues first:

let merged_summary = if summaries.is_empty() {
    if !all_issues.is_empty() {
        format!("{} issue(s) found across chunks.", all_issues.len())
    } else if any_error {
        "Review completed with partial results (some chunks failed).".to_string()
    } else {
        "No issues found across all chunks.".to_string()
    }
} else {
    summaries.join("\n\n")
};

Gating is unaffected (exit code derives from should_block, which was correct in the live case) — this is report text only. Repro: any diff above --max-diff-size where the model returns issues with empty per-chunk summaries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions