jdx/mise · error

tracking declarations updated, but could not commit the chan

Error message

tracking declarations updated, but could not commit the change: {reason}

What it means

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.

Source

Thrown at src/cli/dotfiles/untrack.rs:199

            );
            return Ok(());
        }
        let store = crate::system::history::checkpoint::Store::open()?;
        let mut draft = crate::system::history::checkpoint::Draft::new(
            crate::system::history::store::Trigger::Save,
        );
        draft.description = Some("stop tracking files".into());
        draft.untrack = self
            .targets
            .iter()
            .map(|path| normalize_target(&crate::system::files::resolve_target_arg(path)))
            .collect();
        tokio::task::spawn_blocking(move || -> Result<()> {
            let _operation = crate::system::history::scope::take_operation_lock(&store, &tracked)?;
            if let crate::system::history::checkpoint::Outcome::Unavailable(reason) =
                store.attempt(&tracked, draft)?
            {
                bail!("tracking declarations updated, but could not commit the change: {reason}");
            }
            Ok(())
        })
        .await??;
        info!(
            "dotfiles: live files were left in place; their previously committed versions remain in Git"
        );
        Ok(())
    }
}

static AFTER_LONG_HELP: &str = color_print::cstr!(
    r#"<bold><underline>Examples:</underline></bold>

    $ <bold>mise bootstrap dotfiles untrack ~/.zshrc</bold>
"#
);

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Read {reason} in the message and fix the named store problem (permissions, disk, lock)
  2. Check the history store's git repo health (git status / git fsck in the store directory)
  3. Re-run `mise dotfiles untrack` after fixing so the boundary checkpoint gets committed; declarations themselves are already updated
Defensive patterns

Strategy: retry

Validate before calling

# preflight: store writable and repo healthy
(cd "$(mise dotfiles store-dir 2>/dev/null || echo ~/.local/share/mise/dotfiles)" && git fsck --no-progress)

Try / catch

mise dotfiles untrack "$path" || {
  git fsck --no-progress in the history store; mise dotfiles untrack "$path"
}

Prevention

When it happens

Trigger: `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).

Common situations: Git repo corruption in the history store; permission loss on the store directory; concurrent operations competing for the lock; disk-full during commit.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/a6f858811b3b7006. Report an issue: GitHub.