jdx/mise · error

local task cache manifest does not match remote action

Error message

local task cache manifest does not match remote action

What it means

After parsing the uploaded manifest, commit() checks that manifest.key equals the cache key argument. A mismatch means the manifest being published describes a different action than the one being committed, so the store rejects it to keep the remote entry self-consistent.

Solutions

  1. Regenerate the manifest from the current action so its key field matches the key passed to commit().
  2. Ensure each TaskCacheStoreWrite/manifest pair is used with exactly the key it was created for; do not share writes across tasks.
  3. Clear the staging directory of leftover part files and restart the write.
  4. Add an assertion/logging comparing manifest.key and key before commit to catch the crossing earlier.

Example fix

// before
let manifest = load_manifest("other-task.json");
store.commit(&current_key, action, &write, &manifest, true).await?;
// after
let mut manifest = CacheManifest { key: current_key.to_string(), ..load_manifest("other-task.json") };
let manifest_bytes = serde_json::to_vec(&manifest)?;
store.commit(&current_key, action, &write, &manifest_bytes, true).await?;
Defensive patterns

Strategy: validation

Validate before calling

let manifest: CacheManifest = serde_json::from_slice(&manifest_bytes)?;
assert_eq!(manifest.key, key, "manifest.key must equal commit key");

Type guard

fn manifest_matches_key(manifest: &CacheManifest, key: &str) -> bool {
    manifest.key == key
}

Try / catch

if let Err(e) = store.commit(&key, action, &write, &manifest_bytes, true).await {
    if e.to_string().contains("manifest does not match remote action") {
        // regenerate manifest for this key and retry once
    } else { return Err(e); }
}

Prevention

When it happens

Trigger: Calling HttpTaskCacheStore::commit where the serialized CacheManifest's key field differs from the key parameter (task_cache_store.rs:453), e.g. writing the manifest for one task and committing under another task's key.

Common situations: Concurrent task writes where manifest/key pairs got crossed; reusing a staged write (manifest file) after the key changed; hand-assembled manifests in custom tooling; stale staging files in the staging_dir picked up incorrectly.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/task/task_cache_store.rs:453

        })
    }

    async fn commit(
        &self,
        key: &str,
        action: &[u8],
        write: &TaskCacheStoreWrite,
        manifest: &[u8],
        has_artifact: bool,
    ) -> Result<()> {
        validate_remote_key(key)?;
        let action_digest = CacheDigest::blake3(action);
        if action_digest.hash != key {
            bail!("remote cache action bytes do not match cache key");
        }
        let manifest: CacheManifest = serde_json::from_slice(manifest)?;
        if manifest.key != key {
            bail!("local task cache manifest does not match remote action");
        }
        let metadata = canonical_json(&serde_json::to_value(
            RemoteClientMetadata::from_manifest(&manifest),
        )?)?;
        let mut uploads = vec![
            BlobUpload {
                digest: action_digest.clone(),
                source: BlobSource::Bytes(action.to_vec()),
            },
            BlobUpload {
                digest: CacheDigest::blake3(&metadata),
                source: BlobSource::Bytes(metadata),
            },
        ];
        let metadata = uploads[1].digest.clone();
        let output_root = if has_artifact {
            let (root, mut artifact_uploads) =
                archive_to_cas(write.artifact_path(), &self.staging_dir)?;

View on GitHub (pinned to 533346cc37)