{"record":{"id":"cfcfefa581fec668","repo":"nikivdev/code","slug":"queued-commit-does-not-have-a-clean-review-mis","errorCode":null,"errorMessage":"Queued commit {} does not have a clean review (missing). Re-run review, or re-run with --allow-unreviewed.","messagePattern":"Queued commit (.+?) does not have a clean review \\(missing\\)\\. Re-run review, or re-run with --allow-unreviewed\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":9282,"sourceCode":"            };\n            let _ = refresh_queue_entry_commit(&repo_root, &mut entry);\n\n            let issues_present = entry.review_issues_found\n                || entry\n                    .review\n                    .as_deref()\n                    .map(|s| !s.trim().is_empty())\n                    .unwrap_or(false);\n            let unreviewed = entry.version >= 2 && !entry.review_completed;\n\n            if issues_present && !allow_issues && !force {\n                bail!(\n                    \"Queued commit {} has review issues. Fix them, or re-run with --allow-issues.\",\n                    short_sha(&entry.commit_sha)\n                );\n            }\n            if unreviewed && !effective_allow_unreviewed && !force {\n                bail!(\n                    \"Queued commit {} does not have a clean review (missing). Re-run review, or re-run with --allow-unreviewed.\",\n                    short_sha(&entry.commit_sha)\n                );\n            }\n            if entry.review_timed_out && !force {\n                eprintln!(\n                    \"note: review timed out for {}; approving anyway (re-run `f commit-queue review {}` if you want a full review)\",\n                    short_sha(&entry.commit_sha),\n                    short_sha(&entry.commit_sha)\n                );\n            }\n\n            let head_sha = git_capture_in(&repo_root, &[\"rev-parse\", \"HEAD\"])?;\n            let head_sha = head_sha.trim();\n            if head_sha != entry.commit_sha && !force {\n                bail!(\n                    \"Queued commit {} is not at HEAD (current HEAD is {}). Checkout the commit or re-run with --force.\",\n                    short_sha(&entry.commit_sha),","sourceCodeStart":9264,"sourceCodeEnd":9300,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L9264-L9300","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Run `f commit-queue review <hash>` (or --all) to complete a review, then approve.","If intentionally approving without review, re-run with `--allow-unreviewed`.","Use `--force` to bypass all gates deliberately.","If a review actually completed but state wasn't saved, re-run review to refresh the entry."],"exampleFix":"// before\nf commit-queue approve 9abc123\n// after\nf commit-queue review 9abc123\nf commit-queue approve 9abc123\n// or, deliberately unreviewed\nf commit-queue approve 9abc123 --allow-unreviewed","handlingStrategy":"validation","validationCode":"let entry = find_entry(hash)?;\nif entry.version >= 2 && !entry.review_completed && !allow_unreviewed && !force {\n    bail!(\"entry {} is unreviewed; run review first or pass --allow-unreviewed\", entry.commit_sha);\n}","typeGuard":"fn has_completed_review(entry: &CommitQueueEntry) -> bool {\n    entry.version < 2 || entry.review_completed\n}","tryCatchPattern":"match approve_queued(hash) {\n    Err(e) if e.to_string().contains(\"does not have a clean review\") => {\n        eprintln!(\"{e}; run `f commit-queue review` first or pass --allow-unreviewed\");\n    }\n    other => other?,\n}","preventionTips":["Always run review between queue and approve; automate review -> approve as one pipeline step.","Check `review_completed` on the entry before approving in scripts.","Re-run review if it timed out or was interrupted so review_completed is refreshed.","Reserve --allow-unreviewed for deliberate exceptions, not the default flow."],"tags":["commit-queue","unreviewed","approval-gate"],"backgroundTag":"unreviewed-commit-approval-blocked","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}