{"record":{"id":"58931a4612c44c41","repo":"jdx/mise","slug":"this-store-uses-the-old-unreleased-checkpoint-form","errorCode":null,"errorMessage":"this store uses the old unreleased checkpoint format; use a separate MISE_STATE_DIR for the new history format; existing data has not been changed","messagePattern":"this store uses the old unreleased checkpoint format; use a separate MISE_STATE_DIR for the new history format; existing data has not been changed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/shadow.rs","lineNumber":182,"sourceCode":"    /// Opens the repository, creating it on first use. `Ok(None)` means no\n    /// git binary mise is willing to run is available.\n    pub(crate) fn open_or_init_in(state_dir: &Path) -> Result<Option<Self>> {\n        if crate::git::plumbing_binary().is_none() {\n            return Ok(None);\n        }\n        let git = GitPlumbing::new(Self::path_in(state_dir));\n        git.init_bare()\n            .wrap_err_with(|| format!(\"initializing {}\", display_path(git.git_dir())))?;\n        // the binary may exist and still be unusable (a stub, a broken\n        // install): probe it once so callers can say capture is unavailable\n        git.run(PlumbingCall::new([\"rev-parse\", \"--is-bare-repository\"]))\n            .wrap_err_with(|| format!(\"opening {}\", display_path(git.git_dir())))?;\n        let repo = Self {\n            git,\n            transient: Default::default(),\n        };\n        if !repo.list_refs(\"refs/checkpoints/\")?.is_empty() {\n            bail!(\n                \"this store uses the old unreleased checkpoint format; use a separate MISE_STATE_DIR for the new history format; existing data has not been changed\"\n            );\n        }\n        Ok(Some(repo))\n    }\n\n    pub(crate) fn dir(&self) -> &Path {\n        self.git.git_dir()\n    }\n\n    pub(crate) fn capture_tracked(\n        &self,\n        walk: &super::tracked::Walk,\n        recipient_strings: &[String],\n        interactive: bool,\n    ) -> Result<CaptureResult> {\n        let mut manifest = walk.manifest.clone();\n        manifest.recipients = recipient_strings.to_vec();","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/shadow.rs#L164-L200","documentation":"When opening the history store, open_or_init_in checks for refs under refs/checkpoints/, which only the old, never-released checkpoint format created. If such refs exist, the store predates the new history format; mise refuses to touch it so existing data is preserved, and directs the user to isolate it with a separate MISE_STATE_DIR.","triggerScenarios":"Running current mise against a MISE_STATE_DIR previously used by an unreleased mise build that wrote refs/checkpoints/ into its embedded git store.","commonSituations":"Upgrading from a development/experimental mise version to the released history implementation; sharing a state dir across old dev builds and new releases; CI caches seeded by an old build.","solutions":["Set MISE_STATE_DIR to a fresh location for the new history format, as the message advises","If the old data is dispensable, delete/move the old state dir (archives refs) so mise can init a clean store","Export or manually salvage anything needed from the old store before abandoning it; the error path does not modify it"],"exampleFix":"// before\nexport MISE_STATE_DIR=~/.local/state/mise   # contains old refs/checkpoints/\n// after\nexport MISE_STATE_DIR=~/.local/state/mise-new && mise history init","handlingStrategy":"fallback","validationCode":"// before running new mise against a state dir:\nif git_for_each_ref(dir, \"refs/checkpoints/\").next().is_some() {\n    eprintln!(\"legacy store detected; point MISE_STATE_DIR elsewhere\");\n}","typeGuard":null,"tryCatchPattern":"match open_store(state_dir) {\n    Err(e) if e.to_string().contains(\"old unreleased checkpoint format\") => {\n        set_mise_state_dir(fresh_dir()); retry();\n    }\n    other => other,\n}","preventionTips":["Use a fresh MISE_STATE_DIR when switching from dev/experimental mise builds to releases","Never share one state dir between old dev builds and new releases","Archive legacy state dirs instead of pointing new mise at them"],"tags":["migration","history","state-dir","legacy-format"],"backgroundTag":"incompatible-source-type","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}