jdx/mise · error
remote cache action keys must use blake3
Error message
remote cache action keys must use blake3
What it means
RemoteCacheClient::action_result_endpoint refuses to build an action-result URL unless the action's CacheDigest uses the blake3 algorithm. The remote action-result API is keyed exclusively by blake3 digests; any other algorithm (e.g. sha256) is rejected before a request is made. This is a deliberate protocol restriction, not a network failure.
Solutions
- Ensure the action digest is computed with blake3 (algorithm == "blake3") before calling get_action_result/put_action_result
- If the digest came from another tool, recompute the action key with blake3 rather than reusing a foreign digest
- Verify the algorithm string is exactly lowercase "blake3" (no "sha256", no case variants)
Example fix
// before
let action = CacheDigest { algorithm: "sha256".into(), hash, size };
client.get_action_result(&action).await?;
// after
let action = CacheDigest { algorithm: "blake3".into(), hash, size };
client.get_action_result(&action).await?; Defensive patterns
Strategy: validation
Validate before calling
fn ensure_blake3_action(digest: &CacheDigest) -> Result<()> {
digest.validate()?;
if digest.algorithm != "blake3" {
bail!("action key must use blake3, got {}", digest.algorithm);
}
Ok(())
} Type guard
fn is_blake3_action(d: &CacheDigest) -> bool { d.algorithm == "blake3" } Prevention
- Always build action digests with the library's blake3 hashing helpers
- Add a debug_assert for algorithm == "blake3" at digest construction sites
- Never reuse digests imported from sha256-based systems as action keys
When it happens
Trigger: Calling get_action_result or put_action_result with a CacheDigest whose algorithm field is anything other than "blake3" (e.g. a sha256 digest produced elsewhere, or a hand-constructed digest with a typo like "Blake3").
Common situations: Mixing digests from another CAS or build system that defaults to sha256; constructing CacheDigest values by hand instead of via the library's hashing helpers; case-sensitivity mistakes in the algorithm string.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- invalid remote task cache key
- remote action manifest keys must use blake3
- remote cache directory contains duplicate names
- a repository preview directory requires a dry run
- action prediction payload is too large
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/4ecf2bea3d92b8cd.
Report an issue: GitHub.
Appendix: source
Thrown at crates/mise-cache-core/src/lib.rs:422
.redirect(reqwest::redirect::Policy::none())
.build()?;
let credential = remote_credential(&config, client.clone())?;
Ok(Self {
base_url: normalized_base_url(config.base_url),
namespace: config.namespace,
client,
credential,
download_timeout: config.download_timeout,
retries: config.retries,
capabilities: tokio::sync::OnceCell::new(),
blob_packs_disabled: AtomicBool::new(false),
})
}
fn action_result_endpoint(&self, action: &CacheDigest) -> Result<Url> {
action.validate()?;
if action.algorithm != "blake3" {
bail!("remote cache action keys must use blake3");
}
Ok(self.base_url.join(&format!(
"v{PROTOCOL_VERSION}/action-results/{}/{}/{}",
action.algorithm, action.hash, action.size
))?)
}
fn blob_endpoint(&self, digest: &CacheDigest) -> Result<Url> {
digest.validate()?;
Ok(self.base_url.join(&format!(
"v{PROTOCOL_VERSION}/blobs/{}/{}/{}",
digest.algorithm, digest.hash, digest.size
))?)
}
fn capabilities_endpoint(&self) -> Result<Url> {
Ok(self
.base_urlView on GitHub (pinned to 533346cc37)