{"record":{"id":"ee44ab58dd43720d","repo":"jdx/mise","slug":"changed-while-the-changes-were-being-applied-nothing-more","errorCode":null,"errorMessage":"{} changed while the changes were being applied; nothing more was written. Run `mise dot pull` again","messagePattern":"(.+?) changed while the changes were being applied; nothing more was written\\. Run `mise dot pull` again","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/apply.rs","lineNumber":635,"sourceCode":"                || live_permissions(&step.path)? != step.before_mode\n            {\n                bail!(\n                    \"{} changed before application; nothing was written\",\n                    display_path(&step.path)\n                );\n            }\n        }\n        for directory in &mut directories {\n            directory.apply()?;\n        }\n        for step in &ready {\n            // the file may have changed since the plan was made: an edit\n            // that landed meanwhile is never overwritten (undo would bring\n            // back the planned version, not it)\n            if live_object(repo, &step.path)? != step.before\n                || live_permissions(&step.path)? != step.before_mode\n            {\n                bail!(\n                    \"{} changed while the changes were being applied; nothing more was written. Run `mise dot pull` again\",\n                    display_path(&step.path)\n                );\n            }\n            let pending =\n                journal::begin_changes(\"history\", &display_path(&step.path), [step.path.clone()])?;\n            touched.push(step.path.clone());\n            let affected = display_path(&step.path);\n            scope.with_operation(|op| op.affected.push(affected.clone()));\n            match &step.pending.object {\n                Some((mode, oid)) => {\n                    replay::write_path_with_mode(repo, &step.path, mode, oid, step.desired_mode)?\n                }\n                None => replay::remove(&step.path)?,\n            }\n            journal::commit_changes(pending);\n            let mut next = step.pending.next.clone();\n            let oid = step.pending.object.clone();","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/apply.rs#L617-L653","documentation":"This is the incremental guard during the apply loop: before writing each step, the live file is re-checked against the planned baseline. If an earlier step's writes or a concurrent edit changed this path after the plan was made, the loop stops — already-written changes stay, but nothing further is written, because undo would otherwise restore the planned version over the newer edit.","triggerScenarios":"Mid-application of the ready step list in `mise dot pull`: for the current step, `live_object(repo, path) != step.before` or `live_permissions(path) != step.before_mode` at that moment.","commonSituations":"A long-running apply interrupted by an editor autosave, symlink target change, or another process rewriting a later-listed tracked file; two mise instances racing on the same machine.","solutions":["Run `mise dot pull` again, as the message says, to rebuild the plan and apply the remaining changes safely.","Inspect the named path; if the interim edit matters, `mise dot save <path>` before pulling.","Ensure only one mise dot operation runs at a time; external editors can still race the lock."],"exampleFix":"before: mise dot pull (~/.bashrc changed mid-apply) | after: mise dot save ~/.bashrc (keep the interim edit if desired) && mise dot pull","handlingStrategy":"retry","validationCode":"flock /tmp/mise-dot.lock mise dot pull  # serialize sync operations against concurrent writers","typeGuard":null,"tryCatchPattern":"mise dot pull || mise dot pull  # remaining steps are re-planned and applied on retry","preventionTips":["Run only one mise dot operation at a time.","Quiesce processes that rewrite config files during pulls.","After a mid-apply abort, always re-pull before manual edits to avoid confusing baselines."],"tags":["sync","race-condition","dotfiles"],"backgroundTag":"checksum-mismatch","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"}