jdx/mise · error

remote cache metadata kind is not a task

Error message

remote cache metadata kind is not a task

What it means

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.

Solutions

  1. Ensure distinct cache key namespaces/prefixes per producer sharing the remote store
  2. Delete the conflicting remote entry and re-run the task to republish it
  3. Verify no other tooling writes to the same CAS location
Defensive patterns

Strategy: try-catch

Try / catch

match cache_get(key) {
    Err(e) if e.to_string().contains("kind is not a task") => {
        // treat as cache miss; optionally purge the conflicting key
        purge_key(key);
        rebuild_locally();
    }
    r => r?,
}

Prevention

When it happens

Trigger: 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.

Common situations: Two tools or mise subsystems sharing one remote cache bucket with overlapping keys; scripts uploading cache blobs manually; partially overwritten remote entries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/b218ad112ea38bcf. Report an issue: GitHub.

Appendix: source

Thrown at src/task/task_cache_store.rs:65

            output: manifest.output.clone(),
            restored_bytes: manifest.restored_bytes,
            roots: manifest
                .roots
                .iter()
                .map(|path| path.to_string_lossy().replace('\\', "/"))
                .collect(),
            task_identity: manifest.task_identity.clone(),
            kind: "task".to_string(),
            version: 1,
        }
    }

    fn into_manifest(self, key: &str) -> Result<CacheManifest> {
        if self.version != 1 {
            bail!("unsupported remote cache client metadata version");
        }
        if self.kind != "task" {
            bail!("remote cache metadata kind is not a task");
        }
        let roots = self.roots.into_iter().map(PathBuf::from).collect();
        Ok(CacheManifest {
            format: CACHE_FORMAT_VERSION,
            key: key.to_string(),
            task_identity: self.task_identity,
            artifact_checksum: None,
            roots,
            output: self.output,
            restored_bytes: self.restored_bytes,
            execution_duration_ns: self.execution_duration_ns,
        })
    }
}

enum ArchiveNode {
    Directory {
        mode: u32,

View on GitHub (pinned to 533346cc37)