{"record":{"id":"a6f858811b3b7006","repo":"jdx/mise","slug":"tracking-declarations-updated-but-could-not-commi","errorCode":null,"errorMessage":"tracking declarations updated, but could not commit the change: {reason}","messagePattern":"tracking declarations updated, but could not commit the change: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/untrack.rs","lineNumber":199,"sourceCode":"            );\n            return Ok(());\n        }\n        let store = crate::system::history::checkpoint::Store::open()?;\n        let mut draft = crate::system::history::checkpoint::Draft::new(\n            crate::system::history::store::Trigger::Save,\n        );\n        draft.description = Some(\"stop tracking files\".into());\n        draft.untrack = self\n            .targets\n            .iter()\n            .map(|path| normalize_target(&crate::system::files::resolve_target_arg(path)))\n            .collect();\n        tokio::task::spawn_blocking(move || -> Result<()> {\n            let _operation = crate::system::history::scope::take_operation_lock(&store, &tracked)?;\n            if let crate::system::history::checkpoint::Outcome::Unavailable(reason) =\n                store.attempt(&tracked, draft)?\n            {\n                bail!(\"tracking declarations updated, but could not commit the change: {reason}\");\n            }\n            Ok(())\n        })\n        .await??;\n        info!(\n            \"dotfiles: live files were left in place; their previously committed versions remain in Git\"\n        );\n        Ok(())\n    }\n}\n\nstatic AFTER_LONG_HELP: &str = color_print::cstr!(\n    r#\"<bold><underline>Examples:</underline></bold>\n\n    $ <bold>mise bootstrap dotfiles untrack ~/.zshrc</bold>\n\"#\n);\n","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/dotfiles/untrack.rs#L181-L217","documentation":"After updating tracking declarations, untrack commits a checkpoint via store.attempt inside the operation lock. If the store returns Outcome::Unavailable(reason), the file edits succeeded but the history boundary could not be recorded, so the command reports a partial-success failure with the store's reason.","triggerScenarios":"`mise dotfiles untrack` when the history store cannot commit the draft — locked store, broken git backing, unwritable store path, or storage backend failure surfaced as Unavailable(reason).","commonSituations":"Git repo corruption in the history store; permission loss on the store directory; concurrent operations competing for the lock; disk-full during commit.","solutions":["Read {reason} in the message and fix the named store problem (permissions, disk, lock)","Check the history store's git repo health (git status / git fsck in the store directory)","Re-run `mise dotfiles untrack` after fixing so the boundary checkpoint gets committed; declarations themselves are already updated"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# preflight: store writable and repo healthy\n(cd \"$(mise dotfiles store-dir 2>/dev/null || echo ~/.local/share/mise/dotfiles)\" && git fsck --no-progress)","typeGuard":null,"tryCatchPattern":"mise dotfiles untrack \"$path\" || {\n  git fsck --no-progress in the history store; mise dotfiles untrack \"$path\"\n}","preventionTips":["Keep the history store on a writable, healthy volume","Run `git fsck` in the store repo periodically","Avoid concurrent dotfiles operations that contend for the lock"],"tags":["dotfiles","checkpoint","git","partial-failure"],"backgroundTag":"file-write-failed","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}