{"record":{"id":"010124fcffc2a8b0","repo":"jdx/mise","slug":"cannot-verify-current-files-for-restoration","errorCode":null,"errorMessage":"cannot verify current files for restoration: {}","messagePattern":"cannot verify current files for restoration: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/replay.rs","lineNumber":1396,"sourceCode":"    }\n    if exec.dry_run {\n        miseprintln!(\"history: dry run; nothing was changed\");\n    }\n    Ok(())\n}\n\n/// The tracked set as it is on disk right now, as a tree in the repository\n/// (objects only; nothing is recorded).\npub(crate) fn live_tree(repo: &HistoryRepo, tracked: &TrackedSet) -> Result<String> {\n    let walk = tracked.walk()?;\n    let recipients = if walk.files.values().any(|(_, policy)| policy.encrypt) {\n        tracked.manifest.recipients.clone()\n    } else {\n        vec![]\n    };\n    let captured = repo.capture_tracked(&walk, &recipients, console::user_attended_stderr())?;\n    if !captured.omitted.is_empty() {\n        bail!(\n            \"cannot verify current files for restoration: {}\",\n            captured.warnings.join(\"; \")\n        );\n    }\n    Ok(captured.tree)\n}\n\n/// The newest checkpoint whose captured content for `path` differs from the\n/// working tree, if any.\nfn newest_differing(\n    repo: &HistoryRepo,\n    entries: &[Entry],\n    live: &str,\n    path: &Path,\n) -> Result<Option<Entry>> {\n    let tree_path = repository_path(repo, live, path)?;\n    let current = repo.restored_object_at(live, &tree_path)?;\n    for entry in entries.iter().rev() {","sourceCodeStart":1378,"sourceCodeEnd":1414,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/replay.rs#L1378-L1414","documentation":"live_tree captures the current state of tracked files so the restore can be verified against it. If the capture walk had to omit files (permissions, unreadable files, etc.) it produces warnings; since an incomplete live tree would make restore verification unsound, mise aborts instead of proceeding.","triggerScenarios":"`repo.capture_tracked` returns captured.omitted non-empty during live_tree, which is called by rollback, undo, and apply_steps — e.g. tracked files unreadable due to permissions or removal mid-walk.","commonSituations":"Files owned by another user or with restrictive modes inside the tracked tree; files deleted between walk start and read; symlink loops or mount points the walker skips.","solutions":["Fix permissions on the omitted files (chmod/chown, or run under a user that can read them).","Check the warnings list in the message; it names the reason(s) for each omission.","Remove or exclude inaccessible files from the tracked scope, then retry the rollback/undo."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"find <tracked-paths> ! -readable 2>/dev/null  # unreadable files will be omitted","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep tracked tree files readable by the user running mise.","Don't delete or lock files mid-operation.","Address permission warnings from history commands immediately."],"tags":["history","permissions","filesystem","snapshot"],"backgroundTag":"file-read-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"}