{"record":{"id":"daa0bfefa95c357b","repo":"jdx/mise","slug":"path-raw-id-ids-may-only-contain-letters","errorCode":null,"errorMessage":"\"{path_raw}\".{id:?}: ids may only contain letters, digits, '_', '-', and '.', ignoring entry","messagePattern":"\"(.+?)\"\\.(.+?): ids may only contain letters, digits, '_', '-', and '\\.', ignoring entry","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/edits.rs","lineNumber":273,"sourceCode":"    }\n    Some((path.to_string(), id.to_string()))\n}\n\nfn resolve_entry(\n    path_raw: &str,\n    id: String,\n    entry: EditTomlEntry,\n    base: &Path,\n    config_path: &Path,\n) -> Result<EditRequest> {\n    let path = file::replace_path(path_raw);\n    if path.is_relative() {\n        bail!(\"path \\\"{path_raw}\\\" must be absolute or start with ~/, ignoring entry\");\n    }\n    // ids end up inside marker lines — keep them to characters that can't\n    // collide with the marker syntax itself\n    if id.is_empty() || !id.chars().all(|c| c.is_alphanumeric() || \"_-.\".contains(c)) {\n        bail!(\n            \"\\\"{path_raw}\\\".{id:?}: ids may only contain letters, digits, '_', '-', and '.', ignoring entry\"\n        );\n    }\n    let mut origin = ResourceOrigin {\n        config: config_path.to_path_buf(),\n        config_root: crate::config::config_file::config_root::config_root(config_path),\n        environment: crate::config::environments_for_config_path(config_path),\n        source: None,\n    };\n    let entry = match entry {\n        EditTomlEntry::Block(inline) => EditTomlTable {\n            block: Some(inline),\n            source: None,\n            template: None,\n            line: None,\n            position: None,\n            comment: None,\n        },","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/edits.rs#L255-L291","documentation":"Validation in `resolve_entry`: the entry's `id` is empty or contains characters outside letters, digits, `_`, `-`, and `.`. Ids are embedded in edit marker lines written into dotfiles, so permissive characters could collide with the marker syntax; such entries are rejected.","triggerScenarios":"An edit entry with `id = \"\"`, or ids containing spaces, `:`, `/`, quotes, or other punctuation (e.g. `id = \"my alias\"`, `id = \"git:main\"`) resolved via `edits_from_config_files`.","commonSituations":"Leaving the id blank in a hastily written [[edit]] block; using human phrases with spaces as ids; ids copied from file paths or URLs containing `/` and `:`.","solutions":["Set a non-empty id using only letters, digits, `_`, `-`, `.` (e.g. `id = \"git_alias\"`).","Replace spaces and punctuation with `-` or `_` in the id.","Ensure the templating/generator emitting the entries produces sanitized ids."],"exampleFix":"# before\n[[edits]]\npath = \"~/.zshrc\"\nid = \"git: alias\"\n# after\n[[edits]]\npath = \"~/.zshrc\"\nid = \"git-alias\"","handlingStrategy":"validation","validationCode":"let valid = !id.is_empty() && id.chars().all(|c| c.is_alphanumeric() || \"_-.\".contains(c));\nassert!(valid, \"invalid edit id: {id:?}\");","typeGuard":"fn is_valid_edit_id(id: &str) -> bool {\n    !id.is_empty() && id.chars().all(|c| c.is_alphanumeric() || \"_-.\".contains(c))\n}","tryCatchPattern":null,"preventionTips":["Use short kebab/snake-case ids like `git-alias`.","Never leave id blank; derive it from the edit purpose, not a path or URL.","Sanitize generated ids to `[A-Za-z0-9_.-]`."],"tags":["dotfiles","identifier-validation","config"],"backgroundTag":"invalid-identifier-format","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"}