{"record":{"id":"c40471f53da5e5c0","repo":"jdx/mise","slug":"aube-lockfile-mapping-keys-must-be-strings","errorCode":null,"errorMessage":"aube lockfile mapping keys must be strings","messagePattern":"aube lockfile mapping keys must be strings","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lockfile.rs","lineNumber":191,"sourceCode":"                    bail!(\"non-finite numbers cannot be represented in mise.lock\")\n                }\n                toml::Value::Float(value)\n            } else {\n                bail!(\"unsupported number in aube lockfile\")\n            }\n        }\n        Value::String(value) => toml::Value::String(value),\n        Value::Sequence(values) => toml::Value::Array(\n            values\n                .into_iter()\n                .map(yaml_to_toml)\n                .collect::<Result<_>>()?,\n        ),\n        Value::Mapping(values) => {\n            let mut table = toml::Table::new();\n            for (key, value) in values {\n                let Value::String(key) = key else {\n                    bail!(\"aube lockfile mapping keys must be strings\")\n                };\n                table.insert(key, yaml_to_toml(value)?);\n            }\n            toml::Value::Table(table)\n        }\n        Value::Null => bail!(\"null values cannot be represented in mise.lock\"),\n        Value::Tagged(value) => yaml_to_toml(value.value)?,\n    })\n}\n\nfn toml_to_yaml(value: toml::Value) -> serde_yaml::Value {\n    use serde_yaml::{Mapping, Number, Value};\n    match value {\n        toml::Value::String(value) => Value::String(value),\n        toml::Value::Integer(value) => Value::Number(Number::from(value)),\n        toml::Value::Float(value) => Value::Number(Number::from(value)),\n        toml::Value::Boolean(value) => Value::Bool(value),\n        toml::Value::Datetime(value) => Value::String(value.to_string()),","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/lockfile.rs#L173-L209","documentation":"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.","triggerScenarios":"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.","commonSituations":"Manual editing quoting mistakes; a generator emitting typed keys; merge corruption.","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"],"exampleFix":"# before\n123:\n  version: 1.0\n# after\n\"123\":\n  version: 1.0","handlingStrategy":"validation","validationCode":"yq -e '[.. | tag == \"!!map\" | keys[] | tag == \"!!str\"] | all' mise.lock >/dev/null","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Quote any key that could parse as a number or boolean","Do not hand-edit mise.lock","Regenerate the lockfile after structural merges"],"tags":["lockfile","yaml","toml","keys"],"backgroundTag":"schema-validation-failed","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}