{"record":{"id":"4e7a3115b3aa16d3","repo":"BigPizzaV3/CodexPlusPlus","slug":"invalid-runtime-file-path","errorCode":null,"errorMessage":"invalid runtime file path","messagePattern":"invalid runtime file path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/computer_use_guard.rs","lineNumber":440,"sourceCode":"        return Ok(None);\n    };\n    if exports.contains_key(SKY_INTERNAL_COMPUTER_USE_CLIENT_EXPORT) {\n        return Ok(None);\n    }\n    exports.insert(\n        SKY_INTERNAL_COMPUTER_USE_CLIENT_EXPORT.to_string(),\n        serde_json::Value::String(SKY_INTERNAL_COMPUTER_USE_CLIENT_EXPORT.to_string()),\n    );\n    let mut updated = serde_json::to_string_pretty(&package)?;\n    updated.push('\\n');\n    Ok(Some(updated))\n}\n\n#[cfg(windows)]\nfn atomic_write_runtime_file(path: &Path, bytes: &[u8]) -> anyhow::Result<()> {\n    let parent = path\n        .parent()\n        .ok_or_else(|| anyhow::anyhow!(\"invalid runtime file path\"))?;\n    let temp = parent.join(format!(\n        \".{}.codexpp-tmp\",\n        path.file_name()\n            .and_then(|value| value.to_str())\n            .unwrap_or(\"package.json\")\n    ));\n    std::fs::write(&temp, bytes).with_context(|| format!(\"failed to write {}\", temp.display()))?;\n    match std::fs::rename(&temp, path) {\n        Ok(()) => Ok(()),\n        Err(error) => {\n            let _ = std::fs::remove_file(&temp);\n            Err(error).with_context(|| format!(\"failed to replace {}\", path.display()))\n        }\n    }\n}\n\n#[cfg(windows)]\npub(crate) fn ensure_openai_bundled_marketplace(home: &Path) -> anyhow::Result<Option<PathBuf>> {","sourceCodeStart":422,"sourceCodeEnd":458,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/fb3ebd9a82383aedd8d098aa9ae3aef9426d13a4/crates/codex-plus-core/src/computer_use_guard.rs#L422-L458","documentation":"Path guard in the Windows atomic runtime-file writer: the runtime file path handed to the guarded write has no valid parent directory (or is otherwise invalid), so an atomic replace into its parent cannot be performed. Generic sentinel fired before any filesystem mutation.","triggerScenarios":"Thrown at crates/codex-plus-core/src/computer_use_guard.rs:440 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the runtime file path is absolute with a parent directory","Create the target directory before the guarded write","Fix corrupted settings that may supply an empty path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb3ebd9a82383aedd8d098aa9ae3aef9426d13a4","analyzedAt":"2026-08-17T11:35:12.031Z","contentChangedAt":"2026-08-17T11:35:12.031Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}