{"record":{"id":"03494f50491b738a","repo":"jdx/mise","slug":"unsupported-local-action-result-version","errorCode":null,"errorMessage":"unsupported local action result version","messagePattern":"unsupported local action result version","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"crates/mise-cache-core/src/local.rs","lineNumber":204,"sourceCode":"\n    /// Find and strictly validate a canonical action result.\n    pub fn find(&self, action: &CacheDigest) -> Result<Option<RemoteActionResult>> {\n        let path = self.path_for(action)?;\n        if !path.exists() {\n            return Ok(None);\n        }\n        let bytes = fs::read(&path)?;\n        let result: RemoteActionResult = serde_json::from_slice(&bytes)?;\n        if result.version != 1 || result.action != *action || canonical_json(&result)? != bytes {\n            bail!(\"local action result is invalid: {}\", path.display());\n        }\n        Ok(Some(result))\n    }\n\n    /// Atomically publish an action result after validating all referenced objects.\n    pub fn store(&self, result: &RemoteActionResult) -> Result<PathBuf> {\n        if result.version != 1 {\n            bail!(\"unsupported local action result version\");\n        }\n        for digest in [\n            Some(&result.action),\n            result.metadata.as_ref(),\n            result.output_root.as_ref(),\n        ]\n        .into_iter()\n        .flatten()\n        {\n            if self.cas.find(digest)?.is_none() {\n                bail!(\"cannot publish an action result with a missing blob\");\n            }\n        }\n        let destination = self.path_for(&result.action)?;\n        let replace_invalid = match self.find(&result.action) {\n            Ok(Some(existing)) => {\n                if existing == *result {\n                    return Ok(destination);","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/crates/mise-cache-core/src/local.rs#L186-L222","documentation":"`LocalActionCache::store` only publishes action results with `version == 1`. A `RemoteActionResult` carrying any other version is rejected before referenced blobs are validated, because the on-disk format and the strict `find` validation understand version 1 only. Remote reads also reject mismatched versions, so unsupported results should be treated as misses rather than re-stored.","triggerScenarios":"Constructing a `RemoteActionResult` by hand with a version other than 1, or deserializing one from a remote cache server or peer running a newer format version and attempting to publish it into the local action cache.","commonSituations":"Forward/backward-compat experiments; an upgraded remote server returning version-2 results to an older local crate; hand-built results in tests or migrations.","solutions":["Set `version: 1` on results you construct - it is the only supported on-disk version.","When ingesting remote results, check `result.version == 1` and skip unsupported versions (treat as a miss) instead of re-storing.","Upgrade mise-cache-core on both ends so client and server agree on the format."],"exampleFix":"// before\nlet result = RemoteActionResult { action, metadata: None, output_root: None, version: 2 };\nactions.store(&result)?; // bails\n\n// after\nlet result = RemoteActionResult { action, metadata: None, output_root: None, version: 1 };\nactions.store(&result)?;","handlingStrategy":"validation","validationCode":"if result.version != 1 {\n    // unsupported format: treat as a cache miss, do not re-store\n    return Ok(None);\n}\nactions.store(&result)?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check `result.version == 1` on every result before storing, especially results from remote servers.","Skip-and-recompute instead of re-storing unsupported versions.","Keep client and server on compatible mise-cache-core versions."],"tags":["local-cache","action-cache","schema-version","compatibility","rust"],"backgroundTag":"unsupported-schema-version","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}