{"record":{"id":"adda97d7c0169f77","repo":"jdx/mise","slug":"task-cache-archive-is-missing","errorCode":null,"errorMessage":"task cache archive is missing {}","messagePattern":"task cache archive is missing (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_cache.rs","lineNumber":609,"sourceCode":"                .map(|artifact| artifact.path())\n                .ok_or_else(|| eyre!(\"task cache archive is missing\"))?;\n\n            let staging = tempfile::Builder::new()\n                .prefix(\".mise-task-cache-\")\n                .tempdir_in(&self.root)?;\n            file::untar(\n                archive_path,\n                staging.path(),\n                ExtractionFormat::TarZst,\n                &ExtractOptions {\n                    preserve_mtime: false,\n                    ..Default::default()\n                },\n            )?;\n            for rel in &manifest.roots {\n                let restored = staging.path().join(rel);\n                if !restored.exists() && fs::symlink_metadata(&restored).is_err() {\n                    bail!(\"task cache archive is missing {}\", rel.display());\n                }\n                ensure_no_symlink_ancestors(staging.path(), rel)?;\n                ensure_no_symlink_ancestors(&self.root, rel)?;\n            }\n\n            let mut remove = resolve_output_roots(task, &self.root, false)?;\n            remove.extend(manifest.roots.iter().cloned());\n            let remove = remove_nested_roots(remove);\n            for rel in &remove {\n                ensure_no_symlink_ancestors(&self.root, rel)?;\n            }\n            let output_matcher = build_output_matcher(&self.root, &task.outputs.patterns())?;\n            install_transactionally(\n                &self.root,\n                staging.path(),\n                &manifest.roots,\n                &remove,\n                Some(&output_matcher),","sourceCodeStart":591,"sourceCodeEnd":627,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/task/task_cache.rs#L591-L627","documentation":"After extracting the cached tar.zst archive into a staging directory, mise verifies every manifest.roots entry actually exists in the extracted tree. If an expected root is missing (neither exists() nor symlink_metadata succeeds), the archive is incomplete relative to its manifest and the restore bails.","triggerScenarios":"Truncated archive from a partial download (remote store) or interrupted write (local store); a manifest updated after the artifact was written; extraction silently skipping files. The per-root existence check runs immediately after file::untar with preserve_mtime disabled.","commonSituations":"Network interruption mid-download from the remote cache; process killed during cache save; zstd decompression issues on a corrupted blob; cache dir on flaky storage.","solutions":["Delete the cache entry so the next run re-executes the task and writes a fresh artifact","If it came from a remote store, check the endpoint's artifact integrity and retry after clearing the local staging copy","Wipe the whole task-artifacts dir when many entries are affected","Investigate disk space and process kills if saves keep getting interrupted"],"exampleFix":"# shell\nrm -rf \"${XDG_CACHE_HOME:-$HOME/.cache}/task-artifacts/v2/<entry>\"\nmise run build","handlingStrategy":"fallback","validationCode":"# verify an archive extracts cleanly before relying on it\ntar --zstd -tf entry/artifact.tar.zst >/dev/null && echo ok || echo corrupt","typeGuard":null,"tryCatchPattern":"Treat as a cache miss: remove the entry (local and, if possible, the remote key), re-run the task to rebuild the artifact, and only then re-enable restore.","preventionTips":["Avoid killing mise mid-save","Check remote cache endpoint reliability if downloads truncate","Keep the cache volume healthy (space, fsync)"],"tags":["mise","task-cache","caching","corruption","archive"],"backgroundTag":"cache-archive-corruption","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}