{"record":{"id":"84ae29d023236d84","repo":"openai/codex","slug":"opaque-fallback-path-uri-path-cannot-be-recove","errorCode":null,"errorMessage":"opaque fallback path URI `{path}` cannot be recovered as a native path","messagePattern":"opaque fallback path URI `(.+?)` cannot be recovered as a native path","errorType":"exception","errorClass":"LegacyAppPathStringError","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/path-uri/src/api_path_string.rs","lineNumber":352,"sourceCode":"}\n\nfn 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\"]","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/path-uri/src/api_path_string.rs#L334-L370","documentation":"The OpaqueFallback variant of LegacyAppPathStringError: the PathUri was created as an opaque fallback (from_path_uri could not build a real filesystem path), and render_windows_path was then asked to recover a native Windows path from it. Opaque URIs intentionally carry no recoverable native path, so conversion is impossible.","triggerScenarios":"Thrown at codex-rs/utils/path-uri/src/api_path_string.rs:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep the value as a URI string instead of forcing native-path conversion","Reconstruct the PathUri from the original absolute path rather than the fallback","Handle the opaque case upstream and skip path-based operations for it"],"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"}