Hmbown/CodeWhale · error

No review receipt found for the current diff. Run…

Error message

No review receipt found for the current diff. Run `codewhale review --write-receipt` first, or pass --receipt-path.

What it means

run_review_receipt_check found no stored receipt whose diff matches the current diff and no --receipt-path was given; receipt checking is diff-bound, so an unrelated or changed diff invalidates prior receipts.

Solutions

  1. Run `codewhale review --pr --write-receipt` first, then check.
  2. Pass --receipt-path pointing at an existing receipt file.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/lib.rs:9106 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/4b894e284f617040. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/lib.rs:9106

        );
    }
    Ok(())
}

fn run_review_receipt_check(
    diff: &str,
    args: &ReviewArgs,
    pr_view: Option<&GhPullRequest>,
) -> Result<()> {
    let (path, receipt) = if let Some(path) = args.receipt_path.as_ref() {
        (
            path.clone(),
            crate::tools::review::read_review_receipt(path)
                .with_context(|| format!("failed to read review receipt {}", path.display()))?,
        )
    } else {
        crate::tools::review::latest_review_receipt_for_diff(diff)?.ok_or_else(|| {
            anyhow!(
                "No review receipt found for the current diff. Run `codewhale review --write-receipt` first, or pass --receipt-path."
            )
        })?
    };
    let mut validation =
        crate::tools::review::validate_review_receipt_for_diff(diff, &receipt, Some(path.clone()));
    if validation.passed
        && pr_view
            .is_some_and(|view| !crate::tools::review::receipt_matches_pr_revision(&receipt, view))
    {
        validation.passed = false;
        validation.reason =
            "review receipt does not match the current PR base/head revision".into();
    }

    if args.json {
        println!(
            "{}",

View on GitHub (pinned to 73e0f67d83)