{"record":{"id":"1584f372b1c73df3","repo":"openai/codex","slug":"label-schema-still-references-namespaced-definit","errorCode":null,"errorMessage":"{label} schema still references namespaced definitions; found {reference}","messagePattern":"(.+?) schema still references namespaced definitions; found (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-protocol/src/export.rs","lineNumber":1210,"sourceCode":"            if let Some(Value::String(reference)) = obj.get_mut(\"$ref\") {\n                *reference = reference.replace(prefix, replacement);\n            }\n            for child in obj.values_mut() {\n                rewrite_ref_prefix(child, prefix, replacement);\n            }\n        }\n        Value::Array(items) => {\n            for child in items {\n                rewrite_ref_prefix(child, prefix, replacement);\n            }\n        }\n        _ => {}\n    }\n}\n\nfn ensure_no_ref_prefix(value: &Value, prefix: &str, label: &str) -> Result<()> {\n    if let Some(reference) = first_ref_with_prefix(value, prefix) {\n        return Err(anyhow!(\n            \"{label} schema still references namespaced definitions; found {reference}\"\n        ));\n    }\n    Ok(())\n}\n\nfn first_ref_with_prefix(value: &Value, prefix: &str) -> Option<String> {\n    match value {\n        Value::Object(obj) => {\n            if let Some(Value::String(reference)) = obj.get(\"$ref\")\n                && reference.starts_with(prefix)\n            {\n                return Some(reference.clone());\n            }\n            obj.values()\n                .find_map(|child| first_ref_with_prefix(child, prefix))\n        }\n        Value::Array(items) => items","sourceCodeStart":1192,"sourceCodeEnd":1228,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-protocol/src/export.rs#L1192-L1228","documentation":"Error \"{label} schema still references namespaced definitions; found {reference}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server-protocol/src/export.rs:1210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}