jdx/mise · error · eyre::Report

unsupported local action result version

Error message

unsupported local action result version

What it means

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

Source

Thrown at crates/mise-cache-core/src/local.rs:204

    /// Find and strictly validate a canonical action result.
    pub fn find(&self, action: &CacheDigest) -> Result<Option<RemoteActionResult>> {
        let path = self.path_for(action)?;
        if !path.exists() {
            return Ok(None);
        }
        let bytes = fs::read(&path)?;
        let result: RemoteActionResult = serde_json::from_slice(&bytes)?;
        if result.version != 1 || result.action != *action || canonical_json(&result)? != bytes {
            bail!("local action result is invalid: {}", path.display());
        }
        Ok(Some(result))
    }

    /// Atomically publish an action result after validating all referenced objects.
    pub fn store(&self, result: &RemoteActionResult) -> Result<PathBuf> {
        if result.version != 1 {
            bail!("unsupported local action result version");
        }
        for digest in [
            Some(&result.action),
            result.metadata.as_ref(),
            result.output_root.as_ref(),
        ]
        .into_iter()
        .flatten()
        {
            if self.cas.find(digest)?.is_none() {
                bail!("cannot publish an action result with a missing blob");
            }
        }
        let destination = self.path_for(&result.action)?;
        let replace_invalid = match self.find(&result.action) {
            Ok(Some(existing)) => {
                if existing == *result {
                    return Ok(destination);

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Set `version: 1` on results you construct - it is the only supported on-disk version.
  2. When ingesting remote results, check `result.version == 1` and skip unsupported versions (treat as a miss) instead of re-storing.
  3. Upgrade mise-cache-core on both ends so client and server agree on the format.

Example fix

// before
let result = RemoteActionResult { action, metadata: None, output_root: None, version: 2 };
actions.store(&result)?; // bails

// after
let result = RemoteActionResult { action, metadata: None, output_root: None, version: 1 };
actions.store(&result)?;
Defensive patterns

Strategy: validation

Validate before calling

if result.version != 1 {
    // unsupported format: treat as a cache miss, do not re-store
    return Ok(None);
}
actions.store(&result)?;

Prevention

When it happens

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

Common situations: Forward/backward-compat experiments; an upgraded remote server returning version-2 results to an older local crate; hand-built results in tests or migrations.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/03494f50491b738a. Report an issue: GitHub.