{"record":{"id":"c44a3e2cf001873d","repo":"atuinsh/atuin","slug":"unknown-dotfiles-var-record-type-n","errorCode":null,"errorMessage":"unknown Dotfiles var record type {n}","messagePattern":"unknown Dotfiles var record type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-dotfiles/src/store/var.rs","lineNumber":85,"sourceCode":"                    // delete\n                    1 => {\n                        let nfields = decode::read_array_len(&mut bytes).map_err(error_report)?;\n                        ensure!(nfields == 1, \"too many entries in v0 dotfiles var delete record\");\n\n                        let bytes = bytes.remaining_slice();\n\n                        let (key, bytes) =\n                            decode::read_str_from_slice(bytes).map_err(error_report)?;\n\n                        if !bytes.is_empty() {\n                            bail!(\"trailing bytes in encoded dotfiles var record. malformed\");\n                        }\n\n                        Ok(Self::Delete(key.to_owned()))\n                    }\n\n                    n => {\n                        bail!(\"unknown Dotfiles var record type {n}\");\n                    }\n                }\n            }\n            other => {\n                bail!(\"unknown var record version {other:?}\");\n            }\n        }\n    }\n}\n\n#[derive(Debug, Clone)]\npub struct VarStore {\n    pub store: SqliteStore,\n    pub host_id: HostId,\n    pub encryption_key: paseto_v4::Key,\n}\n\nimpl VarStore {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-dotfiles/src/store/var.rs#L67-L103","documentation":"The dotfiles var record decoder matches a record-type byte after the version. If the byte is not a known var record variant (Set/Delete), it throws 'unknown Dotfiles var record type'. This indicates a payload type this decoder does not implement.","triggerScenarios":"Deserializing (directly or via sync) a var record payload with an unrecognized type byte, usually produced by a newer atuin version that introduced a new var record operation.","commonSituations":"Older atuin client receiving records from a newer client; corrupted payload flipping the type byte.","solutions":["Upgrade atuin to a build supporting the new var record type","Skip records that fail to decode rather than aborting sync","Remove the offending record from the store"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Peek the var record type byte (after version byte) before decoding\n// fn is_known_var_type(payload: &[u8]) -> bool {\n//     matches!(payload.get(1), Some(0) | Some(1))\n// }","typeGuard":"fn is_known_var_type(payload: &[u8]) -> bool {\n    matches!(payload.get(1), Some(0) | Some(1))\n}","tryCatchPattern":"match VarRecord::deserialize(&mut bytes) {\n    Ok(rec) => apply(rec),\n    Err(e) if e.to_string().contains(\"unknown Dotfiles var record type\") => {\n        log::warn!(\"skipping var record with unknown type\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep atuin versions consistent across synced machines","Upgrade before pulling records written by newer clients","Skip-and-log unknown record types during sync"],"tags":["deserialization","record-store","versioning"],"backgroundTag":"unsupported-enum-value","analyzedSha":"900007c48045867e7f44b0f9bc55ad9dbe99ee0d","analyzedAt":"2026-09-19T12:52:51.491Z","contentChangedAt":"2026-09-19T12:52:51.491Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}