jdx/mise · error
aube lockfile mapping keys must be strings
Error message
aube lockfile mapping keys must be strings
What it means
Thrown when a mapping key in the aube lockfile YAML is not a string (e.g. an integer or boolean key). TOML tables require string keys, so non-string YAML keys cannot be converted and the lockfile is rejected.
Solutions
- Quote/convert all mapping keys to strings in mise.lock
- Restore the lockfile from git
- Delete and regenerate the lockfile
- Fix the tool writing non-string keys
Example fix
# before 123: version: 1.0 # after "123": version: 1.0
Defensive patterns
Strategy: validation
Validate before calling
yq -e '[.. | tag == "!!map" | keys[] | tag == "!!str"] | all' mise.lock >/dev/null
Prevention
- Quote any key that could parse as a number or boolean
- Do not hand-edit mise.lock
- Regenerate the lockfile after structural merges
When it happens
Trigger: mise.lock aube section contains a mapping with non-string keys like `123:` or `true:` — typically from hand-editing or another tool generating the YAML.
Common situations: Manual editing quoting mistakes; a generator emitting typed keys; merge corruption.
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
- non-finite numbers cannot be represented in mise.lock
- null values cannot be represented in mise.lock
- unsupported number in aube lockfile
- additional_artifacts must be an array in lockfile
- aube lockfile must contain a mapping
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/c40471f53da5e5c0.
Report an issue: GitHub.
Appendix: source
Thrown at src/lockfile.rs:191
bail!("non-finite numbers cannot be represented in mise.lock")
}
toml::Value::Float(value)
} else {
bail!("unsupported number in aube lockfile")
}
}
Value::String(value) => toml::Value::String(value),
Value::Sequence(values) => toml::Value::Array(
values
.into_iter()
.map(yaml_to_toml)
.collect::<Result<_>>()?,
),
Value::Mapping(values) => {
let mut table = toml::Table::new();
for (key, value) in values {
let Value::String(key) = key else {
bail!("aube lockfile mapping keys must be strings")
};
table.insert(key, yaml_to_toml(value)?);
}
toml::Value::Table(table)
}
Value::Null => bail!("null values cannot be represented in mise.lock"),
Value::Tagged(value) => yaml_to_toml(value.value)?,
})
}
fn toml_to_yaml(value: toml::Value) -> serde_yaml::Value {
use serde_yaml::{Mapping, Number, Value};
match value {
toml::Value::String(value) => Value::String(value),
toml::Value::Integer(value) => Value::Number(Number::from(value)),
toml::Value::Float(value) => Value::Number(Number::from(value)),
toml::Value::Boolean(value) => Value::Bool(value),
toml::Value::Datetime(value) => Value::String(value.to_string()),View on GitHub (pinned to 533346cc37)