{"record":{"id":"4cb964b715cae788","repo":"jdx/mise","slug":"unsupported-dotfile-repository-format","errorCode":null,"errorMessage":"unsupported dotfile repository format {}","messagePattern":"unsupported dotfile repository format (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/manifest.rs","lineNumber":358,"sourceCode":"                    variant != selected.as_deref()\n                        && variant.is_some_and(|name| {\n                            entry.variants.iter().any(|variant| variant.name() == name)\n                        })\n                }\n            };\n            if carry {\n                overlays.push(Overlay {\n                    path: file.path,\n                    object: Some((file.mode, file.oid)),\n                });\n            }\n        }\n        repo.compose(tree, &overlays)\n    }\n\n    pub(crate) fn validate(&self) -> Result<()> {\n        if self.format != 1 {\n            bail!(\"unsupported dotfile repository format {}\", self.format);\n        }\n        let mut paths = std::collections::BTreeSet::new();\n        for entry in &self.enrollment {\n            if !super::sync::layout::is_safe_branch_path(&entry.path)\n                || !(entry.path.starts_with(\"home/\")\n                    || entry.path == \"config\"\n                    || entry.path.starts_with(\"config/\"))\n                || !paths.insert(&entry.path)\n            {\n                bail!(\"invalid or repeated enrollment path {}\", entry.path);\n            }\n            let mut variants = std::collections::BTreeSet::new();\n            super::select::validate(&entry.variants)?;\n            for variant in &entry.variants {\n                let name = variant.name();\n                if name.contains('@')\n                    || !super::sync::layout::is_safe_branch_path(&name)\n                    || !variants.insert(name)","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/manifest.rs#L340-L376","documentation":"The dotfile manifest schema only supports repository `format` 1. `validate` rejects any manifest written with a different (usually newer) format version so the tool never misinterprets unknown fields or semantics.","triggerScenarios":"Calling `validate` (directly or via `tracking`/`write`/permission capture) on a manifest whose `format` field is not 1 — e.g. a manifest produced by a newer tool version or hand-edited to another number.","commonSituations":"Opening a manifest created by a newer release with an older binary; manually bumping `format` expecting migration; a corrupted manifest where the format field got mangled.","solutions":["Upgrade the tool to a version that supports the manifest's format value","Set the manifest's `format` back to 1 if it was changed by mistake and the content is format-1 compatible","Regenerate the manifest from a known-good backup or via the tool's own export/init path"],"exampleFix":"// before\nformat = 2\n// after\nformat = 1","handlingStrategy":"validation","validationCode":"fn assert_supported_format(manifest: &Manifest) -> Result<(), String> {\n  if manifest.format != 1 { Err(format!(\"format {} unsupported\", manifest.format)) } else { Ok(()) }\n}","typeGuard":null,"tryCatchPattern":"match manifest.validate() {\n  Err(e) if e.to_string().starts_with(\"unsupported dotfile repository format\") => {\n    // upgrade tool or rewrite manifest with format = 1\n  }\n  other => other,\n}","preventionTips":["Never hand-edit the `format` field","Pin the tool version across machines that share the manifest","Upgrade the tool before syncing manifests produced by newer releases"],"tags":["manifest","versioning","compatibility","validation"],"backgroundTag":"unsupported-config-value","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"}