{"record":{"id":"4ecf2bea3d92b8cd","repo":"jdx/mise","slug":"remote-cache-action-keys-must-use-blake3","errorCode":null,"errorMessage":"remote cache action keys must use blake3","messagePattern":"remote cache action keys must use blake3","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/mise-cache-core/src/lib.rs","lineNumber":422,"sourceCode":"            .redirect(reqwest::redirect::Policy::none())\n            .build()?;\n        let credential = remote_credential(&config, client.clone())?;\n        Ok(Self {\n            base_url: normalized_base_url(config.base_url),\n            namespace: config.namespace,\n            client,\n            credential,\n            download_timeout: config.download_timeout,\n            retries: config.retries,\n            capabilities: tokio::sync::OnceCell::new(),\n            blob_packs_disabled: AtomicBool::new(false),\n        })\n    }\n\n    fn action_result_endpoint(&self, action: &CacheDigest) -> Result<Url> {\n        action.validate()?;\n        if action.algorithm != \"blake3\" {\n            bail!(\"remote cache action keys must use blake3\");\n        }\n        Ok(self.base_url.join(&format!(\n            \"v{PROTOCOL_VERSION}/action-results/{}/{}/{}\",\n            action.algorithm, action.hash, action.size\n        ))?)\n    }\n\n    fn blob_endpoint(&self, digest: &CacheDigest) -> Result<Url> {\n        digest.validate()?;\n        Ok(self.base_url.join(&format!(\n            \"v{PROTOCOL_VERSION}/blobs/{}/{}/{}\",\n            digest.algorithm, digest.hash, digest.size\n        ))?)\n    }\n\n    fn capabilities_endpoint(&self) -> Result<Url> {\n        Ok(self\n            .base_url","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/crates/mise-cache-core/src/lib.rs#L404-L440","documentation":"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.","triggerScenarios":"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\").","commonSituations":"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.","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)"],"exampleFix":"// before\nlet action = CacheDigest { algorithm: \"sha256\".into(), hash, size };\nclient.get_action_result(&action).await?;\n// after\nlet action = CacheDigest { algorithm: \"blake3\".into(), hash, size };\nclient.get_action_result(&action).await?;","handlingStrategy":"validation","validationCode":"fn ensure_blake3_action(digest: &CacheDigest) -> Result<()> {\n    digest.validate()?;\n    if digest.algorithm != \"blake3\" {\n        bail!(\"action key must use blake3, got {}\", digest.algorithm);\n    }\n    Ok(())\n}","typeGuard":"fn is_blake3_action(d: &CacheDigest) -> bool { d.algorithm == \"blake3\" }","tryCatchPattern":null,"preventionTips":["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"],"tags":["remote-cache","blake3","validation"],"backgroundTag":"invalid-argument-value","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"}