{"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/533346cc374382b41ec5ff70536252b2e96e725c/src/task/task_cache_store.rs#L47-L83","documentation":"The remote client metadata blob carries a kind discriminator; into_manifest requires kind == \"task\". A blob of a different kind (another subsystem's cache metadata) was found under a task cache key, so mise refuses to deserialize it into a task CacheManifest.","triggerScenarios":"A GET on the remote task cache store returns metadata whose kind field is not \"task\" — e.g. a key collision between different cache producers sharing the same CAS, or hand-edited/uploaded metadata.","commonSituations":"Two tools or mise subsystems sharing one remote cache bucket with overlapping keys; scripts uploading cache blobs manually; partially overwritten remote entries.","solutions":["Ensure distinct cache key namespaces/prefixes per producer sharing the remote store","Delete the conflicting remote entry and re-run the task to republish it","Verify no other tooling writes to the same CAS location"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match cache_get(key) {\n    Err(e) if e.to_string().contains(\"kind is not a task\") => {\n        // treat as cache miss; optionally purge the conflicting key\n        purge_key(key);\n        rebuild_locally();\n    }\n    r => r?,\n}","preventionTips":["Namespace cache keys per producer when sharing a CAS","Don't hand-write or script-upload cache metadata blobs","Use separate buckets/prefixes per mise subsystem"],"tags":["remote-cache","metadata","key-collision"],"backgroundTag":"unexpected-response-shape","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"}