{"record":{"id":"d3a32fe7a00333ce","repo":"jdx/mise","slug":"unsupported-task-cache-archive-entry-type","errorCode":null,"errorMessage":"unsupported task cache archive entry type","messagePattern":"unsupported task cache archive entry type","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_cache_store.rs","lineNumber":610,"sourceCode":"                digest: CacheDigest {\n                    algorithm: \"blake3\".into(),\n                    hash: hasher.finalize().to_hex().to_string(),\n                    size,\n                },\n                executable: mode & 0o111 != 0,\n                mode,\n                file: temporary,\n            }\n        } else if entry_type == EntryType::Symlink {\n            let target = entry\n                .header()\n                .link_name()\n                .ok_or_else(|| eyre!(\"remote cache symlink is missing its target\"))?\n                .into_owned();\n            validate_cache_symlink_target(&entry_path, &target)?;\n            ArchiveNode::Symlink { mode, target }\n        } else {\n            bail!(\"unsupported task cache archive entry type\");\n        };\n        if nodes.insert(entry_path.clone(), node).is_some() {\n            bail!(\"task cache archive contains duplicate paths\");\n        }\n        let mut parent = entry_path.parent();\n        while let Some(path) = parent {\n            nodes\n                .entry(path.to_path_buf())\n                .or_insert(ArchiveNode::Directory { mode: 0o755 });\n            parent = path.parent();\n        }\n    }\n\n    fn build_directory(\n        path: &Path,\n        nodes: &BTreeMap<PathBuf, ArchiveNode>,\n        directory_uploads: &mut Vec<BlobUpload>,\n    ) -> Result<CacheDigest> {","sourceCodeStart":592,"sourceCodeEnd":628,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/task/task_cache_store.rs#L592-L628","documentation":"While converting a downloaded task-cache archive into the content-addressable store (CAS), archive_to_cas walks each archive entry and maps it to an ArchiveNode (file, directory, or symlink). If an entry's type is none of these (e.g. hardlink, fifo, device node, or other exotic tar entry kinds), it cannot be represented, so mise bails. This guards the CAS from storing entries it cannot later restore faithfully.","triggerScenarios":"Restoring/committing a remote task cache archive produced by a tool that emitted entry kinds other than regular files, directories, and symlinks — e.g. tar archives containing hardlinks, block/char devices, or FIFOs.","commonSituations":"A custom or third-party cache-packaging step created the archive with unusual entry types; a cache archive was hand-crafted or generated on a platform that records device nodes; archives tampered with or corrupted in transit.","solutions":["Repackage the cache archive so it contains only regular files, directories, and symlinks (e.g. tar without --hard-dereference, no device/fifo entries).","Identify which entry has the unsupported type (inspect with `tar -tvf archive.tar`) and remove or convert it.","Regenerate the cache by re-running the task so mise builds the archive itself from real filesystem contents.","If the producer legitimately needs hardlinks, switch it to emit regular files or symlinks instead."],"exampleFix":"// before: producer emits hardlinks\ntar -cf cache.tar --hard-dereference=no dir\n// after: dereference everything into plain files\ntar -cf cache.tar --hard-dereference dir","handlingStrategy":"validation","validationCode":"const OK = new Set(['file', 'dir', 'symlink']);\nconst bad = entries.filter(e => !OK.has(e.type));\nif (bad.length) throw new Error(`unsupported entry types: ${bad.map(e => e.path)}`);","typeGuard":"const isSupportedEntry = (e) => ['file','dir','symlink'].includes(e.type);","tryCatchPattern":null,"preventionTips":["Build cache archives with only files, directories, and symlinks.","Avoid tar options that emit hardlinks/device nodes (e.g. don't archive /dev or sockets).","Inspect producer output with `tar -tvf` before uploading."],"tags":["task-cache","archive","cas","validation"],"backgroundTag":"unsupported-operation","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"}