atuinsh/atuin · error
unknown Dotfiles var record type
Error message
unknown Dotfiles var record type {n} What it means
The dotfiles var record decoder matches a record-type byte after the version. If the byte is not a known var record variant (Set/Delete), it throws 'unknown Dotfiles var record type'. This indicates a payload type this decoder does not implement.
Solutions
- Upgrade atuin to a build supporting the new var record type
- Skip records that fail to decode rather than aborting sync
- Remove the offending record from the store
Defensive patterns
Strategy: try-catch
Validate before calling
// Peek the var record type byte (after version byte) before decoding
// fn is_known_var_type(payload: &[u8]) -> bool {
// matches!(payload.get(1), Some(0) | Some(1))
// } Type guard
fn is_known_var_type(payload: &[u8]) -> bool {
matches!(payload.get(1), Some(0) | Some(1))
} Try / catch
match VarRecord::deserialize(&mut bytes) {
Ok(rec) => apply(rec),
Err(e) if e.to_string().contains("unknown Dotfiles var record type") => {
log::warn!("skipping var record with unknown type");
}
Err(e) => return Err(e),
} Prevention
- Keep atuin versions consistent across synced machines
- Upgrade before pulling records written by newer clients
- Skip-and-log unknown record types during sync
When it happens
Trigger: Deserializing (directly or via sync) a var record payload with an unrecognized type byte, usually produced by a newer atuin version that introduced a new var record operation.
Common situations: Older atuin client receiving records from a newer client; corrupted payload flipping the type byte.
Related errors
- unknown alias record version
- unknown AliasRecord type
- unknown var record version
- too many entries in v0 dotfiles env create record, got
- trailing bytes in encoded dotfiles var record. malformed
AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19).
Data as JSON: /api/errors/c44a3e2cf001873d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/atuin-dotfiles/src/store/var.rs:85
// 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}");
}
}
}
other => {
bail!("unknown var record version {other:?}");
}
}
}
}
#[derive(Debug, Clone)]
pub struct VarStore {
pub store: SqliteStore,
pub host_id: HostId,
pub encryption_key: paseto_v4::Key,
}
impl VarStore {View on GitHub (pinned to 900007c480)