{"record":{"id":"aa94bef4bd29ecc3","repo":"openai/codex","slug":"review-prompt-cannot-be-empty-aa94be","errorCode":null,"errorMessage":"Review prompt cannot be empty","messagePattern":"Review prompt cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/prompts/src/review_request.rs","lineNumber":94,"sourceCode":"            }\n        }\n        ReviewTarget::Commit { sha, title } => {\n            if let Some(title) = title {\n                Ok(render_review_prompt(\n                    &COMMIT_PROMPT_WITH_TITLE_TEMPLATE,\n                    [(\"sha\", sha.as_str()), (\"title\", title.as_str())],\n                ))\n            } else {\n                Ok(render_review_prompt(\n                    &COMMIT_PROMPT_TEMPLATE,\n                    [(\"sha\", sha.as_str())],\n                ))\n            }\n        }\n        ReviewTarget::Custom { instructions } => {\n            let prompt = instructions.trim();\n            if prompt.is_empty() {\n                anyhow::bail!(\"Review prompt cannot be empty\");\n            }\n            Ok(prompt.to_string())\n        }\n    }\n}\n\nfn render_review_prompt<'a, const N: usize>(\n    template: &Template,\n    variables: [(&'a str, &'a str); N],\n) -> String {\n    template\n        .render(variables)\n        .unwrap_or_else(|err| panic!(\"review prompt template must render: {err}\"))\n}\n\npub fn user_facing_hint(target: &ReviewTarget) -> String {\n    match target {\n        ReviewTarget::UncommittedChanges => \"current changes\".to_string(),","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/prompts/src/review_request.rs#L76-L112","documentation":"Error \"Review prompt cannot be empty\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/prompts/src/review_request.rs:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}