{"record":{"id":"b218ad112ea38bcf","repo":"jdx/mise","slug":"remote-cache-metadata-kind-is-not-a-task","errorCode":null,"errorMessage":"remote cache metadata kind is not a task","messagePattern":"remote cache metadata kind is not a task","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_cache_store.rs","lineNumber":65,"sourceCode":"            output: manifest.output.clone(),\n            restored_bytes: manifest.restored_bytes,\n            roots: manifest\n                .roots\n                .iter()\n                .map(|path| path.to_string_lossy().replace('\\\\', \"/\"))\n                .collect(),\n            task_identity: manifest.task_identity.clone(),\n            kind: \"task\".to_string(),\n            version: 1,\n        }\n    }\n\n    fn into_manifest(self, key: &str) -> Result<CacheManifest> {\n        if self.version != 1 {\n            bail!(\"unsupported remote cache client metadata version\");\n        }\n        if self.kind != \"task\" {\n            bail!(\"remote cache metadata kind is not a task\");\n        }\n        let roots = self.roots.into_iter().map(PathBuf::from).collect();\n        Ok(CacheManifest {\n            format: CACHE_FORMAT_VERSION,\n            key: key.to_string(),\n            task_identity: self.task_identity,\n            artifact_checksum: None,\n            roots,\n            output: self.output,\n            restored_bytes: self.restored_bytes,\n            execution_duration_ns: self.execution_duration_ns,\n        })\n    }\n}\n\nenum ArchiveNode {\n    Directory {\n        mode: u32,","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/task/task_cache_store.rs#L47-L83","documentation":"The remote metadata blob carries a kind discriminator that must equal 'task'; into_manifest bails otherwise. The field distinguishes task-cache entries from other current or future action-result kinds, so a foreign entry is never interpreted as a task manifest.","triggerScenarios":"get() fetches metadata whose JSON 'kind' field is not 'task' and into_manifest rejects it — e.g. a bucket shared with another action-cache client writing its own metadata under the same media type, or corrupted/hand-edited metadata.","commonSituations":"Reusing a remote cache bucket between mise and other bazel-style action-cache tools; entries from an experimental build; metadata blobs modified in transit or by hand.","solutions":["Give mise its own remote cache prefix or bucket so foreign metadata never collides","Purge the offending keys so mise re-uploads clean entries","Verify the remote URL actually points at the store mise wrote to"],"exampleFix":"# before\nCACHE_URL=s3://shared-actions/results\n\n# after\nCACHE_URL=s3://shared-actions/mise-tasks","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// treat foreign-kind metadata as a cache miss, then evict\nmatch fetch_remote_entry(&key).await {\n    Ok(e) => Some(e),\n    Err(err) if err.to_string().contains(\"remote cache metadata kind is not a task\") => {\n        evict_remote(&key).await;\n        None\n    }\n    Err(err) => return Err(err),\n}","preventionTips":["Dedicate a prefix or bucket to the mise task cache","Do not point mise at generic action-cache stores used by other tools","Document which URLs are mise-owned so nobody reuses them"],"tags":["mise","task-cache","remote-cache","metadata"],"backgroundTag":"cache-metadata-invalid","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}