{"record":{"id":"f09c43852399dbd8","repo":"zed-industries/zed","slug":"failed-to-create-markdown-output-directory","errorCode":null,"errorMessage":"Failed to create markdown output directory","messagePattern":"Failed to create markdown output directory","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/main.rs","lineNumber":1252,"sourceCode":"                        }\n                    }\n                    Command::Qa(args) => {\n                        qa::sync_batches(args).await?;\n                    }\n                    Command::Repair(args) => {\n                        repair::sync_batches(args).await?;\n                    }\n                    _ => (),\n                }\n\n                let failfast_on_single_example = examples.len() == 1;\n\n                // For --markdown mode, create the output directory if it doesn't exist\n                if args.markdown {\n                    let dir = output.as_ref().expect(\"--markdown requires -o\");\n                    if !dir.exists() {\n                        std::fs::create_dir_all(dir)\n                            .expect(\"Failed to create markdown output directory\");\n                    }\n                }\n\n                // Set up JSONL output writer (not used in markdown mode)\n                let mut output_sender: Option<mpsc::UnboundedSender<String>> = None;\n                let mut in_place_temp_path: Option<PathBuf> = None;\n                if !args.markdown\n                    && let Some(output_path) = output.as_ref()\n                {\n                    let write_path = if args.in_place {\n                        let temp = output_path.with_extension(\"jsonl.tmp\");\n                        in_place_temp_path = Some(temp.clone());\n                        temp\n                    } else {\n                        output_path.clone()\n                    };\n\n                    let file = OpenOptions::new()","sourceCodeStart":1234,"sourceCodeEnd":1270,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/main.rs#L1234-L1270","documentation":"A panic in the edit-prediction CLI when --markdown mode is enabled and create_dir_all on the output directory fails (e.g. permission denied or a file exists at that path). The markdown reports cannot be written, so the run aborts.","triggerScenarios":"Thrown at crates/edit_prediction_cli/src/main.rs:1252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the `-o` path's parent is writable and not an existing file","Use a different output directory","Check filesystem permissions or disk errors"],"exampleFix":null,"handlingStrategy":"retry","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-14T05:17:10.506Z"}