atuinsh/atuin · error

unknown kv record version {other:?}

Error message

unknown kv record version {other:?}

What it means

Decoder guard in KvRecord::deserialize: the record's version discriminant is not V0, so the record was written by an Atuin version whose KV wire format this client does not implement. The client declines to decode rather than risk misreading an unknown layout.

Source

Thrown at crates/atuin-kv/src/store/record.rs:97

                    let (value, bytes) =
                        decode::read_str_from_slice(bytes).map_err(error_report)?;
                    (Some(value.to_owned()), bytes)
                } else {
                    (None, bytes)
                };

                if !bytes.is_empty() {
                    bail!("trailing bytes in encoded kvrecord. malformed");
                }

                Ok(Self {
                    namespace: namespace.to_owned(),
                    key: key.to_owned(),
                    value,
                })
            }
            other => {
                bail!("unknown kv record version {other:?}");
            }
        }
    }
}

#[cfg(test)]
mod tests {
    use atuin_domain::record::RecordVersion;
    use rstest::rstest;

    use super::{DecryptedData, KvRecord};

    #[rstest]
    #[case::some(
        Some("baz".to_owned()),
        &[0x94, 0xa3, b'f', b'o', b'o', 0xa3, b'b', b'a', b'r', 0xc3, 0xa3, b'b', b'a', b'z']
    )]
    #[case::none(None, &[0x94, 0xa3, b'f', b'o', b'o', 0xa3, b'b', b'a', b'r', 0xc2])]

View on GitHub (pinned to c0c717ab04)

Solutions

  1. Upgrade Atuin to a build that supports KV record version {other:?}
  2. Re-sync or re-encode the KV store with a compatible client
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/atuin-kv/src/store/record.rs:97 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12). Data as JSON: /api/errors/c4fa552d44a1e4bb. Report an issue: GitHub.