{"record":{"id":"6ce53a6c77d37719","repo":"zed-industries/zed","slug":"instruction-suffix-file-is-empty","errorCode":null,"errorMessage":"instruction suffix file is empty","messagePattern":"instruction suffix file is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/eval_cli/src/main.rs","lineNumber":416,"sourceCode":"            .read_to_string(&mut buf)\n            .context(\"reading instruction from stdin\")?;\n        buf\n    };\n    anyhow::ensure!(!text.trim().is_empty(), \"instruction is empty\");\n\n    if let Some(path) = &args.instruction_suffix_file {\n        let suffix = read_instruction_suffix_file(path)?;\n        text.push_str(\"\\n\\n\");\n        text.push_str(&suffix);\n    }\n    Ok(text)\n}\n\nfn read_instruction_suffix_file(path: &PathBuf) -> Result<String> {\n    let suffix = std::fs::read_to_string(path)\n        .with_context(|| format!(\"reading instruction suffix file {}\", path.display()))?;\n    let suffix = suffix.trim().to_string();\n    anyhow::ensure!(!suffix.is_empty(), \"instruction suffix file is empty\");\n    Ok(suffix)\n}\n\nasync fn wait_for_model(selected: &SelectedModel, cx: &mut AsyncApp) -> Result<()> {\n    let started_at = Instant::now();\n\n    loop {\n        let found = cx.update(|cx| find_available_model(selected, cx).is_some());\n        if found {\n            return Ok(());\n        }\n\n        cx.update(|cx| ensure_provider_authenticated(selected, cx))?;\n\n        let selected_provider_has_models = cx.update(|cx| {\n            LanguageModelRegistry::global(cx)\n                .read(cx)\n                .available_models(cx)","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/src/main.rs#L398-L434","documentation":"The file given via --instruction-suffix-file was read successfully but its contents are empty/whitespace-only, so appending it would add nothing. An ensure! guard (analogous to the main instruction check) rejects the empty suffix file as a usage error.","triggerScenarios":"Thrown at crates/eval_cli/src/main.rs:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Put the intended suffix content (few-shot examples, extra constraints) into the file","Omit --instruction-suffix-file entirely if no suffix is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}