jdx/mise · error
task cache archive is missing
Error message
task cache archive is missing {} What it means
During cache restore, mise extracts the archive into a staging directory and then checks that every root listed in the manifest actually exists there (including as a symlink). If a declared root is absent after extraction, the archive is considered incomplete and restore fails. This prevents silently proceeding with a partial restore.
Solutions
- Delete the bad cache entry and rerun the task so it executes and repopulates the cache.
- Clear the task-artifacts cache directory if corruption is widespread.
- Verify remote cache uploads are atomic (upload manifest only after the full artifact).
- Update the task's outputs to match what the command actually produces, then re-save the cache.
Example fix
// before (manifest lists "coverage" but archive only contains "dist")
{"roots": ["dist", "coverage"]} -> task cache archive is missing coverage
// after
task.outputs = ["dist"] # or fix the archiver, then clear the entry and rerun Defensive patterns
Strategy: fallback
Validate before calling
for rel in manifest.roots:
if not (staging / rel).exists() and not (staging / rel).is_symlink():
print(f"entry incomplete: {rel}") # skip entry, run task Try / catch
// on restore failure from missing root, fall back to executing the task
try { cache.restore(entry) } catch (e) {
if (String(e).startsWith('task cache archive is missing')) { cache.delete(entry); task.run(); }
else throw e;
} Prevention
- Upload cache artifacts atomically (manifest only after full archive)
- Keep outputs config in sync with what the command actually produces
- Avoid external cleanup jobs that prune archive contents selectively
When it happens
Trigger: Cache restore path in restore(): an entry's archive was extracted but a root from manifest.roots is neither a file/dir nor a symlink at staging/<root>. Caused by truncated/corrupt archives, archives created without all output roots, or manifests that list roots not included at save time.
Common situations: Interrupted or partial cache uploads to a remote store; archives pruned by cleanup tooling; outputs config changed so the manifest lists roots the older archive never contained.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- output does not exist
- output pattern matched no files
- task cache archive contains duplicate paths
- unsupported output file type
- unsupported task cache archive entry type
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/adda97d7c0169f77.
Report an issue: GitHub.
Appendix: source
Thrown at src/task/task_cache.rs:608
.map(|artifact| artifact.path())
.ok_or_else(|| eyre!("task cache archive is missing"))?;
let staging = tempfile::Builder::new()
.prefix(".mise-task-cache-")
.tempdir_in(&self.root)?;
file::untar(
archive_path,
staging.path(),
ExtractionFormat::TarZst,
&ExtractOptions {
preserve_mtime: false,
..Default::default()
},
)?;
for rel in &manifest.roots {
let restored = staging.path().join(rel);
if !restored.exists() && fs::symlink_metadata(&restored).is_err() {
bail!("task cache archive is missing {}", rel.display());
}
ensure_no_symlink_ancestors(staging.path(), rel)?;
ensure_no_symlink_ancestors(&self.root, rel)?;
}
let mut remove = resolve_output_roots(task, &self.root, false)?;
remove.extend(manifest.roots.iter().cloned());
let remove = remove_nested_roots(remove);
for rel in &remove {
ensure_no_symlink_ancestors(&self.root, rel)?;
}
let output_matcher = build_output_matcher(&self.root, &task.outputs.patterns())?;
install_transactionally(
&self.root,
staging.path(),
&manifest.roots,
&remove,
Some(&output_matcher),View on GitHub (pinned to 533346cc37)