atuinsh/atuin · error
too many entries in v0 dotfiles var delete record
Error message
too many entries in v0 dotfiles var delete record
What it means
A v0 dotfiles var 'delete' record must be a msgpack array containing exactly 1 field (the variable name). During deserialization, an array length other than 1 causes this error, as the payload does not conform to the v0 var-delete schema. It protects the record store from corrupt or future-format data.
Source
Thrown at crates/atuin-dotfiles/src/store/var.rs:70
}
match version {
RecordVersion::V0 => {
let mut bytes = decode::Bytes::new(&data.0);
let record_type = decode::read_u8(&mut bytes).map_err(error_report)?;
match record_type {
// create
0 => {
let env = Var::deserialize(&mut bytes)?;
Ok(Self::Create(env))
}
// delete
1 => {
let nfields = decode::read_array_len(&mut bytes).map_err(error_report)?;
ensure!(nfields == 1, "too many entries in v0 dotfiles var delete record");
let bytes = bytes.remaining_slice();
let (key, bytes) =
decode::read_str_from_slice(bytes).map_err(error_report)?;
if !bytes.is_empty() {
bail!("trailing bytes in encoded dotfiles var record. malformed");
}
Ok(Self::Delete(key.to_owned()))
}
n => {
bail!("unknown Dotfiles var record type {n}");
}
}
}View on GitHub (pinned to c0c717ab04)
Solutions
- Upgrade atuin everywhere the record store syncs to the same version
- Remove the malformed record and re-run the var deletion on a current client
- Re-sync dotfiles from a machine with intact data
- Inspect/repair the record store database if corruption is repeated
Defensive patterns
Strategy: validation
Validate before calling
let n = rmp::decode::read_array_len(&mut bytes)?;
if n != 1 { return Err("malformed v0 var delete record".into()); } Try / catch
match VarRecord::deserialize(&data) {
Ok(rec) => apply(rec),
Err(e) => log::warn!("skipping bad var delete record: {e}"),
} Prevention
- Upgrade all synced clients to the same version
- Avoid external writes to the record store
- Re-create deleted vars from a current client if a record is corrupt
- Keep backups of the record store DB
When it happens
Trigger: Deserializing a v0 var delete record (record_type 1) whose decoded msgpack array length differs from 1.
Common situations: Version skew between synced atuin clients; corrupted sync payloads; records written by non-atuin tools into the store.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- too many entries in v0 dotfiles env create record, got {}, e
- trailing bytes in encoded dotfiles env record, malformed
- too many entries in v0 shell alias create record
- too many entries in v0 shell alias delete record
- too many entries in v0 kv record
AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12).
Data as JSON: /api/errors/83827749a6fc8e9a.
Report an issue: GitHub.