{"record":{"id":"b6b508f75d264321","repo":"tracel-ai/burn","slug":"not-implemented-b6b508","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-store/src/nested/de.rs","lineNumber":775,"sourceCode":"    originator_field_name: Option<String>,\n}\n\nimpl DefaultDeserializer {\n    fn new(originator_field_name: Option<String>) -> Self {\n        Self {\n            originator_field_name,\n        }\n    }\n}\n\nimpl<'de> serde::Deserializer<'de> for DefaultDeserializer {\n    type Error = Error;\n\n    fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value, Self::Error>\n    where\n        V: Visitor<'de>,\n    {\n        unimplemented!()\n    }\n\n    fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>\n    where\n        V: Visitor<'de>,\n    {\n        visitor.visit_i32(Default::default())\n    }\n\n    fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>\n    where\n        V: Visitor<'de>,\n    {\n        visitor.visit_f32(Default::default())\n    }\n\n    fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>\n    where","sourceCodeStart":757,"sourceCodeEnd":793,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-store/src/nested/de.rs#L757-L793","documentation":"This Deserializer in burn-store's nested module implements only the concrete deserialize_* methods it needs (i32, etc.); deserialize_any is left as unimplemented!(). It panics whenever the deserialization is polymorphic — i.e. the Deserialize impl asks for 'any' rather than a concrete type.","triggerScenarios":"Deserializing a self-describing or dynamic value (e.g. serde_json::Value-like types, untagged enums, or anything whose Deserialize calls deserialize_any) via this nested deserializer.","commonSituations":"Using generic containers such as Box<dyn ...>, untagged/untagged-ish enums, or serde_json::Value inside types loaded through burn-store's nested record format.","solutions":["Replace dynamic types (serde_json::Value, untagged enums) in the deserialized structures with concrete typed fields","Pin the concrete type at the call site so a specific deserialize_* method is invoked","Implement deserialize_any in the adapter by dispatching on the actual nested value's type","Use a self-describing serde format for dynamic parts of the data"],"exampleFix":"// before\n#[derive(Deserialize)]\n#[serde(untagged)]\nenum Val { Int(i32), Float(f32) }\n\n// after\n#[derive(Deserialize)]\nstruct Val { value: f32 }","handlingStrategy":"type-guard","validationCode":"// ensure concrete primitive fields only; no untagged/dynamic types\nfn is_concrete_supported<T: serde::de::DeserializeOwned>() -> bool {\n    std::mem::size_of::<Option<T>>() > 0 // plus design review: no serde_json::Value/untagged enums\n}","typeGuard":"fn is_supported_primitive(v: &NestedValue) -> bool {\n    matches!(v, NestedValue::I32(_) | NestedValue::F32(_) | NestedValue::Bool(_) | NestedValue::String(_))\n}","tryCatchPattern":"let r = std::panic::catch_unwind(|| T::deserialize(nested));\nmatch r {\n    Ok(v) => v,\n    Err(_) => return Err(Error::UnsupportedDynamicType),\n}","preventionTips":["Never put serde_json::Value or untagged enums inside burn nested records","Use concrete typed fields so a specific deserialize_* method is called","Review new record fields for dynamic/serde-polymorphic types"],"tags":["rust","serde","deserialization","burn"],"backgroundTag":"unimplemented-serde-deserializer","analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}