{"record":{"id":"47302d9ec53669d3","repo":"jdx/mise","slug":"checkpoint-was-written-by-a-newer-mise-schema","errorCode":null,"errorMessage":"checkpoint {} was written by a newer mise (schema {})","messagePattern":"checkpoint (.+?) was written by a newer mise \\(schema (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/replay.rs","lineNumber":1486,"sourceCode":"        if differs {\n            return Ok(Some(entry.clone()));\n        }\n    }\n    Ok(None)\n}\n\nfn refuse_unusable(entry: &Entry) -> Result<()> {\n    if entry.checkpoint.status() == Some(OperationStatus::Pending) {\n        bail!(\n            \"checkpoint {} did not finish; there is no state to roll back to\",\n            entry.id\n        );\n    }\n    if entry.checkpoint.tree.snapshot.is_none() {\n        bail!(\"checkpoint {} has no content snapshot\", entry.id);\n    }\n    if entry.checkpoint.schema_version > super::store::SCHEMA_VERSION {\n        bail!(\n            \"checkpoint {} was written by a newer mise (schema {})\",\n            entry.id,\n            entry.checkpoint.schema_version\n        );\n    }\n    Ok(())\n}\n\n/// Every path a checkpoint's coverage includes, as absolute paths.\nfn covered_paths(checkpoint: &Checkpoint) -> Vec<PathBuf> {\n    checkpoint\n        .tree\n        .coverage\n        .entries\n        .iter()\n        .filter(|entry| entry.mode != \"private\")\n        .map(|entry| normalize_target(Path::new(&entry.path)))\n        .collect()","sourceCodeStart":1468,"sourceCodeEnd":1504,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/replay.rs#L1468-L1504","documentation":"refuse_unusable refuses to roll back to a checkpoint whose schema_version is greater than the SCHEMA_VERSION the running mise supports. The checkpoint was written by a newer mise release, and its on-disk format may contain fields or semantics this binary cannot interpret safely.","triggerScenarios":"Running rollback in an older mise binary against history state written by a newer mise, i.e. entry.checkpoint.schema_version > super::store::SCHEMA_VERSION.","commonSituations":"Downgrading mise after using a newer version; switching between release and older installed builds sharing the same MISE_STATE_DIR; CI images pinned to an older mise version.","solutions":["Upgrade mise to the version (or newer) that wrote the checkpoint, then retry rollback","If you must stay on the old mise, use a separate MISE_STATE_DIR so the incompatible history is not read","Abandon the rollback and manually restore the desired file state"],"exampleFix":"// before\nMISE_STATE_DIR=~/.local/share/mise mise rollback  # old mise, new state\n// after\nmise upgrade && mise rollback  # or: MISE_STATE_DIR=~/.local/share/mise-new mise rollback","handlingStrategy":"validation","validationCode":"if entry.checkpoint.schema_version > store::SCHEMA_VERSION {\n    eprintln!(\"checkpoint too new (schema {}); upgrade mise\", entry.checkpoint.schema_version);\n}","typeGuard":null,"tryCatchPattern":"match rollback_result {\n    Err(e) if e.to_string().contains(\"newer mise\") => upgrade_mise_and_retry(),\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Keep mise versions consistent across machines sharing a state dir","Upgrade before downgrading environments","Avoid sharing one MISE_STATE_DIR between release and dev builds","Pin mise versions per project to avoid schema drift"],"tags":["history","schema-version","version-mismatch","downgrade"],"backgroundTag":"schema-validation-failed","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"}