nikivdev/code · error

Queued commit {} does not have a clean review (missing). Re-

Error message

Queued commit {} does not have a clean review (missing). Re-run review, or re-run with --allow-unreviewed.

What it means

Second approve-time gate in `run_commit_queue` (src/commit.rs:9282): for queue entries of version >= 2 with `review_completed == false`, approval is refused because the commit has no clean review on record; it requires a (re)run of review or an explicit `--allow-unreviewed` override.

Source

Thrown at src/commit.rs:9282

            };
            let _ = refresh_queue_entry_commit(&repo_root, &mut entry);

            let issues_present = entry.review_issues_found
                || entry
                    .review
                    .as_deref()
                    .map(|s| !s.trim().is_empty())
                    .unwrap_or(false);
            let unreviewed = entry.version >= 2 && !entry.review_completed;

            if issues_present && !allow_issues && !force {
                bail!(
                    "Queued commit {} has review issues. Fix them, or re-run with --allow-issues.",
                    short_sha(&entry.commit_sha)
                );
            }
            if unreviewed && !effective_allow_unreviewed && !force {
                bail!(
                    "Queued commit {} does not have a clean review (missing). Re-run review, or re-run with --allow-unreviewed.",
                    short_sha(&entry.commit_sha)
                );
            }
            if entry.review_timed_out && !force {
                eprintln!(
                    "note: review timed out for {}; approving anyway (re-run `f commit-queue review {}` if you want a full review)",
                    short_sha(&entry.commit_sha),
                    short_sha(&entry.commit_sha)
                );
            }

            let head_sha = git_capture_in(&repo_root, &["rev-parse", "HEAD"])?;
            let head_sha = head_sha.trim();
            if head_sha != entry.commit_sha && !force {
                bail!(
                    "Queued commit {} is not at HEAD (current HEAD is {}). Checkout the commit or re-run with --force.",
                    short_sha(&entry.commit_sha),

View on GitHub (pinned to a747e741ae)

Solutions

  1. Run `f commit-queue review <hash>` (or --all) to complete a review, then approve.
  2. If intentionally approving without review, re-run with `--allow-unreviewed`.
  3. Use `--force` to bypass all gates deliberately.
  4. If a review actually completed but state wasn't saved, re-run review to refresh the entry.

Example fix

// before
f commit-queue approve 9abc123
// after
f commit-queue review 9abc123
f commit-queue approve 9abc123
// or, deliberately unreviewed
f commit-queue approve 9abc123 --allow-unreviewed
Defensive patterns

Strategy: validation

Validate before calling

let entry = find_entry(hash)?;
if entry.version >= 2 && !entry.review_completed && !allow_unreviewed && !force {
    bail!("entry {} is unreviewed; run review first or pass --allow-unreviewed", entry.commit_sha);
}

Type guard

fn has_completed_review(entry: &CommitQueueEntry) -> bool {
    entry.version < 2 || entry.review_completed
}

Try / catch

match approve_queued(hash) {
    Err(e) if e.to_string().contains("does not have a clean review") => {
        eprintln!("{e}; run `f commit-queue review` first or pass --allow-unreviewed");
    }
    other => other?,
}

Prevention

When it happens

Trigger: `f commit-queue approve <hash>` where the entry is v2+ and was never reviewed or the review never completed, and neither --allow-unreviewed nor --force was passed.

Common situations: Queuing a commit and approving it before ever running review; a review run that timed out or was interrupted so review_completed stayed false; entries migrated to the v2 schema without review state.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/cfcfefa581fec668. Report an issue: GitHub.