Skip to content

Reduce cora review false positives by injecting static analysis context #140

Closed

Description

@ajianaz

Problem

Cora review produces false positives when reviewing intentional code changes that static analysis already verified:

  • match_same_arms merge (e.g., "suggestion" | "info" => X + _ => X → _ => X) flagged as "drops explicit matching"
  • Dead code removal flagged as "Error" when zero callers exist
  • These are valid changes verified by cargo clippy and Rust compiler

Root Cause

Cora LLM prompt only sees the diff — it doesn't know that:

  1. cargo clippy already verified the change (clippy suggested the merge)
  2. The compiler verified no callers exist (dead code)
  3. Pattern matching is still exhaustive

Solution

Inject static analysis context into the cora review prompt:

  • Include relevant clippy lint names/outputs for changed code
  • For dead code: note that compiler verified zero callers
  • For pattern merges: note that clippy match_same_arms triggered the change

Acceptance Criteria

  • Cora review prompt includes clippy context when available
  • False positive rate reduced (measure: review same PR before/after)
  • No increase in false negatives (don't miss real issues)

Related

Activity

  1. added
    enhancement
    on Jun 2, 2026
  2. added a commit that references this issue on Jun 2, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions