{"record":{"id":"e40a106a2ba52ca2","repo":"atuinsh/atuin","slug":"unknown-var-record-version-other","errorCode":null,"errorMessage":"unknown var record version {other:?}","messagePattern":"unknown var record version (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-dotfiles/src/store/var.rs","lineNumber":90,"sourceCode":"                        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 {\n    // will want to init the actual kv store when that is done\n    #[must_use]\n    pub fn new(store: SqliteStore, host_id: HostId, encryption_key: paseto_v4::Key) -> Self {\n        Self {\n            store,","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-dotfiles/src/store/var.rs#L72-L108","documentation":"The var record decoder reads a leading version byte and only implements the versions it knows. Any other version byte triggers 'unknown var record version'. This prevents misinterpreting a payload whose wire format differs.","triggerScenarios":"Deserializing a var record payload written with a format version not present in this build — typically newer-format records synced to an older client.","commonSituations":"Version skew between machines syncing the same atuin account; restoring an old backup against newer records.","solutions":["Upgrade atuin so the record version is supported","Skip/ignore unknown-version records during sync","Re-create the dotfiles data with the current atuin version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check the version byte of the var record payload\n// fn is_supported_var_version(payload: &[u8]) -> bool {\n//     payload.first() == Some(&VAR_KNOWN_VERSION)\n// }","typeGuard":"fn is_supported_var_version(payload: &[u8]) -> bool {\n    payload.first() == Some(&VAR_KNOWN_VERSION)\n}","tryCatchPattern":"match VarRecord::deserialize(&mut bytes) {\n    Ok(rec) => apply(rec),\n    Err(e) if e.to_string().contains(\"unknown var record version\") => {\n        log::warn!(\"var record format version unsupported; upgrade atuin\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Avoid running older atuin clients against records written by newer ones","Confirm format version bumps in release notes before upgrades/downgrades","Re-export dotfiles data if restoring from a mixed-version backup"],"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"}