jdx/mise · error

remote cache blob pack payload byte metadata mismatch…

Error message

remote cache blob pack payload byte metadata mismatch: expected {}, decoded {}

What it means

BlobPackResponseMetadata::validate compares the payload-bytes response header (BLOB_PACK_BYTES) with the decoded payload size. A mismatch means framing or compression altered the body relative to the server's metadata, so validation fails to avoid caching corrupt data.

Solutions

  1. Retry the request in case of transient corruption
  2. Ensure nothing in the network path modifies (e.g. re-encodes) the body
  3. Report deterministic mismatches to the cache server maintainers
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/mise-cache-core/src/lib.rs:312 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/1501f64d88828fc4. Report an issue: GitHub.

Appendix: source

Thrown at crates/mise-cache-core/src/lib.rs:312

            bail!(
                "remote cache blob pack content length metadata mismatch: expected {}, decoded {}",
                content_length,
                decoded.framed_bytes
            );
        }
        if let Some(blob_count) = self.blob_count
            && blob_count != decoded.blob_count
        {
            bail!(
                "remote cache blob pack blob count metadata mismatch: expected {}, decoded {}",
                blob_count,
                decoded.blob_count
            );
        }
        if let Some(payload_bytes) = self.payload_bytes
            && payload_bytes != decoded.payload_bytes
        {
            bail!(
                "remote cache blob pack payload byte metadata mismatch: expected {}, decoded {}",
                payload_bytes,
                decoded.payload_bytes
            );
        }
        Ok(BlobPackResponseStats {
            blob_count: self.blob_count.unwrap_or(decoded.blob_count),
            payload_bytes: self.payload_bytes.unwrap_or(decoded.payload_bytes),
            framed_bytes: self.content_length.unwrap_or(decoded.framed_bytes),
        })
    }
}

fn optional_u64_header(headers: &HeaderMap, name: &str) -> Result<Option<u64>> {
    let Some(value) = headers.get(name) else {
        return Ok(None);
    };
    let value = value

View on GitHub (pinned to 533346cc37)