{"record":{"id":"3997ba6af8f3d25f","repo":"jdx/mise","slug":"unknown-dotfile-key-key-for-target-in","errorCode":null,"errorMessage":"unknown dotfile key {key:?} for {target} in {}","messagePattern":"unknown dotfile key (.+?) for (.+?) in (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":573,"sourceCode":"                    continue;\n                }\n                bail!(\"invalid dotfile declaration {target} in {}\", path.display());\n            };\n            if let Some(table) = value.as_table() {\n                for key in table.keys() {\n                    if !matches!(\n                        key.as_str(),\n                        \"source\"\n                            | \"content\"\n                            | \"mode\"\n                            | \"exclude\"\n                            | \"manifest\"\n                            | \"autosave\"\n                            | \"encrypt\"\n                            | \"variants\"\n                            | \"enabled\"\n                    ) {\n                        bail!(\n                            \"unknown dotfile key {key:?} for {target} in {}\",\n                            path.display()\n                        );\n                    }\n                }\n            }\n            if resolve_target_arg(&target).is_relative() {\n                bail!(\"dotfile target must be absolute or start with ~/: {target}\");\n            }\n            if let FileTomlEntry::Table {\n                source,\n                content,\n                mode,\n                manifest,\n                exclude,\n                ..\n            } = entry\n            {","sourceCodeStart":555,"sourceCodeEnd":591,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/files.rs#L555-L591","documentation":"Once a dotfile entry parses, every key inside its table is checked against a fixed allowlist: `source`, `content`, `mode`, `exclude`, `manifest`, `autosave`, `encrypt`, `variants`, `enabled`. Any other key is a configuration typo that would otherwise be silently ignored, so validation fails with the offending key and target named.","triggerScenarios":"Placing any non-allowlisted key inside a `[dotfiles.\"~/target\"]` table in a mise config file parsed by `validate_incoming_files`, e.g. `ownership = true`, `src = \"...\"`, or `chmod = \"755\"`.","commonSituations":"Misspelling a real key (`soure`, `encrypte`), copying keys from other tools' dotfile managers, or inventing keys expecting them to be honored.","solutions":["Rename the flagged key to one of the allowed keys: source, content, mode, exclude, manifest, autosave, encrypt, variants, enabled.","If the key was meant to configure a different mise feature, move it out of the `[dotfiles.<target>]` table into the correct section.","Remove the key entirely if it was speculative; unknown keys are intentionally rejected rather than ignored."],"exampleFix":"// before\n[dotfiles.\"~/.gitconfig\"]\nsource = \"gitconfig\"\npermissuns = \"644\"\n\n// after\n[dotfiles.\"~/.gitconfig\"]\nsource = \"gitconfig\"\nmode = \"644\"","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set(['source','content','mode','exclude','manifest','autosave','encrypt','variants','enabled']);\nfunction assertAllowedKeys(entry, target) {\n  for (const key of Object.keys(entry))\n    if (!ALLOWED.has(key)) throw new Error(`unknown dotfile key '${key}' for ${target}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  applyDotfiles();\n} catch (e) {\n  if (/unknown dotfile key/.test(e.message)) {\n    const key = e.message.match(/key '(.*?)'/)?.[1];\n    console.error(`Remove or rename key '${key}' in the dotfiles table`);\n  } else throw e;\n}","preventionTips":["Memorize/reference the nine allowed dotfile keys before adding new ones","Use editor TOML schema validation with an enum of allowed keys","Grep your configs for the flagged key across all mise config files after any failure"],"tags":["dotfiles","config-validation","unknown-key","mise"],"backgroundTag":"invalid-config-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}