{"record":{"id":"f23ebc67afbae467","repo":"atuinsh/atuin","slug":"too-many-entries-in-v0-shell-alias-delete-record","errorCode":null,"errorMessage":"too many entries in v0 shell alias delete record","messagePattern":"too many entries in v0 shell alias delete record","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-dotfiles/src/store.rs","lineNumber":92,"sourceCode":"                        let (key, bytes) =\n                            decode::read_str_from_slice(bytes).map_err(error_report)?;\n                        let (value, 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::Create(Alias {\n                            name: key.to_owned(),\n                            value: value.to_owned(),\n                        }))\n                    }\n\n                    // 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 shell alias 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 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            }","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin-dotfiles/src/store.rs#L74-L110","documentation":"A v0 shell alias 'delete' record must be a msgpack array with exactly 1 field (the alias key). The deserializer rejects the record when the decoded array length is not 1, meaning the payload deviates from the v0 alias-delete schema. This guards against corrupt or version-mismatched record data.","triggerScenarios":"Deserializing a v0 alias delete record (record_type 1) whose decoded msgpack array length differs from 1.","commonSituations":"Syncing records from a newer atuin version into an older client; corrupted record store payloads; manually edited database rows.","solutions":["Align atuin versions across all synced machines","Delete the malformed delete-record and re-issue the alias deletion from a current client","Re-sync the alias store from a known-good host","Check the record store SQLite DB for damaged rows"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let n = rmp::decode::read_array_len(&mut bytes)?;\nif n != 1 { return Err(\"malformed v0 alias delete record\".into()); }","typeGuard":null,"tryCatchPattern":"match AliasRecord::deserialize(&data) {\n    Ok(rec) => apply(rec),\n    Err(e) => log::warn!(\"skipping bad alias delete record: {e}\"),\n}","preventionTips":["Keep client versions in sync across machines","Re-issue deletions from a current client instead of crafting records","Never hand-edit record payloads","Validate records when importing from backups"],"tags":["msgpack","deserialization","alias","record-store","versioning"],"backgroundTag":"schema-validation-failed","analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}