{"record":{"id":"54ed702cc7f2c533","repo":"openai/codex","slug":"path-uri-path-cannot-be-rendered-using-conven","errorCode":null,"errorMessage":"path URI `{path}` cannot be rendered using {convention} path syntax","messagePattern":"path URI `(.+?)` cannot be rendered using (.+?) path syntax","errorType":"exception","errorClass":"LegacyAppPathStringError","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/path-uri/src/api_path_string.rs","lineNumber":354,"sourceCode":"fn decode_native_segment(segment: &str) -> String {\n    // Decode exactly once. Thus `%20` becomes a space and `%252F` becomes the\n    // literal text `%2F`, rather than being decoded a second time into `/`.\n    let bytes = urlencoding::decode_binary(segment.as_bytes());\n    String::from_utf8_lossy(&bytes).into_owned()\n}\n\nfn incompatible_convention(path: &PathUri, convention: PathConvention) -> LegacyAppPathStringError {\n    LegacyAppPathStringError::IncompatibleConvention {\n        path: path.to_string(),\n        convention,\n    }\n}\n\n#[derive(Debug, Error, PartialEq, Eq)]\npub enum LegacyAppPathStringError {\n    #[error(\"opaque fallback path URI `{path}` cannot be recovered as a native path\")]\n    OpaqueFallback { path: String },\n    #[error(\"path URI `{path}` cannot be rendered using {convention} path syntax\")]\n    IncompatibleConvention {\n        path: String,\n        convention: PathConvention,\n    },\n    #[error(\n        \"path `{path}` is not absolute{convention}\",\n        convention = .convention.map(|convention| format!(\" using {convention} path syntax\")).unwrap_or_default()\n    )]\n    InvalidNativePath {\n        path: String,\n        convention: Option<PathConvention>,\n    },\n}\n\n#[cfg(test)]\n#[path = \"api_path_string_tests.rs\"]\nmod tests;\n","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/path-uri/src/api_path_string.rs#L336-L372","documentation":"The IncompatibleConvention variant of LegacyAppPathStringError: the PathUri's path convention (e.g. Unix) cannot be rendered with the requested Windows path syntax in render_windows_path. Cross-convention rendering is deliberately rejected instead of producing a wrong-but-plausible path.","triggerScenarios":"Thrown at codex-rs/utils/path-uri/src/api_path_string.rs:354 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Render the URI with its own native convention instead","Convert the path through a URI round-trip appropriate for the target OS","Reject cross-convention conversion at the call site and keep the URI form"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}