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

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 9dcfcaa0dc)

Solutions

  1. Give mise its own remote cache prefix or bucket so foreign metadata never collides
  2. Purge the offending keys so mise re-uploads clean entries
  3. Verify the remote URL actually points at the store mise wrote to

Example fix

# before
CACHE_URL=s3://shared-actions/results

# after
CACHE_URL=s3://shared-actions/mise-tasks
Defensive patterns

Strategy: fallback

Try / catch

// treat foreign-kind metadata as a cache miss, then evict
match fetch_remote_entry(&key).await {
    Ok(e) => Some(e),
    Err(err) if err.to_string().contains("remote cache metadata kind is not a task") => {
        evict_remote(&key).await;
        None
    }
    Err(err) => return Err(err),
}

Prevention

When it happens

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

Common situations: 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.

Related errors


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