{"record":{"id":"dc9709d80ee3c687","repo":"atuinsh/atuin","slug":"unknown-script-record-version-other","errorCode":null,"errorMessage":"unknown script record version {other:?}","messagePattern":"unknown script record version (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-scripts/src/store/record.rs","lineNumber":87,"sourceCode":"                    // delete\n                    1 => {\n                        let bytes = bytes.remaining_slice();\n                        let (id, _) = decode::read_str_from_slice(bytes).map_err(error_report)?;\n                        Ok(Self::Delete(Uuid::parse_str(id)?))\n                    }\n\n                    // update\n                    2 => {\n                        // written by encode::write_bin above\n                        let _ = decode::read_bin_len(&mut bytes).map_err(error_report)?;\n                        let script = Script::deserialize(bytes.remaining_slice())?;\n                        Ok(Self::Update(script))\n                    }\n\n                    _ => Err(eyre!(\"unknown script record type {record_type}\")),\n                }\n            }\n            other => bail!(\"unknown script record version {other:?}\"),\n        }\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use rstest::rstest;\n\n    use super::*;\n\n    #[test]\n    fn test_serialize_create() {\n        let script = Script::builder()\n            .id(uuid::Uuid::parse_str(\"0195c825a35f7982bdb016168881cbc6\").unwrap())\n            .name(\"test\".to_string())\n            .description(\"test\".to_string())\n            .shebang(\"test\".to_string())\n            .tags(vec![\"test\".to_string()])","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-scripts/src/store/record.rs#L69-L105","documentation":"The script record decoder reads a version byte and dispatches on a record-type byte inside it. Unknown versions bail with this error before any type parsing happens. It prevents decoding payloads written in an unrecognized format version.","triggerScenarios":"Deserializing a script record payload whose version byte is not supported by this build — e.g. records created by a newer atuin-scripts release.","commonSituations":"Older atuin client syncing script records from a newer client; mixing versions across machines.","solutions":["Upgrade atuin (atuin-scripts) to the latest version","Skip records with unknown versions during sync","Delete the offending record from the record store"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check the script record version byte before decoding\n// fn is_supported_script_version(payload: &[u8]) -> bool {\n//     payload.first() == Some(&SCRIPT_KNOWN_VERSION)\n// }","typeGuard":"fn is_supported_script_version(payload: &[u8]) -> bool {\n    payload.first() == Some(&SCRIPT_KNOWN_VERSION)\n}","tryCatchPattern":"match ScriptRecord::deserialize(&mut bytes) {\n    Ok(rec) => apply(rec),\n    Err(e) if e.to_string().contains(\"unknown script record version\") => {\n        log::warn!(\"script record version unsupported; upgrade atuin\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Sync script records only between compatible atuin versions","Review record-format changes in release notes before downgrading","Skip unknown-version records instead of failing the whole sync"],"tags":["deserialization","scripts","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"}