jdx/mise · error
write completion was not recorded; inspect the live file…
Error message
write completion was not recorded; inspect the live file before retrying recovery
What it means
recover_path compares the live path against the recorded prior snapshot; if they match, recovery is a no-op. If they differ, the operation's post-write snapshot (`after`) must exist to know what the file should look like — when no completion was recorded, mise refuses to guess and bails, telling the user to inspect the live file before retrying, since replaying the write could destroy concurrent edits.
Solutions
- Manually inspect the live file at the reported path and decide whether its content is correct.
- If the live content is correct, accept it with `mise dot recover <operation> --keep-current`.
- If the live content is wrong, fix or restore it manually, then retry `mise dot recover`.
- If the journal entry is hopelessly incomplete, remove/discard the operation record after verifying the file.
Example fix
// before: blind retry fails $ mise dot recover # error: write completion was not recorded // after $ cat ~/.bashrc # inspect live file $ mise dot recover <op> --keep-current # if content is acceptable
Defensive patterns
Strategy: validation
Validate before calling
export function checkCompletionRecorded(entry: RecoveryEntry): boolean {
if (entry.after == null) {
throw new Error('journal entry has no post-write snapshot; inspect the live file manually');
}
return true;
} Type guard
function hasAfterSnapshot(e: { after?: PathState }): e is { after: PathState } {
return e.after != null;
} Try / catch
try {
await dotRecover(op);
} catch (e) {
if (/write completion was not recorded/.test(String(e))) {
inspectLiveFile(path); // decide manually
await dotRecover(op, { keepCurrent: isContentAcceptable() });
} else throw e;
} Prevention
- Do not SIGKILL mise mid-write; let operations complete
- After a crash, inspect affected files before running recover
- Use --keep-current once you have verified live content is correct
When it happens
Trigger: recover_path encounters a path whose current content differs from the prior snapshot, and the journal entry has `after == None` — i.e. the original write never recorded its completion snapshot (interrupted before the write finished or before the snapshot was captured).
Common situations: A crash occurred between starting the write and recording the after-snapshot; the journal entry is truncated/partial; the user interrupted mise with SIGKILL during a dotfile write and the resulting file state cannot be proven.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- cannot safely change
- changed after the operation; left untouched
- changed while preparing recovery; left untouched
- directory contents cannot be verified safely; left untouched
- interrupted file recovery needs attention; temporary…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/96d089719ace29cd.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/history/recovery.rs:83
state_dir: &Path,
path: &Path,
prior: &PathSnapshot,
after: Option<&PathState>,
) -> Result<()> {
validate_destination(path)?;
let comparison = tempfile::tempdir()?;
let depth = if matches!(prior, PathSnapshot::Directory { .. }) {
Capture::Shallow
} else {
Capture::Full
};
// Comparing must not leave copies of concurrent user edits in the store.
let current = PathSnapshot::capture_with(comparison.path(), path, depth);
if !matches!(prior, PathSnapshot::Unrecorded { .. }) && ¤t == prior {
return Ok(());
}
let Some(after) = after else {
bail!("write completion was not recorded; inspect the live file before retrying recovery");
};
if PathState::observe(path) != *after {
bail!("changed after the operation; left untouched");
}
// Entry count alone cannot establish a directory's identity. Never
// replace a populated directory on that evidence.
if matches!(after, PathState::Dir { entries, .. } if *entries != 0)
&& !(matches!(prior, PathSnapshot::Directory { .. })
&& matches!(
after,
PathState::Dir {
identity: Some(_),
..
}
))
{
bail!("directory contents cannot be verified safely; left untouched");
}View on GitHub (pinned to 533346cc37)