{"record":{"id":"bc8c397d5ff1e7c5","repo":"jdx/mise","slug":"unknown-history-path-root-other","errorCode":null,"errorMessage":"unknown history path root: {other}","messagePattern":"unknown history path root: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/shadow.rs","lineNumber":715,"sourceCode":"                if layout.locate(&file.path).path().is_none() {\n                    continue;\n                }\n                let label = file.path.split('/').next().unwrap_or_default().to_string();\n                let root = roots.entry(label.clone()).or_insert_with(|| RootRecord {\n                    label,\n                    ..Default::default()\n                });\n                root.files += 1;\n                root.bytes += file.size.unwrap_or_default();\n            }\n            record.tree.roots = roots.into_values().collect();\n        }\n        for root in &mut record.tree.roots {\n            root.path = match root.label.split('@').next().unwrap_or_default() {\n                \"home\" => crate::dirs::HOME.to_path_buf(),\n                \"config\" => super::tracked::global_config_dir(),\n                \"fs\" => PathBuf::from(std::path::MAIN_SEPARATOR.to_string()),\n                other => bail!(\"unknown history path root: {other}\"),\n            };\n        }\n        Ok(record)\n    }\n\n    /// Recursive listing of a tree (or a path inside it).\n    pub(crate) fn ls_tree(&self, spec: &str) -> Result<Vec<TreeEntry>> {\n        let out = self\n            .git\n            .output(PlumbingCall::new([\"ls-tree\", \"-r\", \"-l\", \"-z\", spec]))?;\n        let mut entries = vec![];\n        for record in out.split(|byte| *byte == 0) {\n            if record.is_empty() {\n                continue;\n            }\n            let record = std::str::from_utf8(record).wrap_err(\n                \"history cannot represent a non-UTF-8 filename; refusing to change its bytes\",\n            )?;","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/shadow.rs#L697-L733","documentation":"When reading stored history metadata, each tree root label's prefix (before '@') must map to a known filesystem root: 'home', 'config', or 'fs'. An unrecognized prefix means the stored record references a root label this build does not understand, so metadata cannot be resolved to real paths.","triggerScenarios":"read_meta (via checkpoint_refs) loads a history record whose root.label prefix (text before '@') is not one of home/config/fs.","commonSituations":"History data written by a newer or older version with different root labels; hand-edited or corrupted history metadata; records moved between machines with divergent label conventions.","solutions":["Upgrade (or downgrade) to the version that understands the recorded root label","Inspect the stored history record and correct the root label to a known prefix (home/config/fs)","If the record is corrupt or from an incompatible version, remove/prune that history entry and re-capture"],"exampleFix":"// before (stored record)\nroot.label = \"projects@/srv/code\"\n\n// after (supported root)\nroot.label = \"fs@/srv/code\"","handlingStrategy":"fallback","validationCode":"// Rust: validate root labels before use\nconst KNOWN: [&str; 3] = [\"home\", \"config\", \"fs\"];\nfor label in &record.tree.roots.iter().map(|r| r.label.as_str()) {\n    let prefix = label.split('@').next().unwrap_or_default();\n    anyhow::ensure!(KNOWN.contains(&prefix), \"unsupported history root: {prefix}\");\n}","typeGuard":"fn known_root(label: &str) -> Option<&str> {\n    matches!(label.split('@').next()?, \"home\" | \"config\" | \"fs\").then(|| label)\n}","tryCatchPattern":"match read_meta(&git, oid) {\n    Err(e) if e.to_string().contains(\"unknown history path root\") => {\n        eprintln!(\"history written by an incompatible version; upgrade or prune this entry\");\n    }\n    other => other?,\n}","preventionTips":["Keep the tool version that wrote history records installed when reading them","Do not hand-edit history metadata files","Prune history records created by incompatible versions before switching"],"tags":["history","config","versioning"],"backgroundTag":"invalid-enum-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"}