{"record":{"id":"7220201be20ae5aa","repo":"atuinsh/atuin","slug":"unknown-alias-record-version-other","errorCode":null,"errorMessage":"unknown alias record version {other:?}","messagePattern":"unknown alias record version (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-dotfiles/src/store.rs","lineNumber":112,"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 shell alias record. malformed\");\n                        }\n\n                        Ok(Self::Delete(key.to_owned()))\n                    }\n\n                    n => {\n                        bail!(\"unknown AliasRecord type {n}\");\n                    }\n                }\n            }\n            other => {\n                bail!(\"unknown alias record version {other:?}\");\n            }\n        }\n    }\n}\n\n#[derive(Debug, Clone)]\npub struct AliasStore {\n    pub store: SqliteStore,\n    pub host_id: HostId,\n    pub encryption_key: paseto_v4::Key,\n}\n\nimpl AliasStore {\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":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-dotfiles/src/store.rs#L94-L130","documentation":"AliasRecord::deserialize first reads a version byte from the record payload. If that byte is not a version this decoder understands, it throws 'unknown alias record version'. This guards against decoding payloads whose wire format has changed.","triggerScenarios":"Deserializing an AliasRecord payload whose leading version byte differs from the versions compiled into this crate — e.g. data written by a newer atuin release with a bumped record format version.","commonSituations":"Downgraded or old atuin binary syncing records created by a newer version; mixing client versions across machines sharing a sync account.","solutions":["Upgrade atuin-dotfiles/atuin to the latest release so the new version byte is understood","Exclude or delete records with unknown versions from the local store","Pin all syncing machines to compatible atuin versions"],"exampleFix":"// before: fail on unknown version\nlet version = bytes[0];\n// after: reject explicitly with a migration hint\nlet version = bytes[0];\nif version > KNOWN_VERSION {\n    return Err(eyre!(\"alias record version {version} requires atuin >= x.y; please upgrade\"));\n}","handlingStrategy":"try-catch","validationCode":"// Check the version byte before decoding\n// fn is_supported_alias_version(payload: &[u8]) -> bool {\n//     matches!(payload.first(), Some(&KNOWN_ALIAS_VERSION))\n// }","typeGuard":"fn is_supported_alias_version(payload: &[u8]) -> bool {\n    payload.first() == Some(&ALIAS_KNOWN_VERSION)\n}","tryCatchPattern":"match AliasRecord::deserialize(&mut bytes) {\n    Ok(rec) => apply(rec),\n    Err(e) if e.to_string().contains(\"unknown alias record version\") => {\n        log::warn!(\"alias record written by newer atuin; upgrade to read it\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Pin all machines sharing a sync account to compatible atuin versions","Check release notes for record-format version bumps before downgrading","Back up the record store before version changes"],"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"}